Correct SH kernel-features.h undefines (bug 23862)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Correct SH kernel-features.h undefines (bug 23862)

Joseph Myers
The SH kernel-features.h undefines __ASSUME_RENAMEAT2 for kernel
versions before 4.8, but fails to undefine __ASSUME_EXECVEAT,
__ASSUME_MLOCK2 and __ASSUME_COPY_FILE_RANGE, although all those
syscalls (and several others) were added for SH in the same Linux
kernel commit (first released in 4.8).  This patch adds the proper
undefines of those macros.

Tested with build-many-glibcs.py for its SH configurations.

2018-11-06  Joseph Myers  <[hidden email]>

        [BZ #23862]
        * sysdeps/unix/sysv/linux/sh/kernel-features.h
        [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_EXECVEAT): Undefine.
        [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_MLOCK2): Likewise.
        [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_COPY_FILE_RANGE):
        Likewise.

diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index b8ccb01518..60b6a8126b 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -51,9 +51,12 @@
 /* sh only supports ipc syscall.  */
 #undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
 
-/* Support for the renameat2 syscall was added in 4.8.  */
+/* Support for several syscalls was added in 4.8.  */
 #if __LINUX_KERNEL_VERSION < 0x040800
 # undef __ASSUME_RENAMEAT2
+# undef __ASSUME_EXECVEAT
+# undef __ASSUME_MLOCK2
+# undef __ASSUME_COPY_FILE_RANGE
 #endif
 
 /* sh does not support the statx system call.  */

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Correct SH kernel-features.h undefines (bug 23862)

Florian Weimer-5
* Joseph Myers:

> [BZ #23862]
> * sysdeps/unix/sysv/linux/sh/kernel-features.h
> [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_EXECVEAT): Undefine.
> [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_MLOCK2): Likewise.
> [__LINUX_KERNEL_VERSION < 0x040800] (__ASSUME_COPY_FILE_RANGE):
> Likewise.

This looks okay based on this kernel commit:

commit 74bdaa611fa69368fb4032ad437af073d31116bd
Author: Yoshinori Sato <[hidden email]>
Date:   Tue Jun 28 15:49:46 2016 +0900

    sh: system call wire up

Thanks,
Florian