]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix __ASSUME_MLOCK2 for ARM, MicroBlaze (bug 23867).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 7 Nov 2018 16:27:35 +0000 (16:27 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 7 Nov 2018 16:27:35 +0000 (16:27 +0000)
The generic kernel-features.h defines __ASSUME_MLOCK2 for 4.4 and
later kernels.  However, for 32-bit ARM binaries running on 64-bit ARM
kernels, and for MicroBlaze, the syscall was only wired up in the 4.7
kernel.  (32-bit ARM kernels did have the syscall from 4.4 onwards.)
This patch duly arranges for the macro to be undefined for those
architectures for kernels before 4.7.

Tested with build-many-glibcs.py for its ARM and MicroBlaze
configurations.

[BZ #23867]
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_MLOCK2): Undefine.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_MLOCK2): Undefine.

ChangeLog
sysdeps/unix/sysv/linux/arm/kernel-features.h
sysdeps/unix/sysv/linux/microblaze/kernel-features.h

index 3dcf4b30b0c7cf98deee07f43ff7ae74f21437a3..b259e3a24e112e92b963b739029897d30a47a5d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-11-07  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #23867]
+       * sysdeps/unix/sysv/linux/arm/kernel-features.h
+       [__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_MLOCK2): Undefine.
+       * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+       [__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_MLOCK2): Undefine.
+
 2018-11-07  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * support/support_test_compare_string.c
index 7831ab1e0f8e63bdd378b4c5f86d9c5272a58989..c6e745227c853df8dcb089456fb4d5921d5129cb 100644 (file)
 #define __ASSUME_RECV_SYSCALL   1
 #define __ASSUME_SEND_SYSCALL  1
 
+/* Support for the mlock2 syscall was added to the compat syscall
+   table for 64-bit kernels in 4.7, although present in 32-bit kernels
+   from 4.4.  */
+#if __LINUX_KERNEL_VERSION < 0x040700
+# undef __ASSUME_MLOCK2
+#endif
+
 #undef __ASSUME_CLONE_DEFAULT
 #define __ASSUME_CLONE_BACKWARDS       1
index e8e2ac6a873126ac7bac1fe77db69e6edf37bc7c..dfee428f49f41b67170f9f0763138205f36d4a93 100644 (file)
 # undef __ASSUME_EXECVEAT
 #endif
 
+/* Support for the mlock2 syscall was added in 4.7.  */
+#if __LINUX_KERNEL_VERSION < 0x040700
+# undef __ASSUME_MLOCK2
+#endif
+
 /* Support for the copy_file_range syscall was added in 4.10.  */
 #if __LINUX_KERNEL_VERSION < 0x040A00
 # undef __ASSUME_COPY_FILE_RANGE