aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-03-15 17:42:26 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-05-25 17:27:57 -0300
commitabf29edd4a3918d80822e19b306aca004b84c21c (patch)
treecba047de5726e0cbcdc069467963e8062ad779c9 /sysdeps
parent1ced34c00a0aa26dca5aab811a967c1e52c33fe9 (diff)
downloadglibc-abf29edd4a3918d80822e19b306aca004b84c21c.zip
glibc-abf29edd4a3918d80822e19b306aca004b84c21c.tar.gz
glibc-abf29edd4a3918d80822e19b306aca004b84c21c.tar.bz2
Adjust kernel-features.h defaults for recvmsg and sendmsg
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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/arm/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/generic/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/i386/kernel-features.h4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/kernel-features.h4
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/kernel-features.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/kernel-features.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/kernel-features.h4
-rw-r--r--sysdeps/unix/sysv/linux/sh/kernel-features.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/syscalls.list2
15 files changed, 12 insertions, 28 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index cad1fc3..0c9efcb 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index c06954f..82402b1 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list
index 4b2e747..5993ab4 100644
--- a/sysdeps/unix/sysv/linux/generic/syscalls.list
+++ b/sysdeps/unix/sysv/linux/generic/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index d29c358..1f3dfb0 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
index 45054f8..148963c 100644
--- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
@@ -40,10 +40,8 @@
# 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
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 8642bac..68b6c9a 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 5a1b204..02c530b 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -145,3 +145,9 @@
# 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
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 646bc4b..dec04f0 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -34,10 +34,8 @@
# 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. */
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index a331b9f..6c7875c 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index db731b1..cd946a0 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
index 38bb0bc..996535f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
@@ -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
diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
index a6f131b..b3edee4 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
@@ -34,10 +34,8 @@
# 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
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index 9b4d1c2..ad05fc3 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -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
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index 3d1c1da..eecd837 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -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
diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
index 2e4135f..d09d101 100644
--- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
@@ -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