]> sourceware.org Git - glibc.git/commitdiff
Adjust kernel-features.h defaults for recvmsg and sendmsg
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 15 Mar 2016 20:42:26 +0000 (17:42 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 25 May 2016 20:27:57 +0000 (17:27 -0300)
This patch removes the auto-generation for recvmsg and sendmsg syscall
and adjust the kernel-features.h for all architectures supported on
Linux.  This patch follows the idea of 'Adjust kernel-features.h defaults
for socket syscalls.' (35ade9f11b9007ee9683529f2d33698ff35255c8) by define
__ASSUME_SENDMSG_SYSCALL and __ASSUME_RECVMSG_SYSCALL as supported by
default and undefine it for the architecture that do not support it
directly.

The main rationale is to make is easier add code wrapper over the syscall
to fix BZ#16919 (recvmsg standard compliance).

Tested on x86_64, i686, aarch64, armhf, and powerpc64le.

* sysdeps/unix/sysv/linux/alpha/syscalls.list (recvmsg): Remove
from auto-generation.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/arm/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/generic/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/hppa/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (recvmsg):
Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list (recvmsg): Likewise.
(sendmsg): Likewise.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Remove.
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Undefine.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_SENDMSG_SYSCALL): Define.
(__ASSUME_RECVMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Remove.
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Undefine.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Remove.
[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
Undefine.
[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_SENDMSG_SYSCALL): Undefine.
(__ASSUME_RECVMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
(__ASSUME_SENDMSG_SYSCALL): Likewise.
(__ASSUME_RECVMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
(__ASSUME_SENDMSG_SYSCALL): Likewise.
(__ASSUME_RECVMSG_SYSCALL): Likewise.

16 files changed:
ChangeLog
sysdeps/unix/sysv/linux/alpha/syscalls.list
sysdeps/unix/sysv/linux/arm/syscalls.list
sysdeps/unix/sysv/linux/generic/syscalls.list
sysdeps/unix/sysv/linux/hppa/syscalls.list
sysdeps/unix/sysv/linux/i386/kernel-features.h
sysdeps/unix/sysv/linux/ia64/syscalls.list
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/m68k/kernel-features.h
sysdeps/unix/sysv/linux/microblaze/kernel-features.h
sysdeps/unix/sysv/linux/mips/syscalls.list
sysdeps/unix/sysv/linux/powerpc/kernel-features.h
sysdeps/unix/sysv/linux/s390/kernel-features.h
sysdeps/unix/sysv/linux/sh/kernel-features.h
sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
sysdeps/unix/sysv/linux/x86_64/syscalls.list

index 2a4cf832287d12a4502755184a1c30eb3ed66865..88954132f723bda190eecb7855e627399ab4dac4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+2016-05-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * sysdeps/unix/sysv/linux/alpha/syscalls.list (recvmsg): Remove
+       from auto-generation.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/arm/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/generic/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/hppa/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/ia64/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/mips/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (recvmsg):
+       Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/syscalls.list (recvmsg): Likewise.
+       (sendmsg): Likewise.
+       * sysdeps/unix/sysv/linux/i386/kernel-features.h
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Remove.
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Undefine.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       * sysdeps/unix/sysv/linux/kernel-features.h
+       (__ASSUME_SENDMSG_SYSCALL): Define.
+       (__ASSUME_RECVMSG_SYSCALL): Likewise.
+       * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Remove.
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Undefine.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       * sysdeps/unix/sysv/linux/s390/kernel-features.h
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Remove.
+       [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+       Undefine.
+       [__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+       Likewise.
+       * sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+       (__ASSUME_SENDMSG_SYSCALL): Undefine.
+       (__ASSUME_RECVMSG_SYSCALL): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+       (__ASSUME_SENDMSG_SYSCALL): Likewise.
+       (__ASSUME_RECVMSG_SYSCALL): Likewise.
+       * sysdeps/unix/sysv/linux/sh/kernel-features.h
+       (__ASSUME_SENDMSG_SYSCALL): Likewise.
+       (__ASSUME_RECVMSG_SYSCALL): Likewise.
+
 2016-05-25  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
 
        * stdlib/gen-tst-strtod-round.c: Add backslash to
index cad1fc362ef0eca9a4d680e777c9f611e7ebed83..0c9efcbdf1b774f9b010c27cf3a00ba7cada2211 100644 (file)
@@ -27,9 +27,7 @@ getsockopt    -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recv           -       recv            Ci:ibni __libc_recv     __recv recv
 recvfrom       -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
 send           -       send            Ci:ibni __libc_send     __send send
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
index c06954f82415f8ac40b5bb4549c61685327c3c80..82402b1ee991c4e220a951c3b0d534728f56e963 100644 (file)
@@ -43,9 +43,7 @@ getsockopt    -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recv           -       recv            Ci:ibni __libc_recv     __recv recv
 recvfrom       -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
 send           -       send            Ci:ibni __libc_send     __send send
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
index 4b2e74762f38fd933688b877eb90af37129049f7..5993ab4a4715977e11b1083f720d871edfa93d73 100644 (file)
@@ -28,5 +28,3 @@ recvfrom      -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 getsockopt     -       getsockopt      i:iiiBN __getsockopt    getsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
index d29c35866d4c0357338ca5e3e45984481bcc6b15..1f3dfb01e883d12637cfcd71d1821316862c7fe8 100644 (file)
@@ -24,9 +24,7 @@ getsockopt    -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recv           -       recv            Ci:ibni __libc_recv     __recv recv
 recvfrom       -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
 send           -       send            Ci:ibni __libc_send     __send send
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
index 45054f85b1fc7aeb52ac9d2c6e63ae47c8a47c2a..148963c36ce46a5acfa3f3322d8d103eafe1aa5b 100644 (file)
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -51,4 +49,6 @@
 
 #if __LINUX_KERNEL_VERSION < 0x040300
 # undef __ASSUME_ACCEPT4_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
index 8642bac15233874c382acba36c0489370e16b192..68b6c9ab8ae99149f7d5b1b0c0781e61b7bba357 100644 (file)
@@ -28,9 +28,7 @@ getsockopt    -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recv           -       recv            Ci:ibni __libc_recv     __recv recv
 recvfrom       -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
 send           -       send            Ci:ibni __libc_send     __send send
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
index 5a1b2040334a79b2753b8a3938ce591efd115a47..02c530b9e68899e59d71c20fcd9c56b6f394d3b6 100644 (file)
 # define __ASSUME_SENDMMSG_SYSCALL     1
 # define __ASSUME_SENDMMSG     1
 #endif
+
+/* On most architectures, most socket syscalls are supported for all
+   supported kernel versions, but on some socketcall architectures
+   separate syscalls were only added later.  */
+#define __ASSUME_SENDMSG_SYSCALL       1
+#define __ASSUME_RECVMSG_SYSCALL       1
index 646bc4b68047c3aec14977a862116bcdef0af45f..dec04f00462067b4f5abdb2c98c87bfcdcd0383b 100644 (file)
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -47,6 +45,8 @@
 # undef __ASSUME_ACCEPT4_SYSCALL
 # undef __ASSUME_RECVMMSG_SYSCALL
 # undef __ASSUME_SENDMMSG_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
 
 /* No support for PI futexes or robust mutexes before 3.10 for m68k.  */
index a331b9f3fa874bd05292c528bb410a599f5b7da1..6c7875c1644c3cfb9d82e48f35633ffef9f2f46f 100644 (file)
@@ -35,8 +35,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL      1
 #define __ASSUME_GETSOCKOPT_SYSCALL    1
 #define __ASSUME_SETSOCKOPT_SYSCALL    1
-#define __ASSUME_SENDMSG_SYSCALL       1
-#define __ASSUME_RECVMSG_SYSCALL       1
 
 /* Support for the accept4 and recvmmsg syscalls was added in 2.6.33.  */
 #define __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL      1
index db731b149ab940f9ed19b6c7810d9c2adb445a8a..cd946a0e4dc51e861d606d635e8c0586980d92fb 100644 (file)
@@ -21,9 +21,7 @@ getsockopt    -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recv           -       recv            Ci:ibni __libc_recv     __recv recv
 recvfrom       -       recvfrom        Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
 send           -       send            Ci:ibni __libc_send     __send send
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn __libc_sendto __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
index 38bb0bc3f97f67fb2dfe50436d2760be6bd97a44..996535f224ec834962b03a736976a6159f4c5371 100644 (file)
@@ -36,8 +36,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL      1
 #define __ASSUME_GETSOCKOPT_SYSCALL    1
 #define __ASSUME_SETSOCKOPT_SYSCALL    1
-#define __ASSUME_SENDMSG_SYSCALL       1
-#define __ASSUME_RECVMSG_SYSCALL       1
 
 /* The sendmmsg syscall was added for PowerPC in 3.0.  */
 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL      1
index a6f131be06000e0cf375e8671050235b3353a53e..b3edee4b62366695e03fa4edb69b8f08e0c79c92 100644 (file)
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -47,4 +45,6 @@
 # undef __ASSUME_ACCEPT4_SYSCALL
 # undef __ASSUME_RECVMMSG_SYSCALL
 # undef __ASSUME_SENDMMSG_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
index 9b4d1c2b2cf291e8958121e84616c0a81dfff88c..ad05fc39e161fde9167589652ca7dba9bd57c568 100644 (file)
@@ -36,8 +36,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL      1
 #define __ASSUME_GETSOCKOPT_SYSCALL    1
 #define __ASSUME_SETSOCKOPT_SYSCALL    1
-#define __ASSUME_SENDMSG_SYSCALL       1
-#define __ASSUME_RECVMSG_SYSCALL       1
 
 /* The sendmmsg syscall was added for SH in 3.0.  */
 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL      1
index 3d1c1daac92f71f4dd68185ce61d6a4e43998a97..eecd83742dc4de296641bf1ee5e3fd78494592af 100644 (file)
@@ -11,9 +11,7 @@ getsockopt    -       getsockopt      5       __getsockopt    getsockopt
 listen         -       listen          2       __listen        listen
 recv           -       recv            C:4     __libc_recv     __recv recv
 recvfrom       -       recvfrom        C:6     __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         C:3     __libc_recvmsg  __recvmsg recvmsg
 send           -       send            C:4     __libc_send     __send send
-sendmsg                -       sendmsg         C:3     __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          C:6     __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      5       __setsockopt    setsockopt
 shutdown       -       shutdown        2       __shutdown      shutdown
index 2e4135f50a50ce65aad2acb90c79ee7905b838a4..d09d101da5b8a91f6275f762d00102e35b7ae3bc 100644 (file)
@@ -26,8 +26,6 @@ getsockname   -       getsockname     i:ipp   __getsockname   getsockname
 getsockopt     -       getsockopt      i:iiiBN __getsockopt    getsockopt
 listen         -       listen          i:ii    __listen        listen
 recvfrom       -       recvfrom        Ci:ibniBN       __libc_recvfrom __recvfrom recvfrom
-recvmsg                -       recvmsg         Ci:ipi  __libc_recvmsg  __recvmsg recvmsg
-sendmsg                -       sendmsg         Ci:ipi  __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          Ci:ibnibn       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      i:iiibn __setsockopt    setsockopt
 shutdown       -       shutdown        i:ii    __shutdown      shutdown
This page took 0.182177 seconds and 5 git commands to generate.