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.
+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
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
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
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
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
# 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
#if __LINUX_KERNEL_VERSION < 0x040300
# undef __ASSUME_ACCEPT4_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
#endif
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
# 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
# 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
# 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. */
#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
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
#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
# 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
# undef __ASSUME_ACCEPT4_SYSCALL
# undef __ASSUME_RECVMMSG_SYSCALL
# undef __ASSUME_SENDMMSG_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
#endif
#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
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
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