From patchwork Mon May 13 21:33:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 32665 Received: (qmail 112988 invoked by alias); 13 May 2019 21:33:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 112980 invoked by uid 89); 13 May 2019 21:33:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=5.1, 51, HX-Languages-Length:2952 X-HELO: relay1.mentorg.com Date: Mon, 13 May 2019 21:33:18 +0000 From: Joseph Myers To: Stepan Golosunov CC: Subject: Re: Update kernel-features.h files for Linux 5.1 In-Reply-To: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> Message-ID: References: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 On Fri, 10 May 2019, Stepan Golosunov wrote: > The newly added direct ipc syscalls are different from the old ones: Thanks for pointing this out. Here's a revised patch version with the __ASSUME_DIRECT_SYSVIPC_SYSCALLS changes removed. Update kernel-features.h files for Linux 5.1. Linux 5.1 adds missing syscalls to the syscall table for many Linux kernel architectures. This patch updates the kernel-features.h headers accordingly. __ASSUME_DIRECT_SYSVIPC_SYSCALLS is not updated because of the differences between new and old syscalls described in . I believe the statfs64 structure used by alpha matches what the new kernel syscalls use, but that should be reviewed carefully. Tested with build-many-glibcs.py. 2019-05-13 Joseph Myers * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_STATFS64): Only undefine if [__LINUX_KERNEL_VERSION < 0x050100]. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_STATX): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_STATX): Likewise. Reviewed-by: Adhemerval Zanella diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index f3298b234e..4a5d029c1d 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -22,9 +22,11 @@ #include_next -/* There never has been support for fstat64. */ -#undef __ASSUME_STATFS64 -#define __ASSUME_STATFS64 0 +/* Support for statfs64 was added in 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_STATFS64 +# define __ASSUME_STATFS64 0 +#endif /* Alpha used to define SysV ipc shmat syscall with a different name. */ #ifndef __NR_shmat diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h index 0f4948b8e0..333947931d 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -26,8 +26,10 @@ #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_ACCEPT4_SYSCALL 1 -/* No statx system call on ia64 yet. */ -#undef __ASSUME_STATX +/* Support for statx was added in 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_STATX +#endif #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE2 diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index 767df721b8..b11a5cb544 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -52,7 +52,9 @@ # undef __ASSUME_COPY_FILE_RANGE #endif -/* sh does not support the statx system call. */ -#undef __ASSUME_STATX +/* sh does not support the statx system call before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_STATX +#endif #endif