From e5a5315e2d290fe34e0fb80996c713b8b802dcc9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 9 Dec 2015 20:59:43 +0000 Subject: Use direct socket syscalls for new kernels on i386, m68k, microblaze, sh. Now that we have __ASSUME_* macros for direct socket syscalls to use them instead of socketcall when they can be assumed to be available on socketcall architectures, this patch defines those macros when appropriate for i386, m68k, microblaze and sh (for 4.3, 4.3, all supported kernels and 2.6.37, respectively; the only use of socketcall support on microblaze is it allows accept4 and sendmmsg to be supported on a wider range of kernel versions). David, it seems that 32-bit SPARC is the only architecture supported by glibc that still lacks these direct syscalls. It would be good to get them added to the SPARC kernel so we can eventually eliminate socketcall support in glibc (and thereby just use entries in sysdeps/unix/syscalls.list for most of these functions) when we can assume new-enough kernels. Tested for i386 (testsuite, and that installed shared libraries are unchanged by this patch - not using a new enough kernel, so this doesn't actually test much, but the i386 and m68k code is essentially the same as that already in use for s390). * sysdeps/unix/sysv/linux/i386/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKET_SYSCALL): New macro. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_BIND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_CONNECT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_LISTEN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETPEERNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SHUTDOWN_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKET_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_BIND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_CONNECT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_LISTEN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_GETPEERNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SHUTDOWN_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_SOCKET_SYSCALL): Likewise. (__ASSUME_BIND_SYSCALL): Likewise. (__ASSUME_CONNECT_SYSCALL): Likewise. (__ASSUME_LISTEN_SYSCALL): Likewise. (__ASSUME_ACCEPT_SYSCALL): Likewise. (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. (__ASSUME_GETPEERNAME_SYSCALL): Likewise. (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. (__ASSUME_SEND_SYSCALL): Likewise. (__ASSUME_SENDTO_SYSCALL): Likewise. (__ASSUME_RECV_SYSCALL): Likewise. (__ASSUME_RECVFROM_SYSCALL): Likewise. (__ASSUME_SHUTDOWN_SYSCALL): Likewise. (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. (__ASSUME_SENDMSG_SYSCALL): Likewise. (__ASSUME_RECVMSG_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SOCKET_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_BIND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_CONNECT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_LISTEN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_ACCEPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_GETPEERNAME_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SEND_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SENDTO_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECV_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECVFROM_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SHUTDOWN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SENDMSG_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECVMSG_SYSCALL): Likewise. --- ChangeLog | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3ead583031..b2eddff236 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,137 @@ +2015-12-09 Joseph Myers + + * sysdeps/unix/sysv/linux/i386/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKET_SYSCALL): + New macro. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_BIND_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_CONNECT_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_LISTEN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETPEERNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SHUTDOWN_SYSCALL): + Likewise. + * sysdeps/unix/sysv/linux/m68k/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SOCKET_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_BIND_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_CONNECT_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_LISTEN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_ACCEPT4_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_GETPEERNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDTO_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVFROM_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] + (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SHUTDOWN_SYSCALL): + Likewise. + * sysdeps/unix/sysv/linux/microblaze/kernel-features.h + (__ASSUME_SOCKET_SYSCALL): Likewise. + (__ASSUME_BIND_SYSCALL): Likewise. + (__ASSUME_CONNECT_SYSCALL): Likewise. + (__ASSUME_LISTEN_SYSCALL): Likewise. + (__ASSUME_ACCEPT_SYSCALL): Likewise. + (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. + (__ASSUME_GETPEERNAME_SYSCALL): Likewise. + (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. + (__ASSUME_SEND_SYSCALL): Likewise. + (__ASSUME_SENDTO_SYSCALL): Likewise. + (__ASSUME_RECV_SYSCALL): Likewise. + (__ASSUME_RECVFROM_SYSCALL): Likewise. + (__ASSUME_SHUTDOWN_SYSCALL): Likewise. + (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. + (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. + (__ASSUME_SENDMSG_SYSCALL): Likewise. + (__ASSUME_RECVMSG_SYSCALL): Likewise. + * sysdeps/unix/sysv/linux/sh/kernel-features.h + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SOCKET_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_BIND_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_CONNECT_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_LISTEN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_ACCEPT_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] + (__ASSUME_GETSOCKNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] + (__ASSUME_GETPEERNAME_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] + (__ASSUME_SOCKETPAIR_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SEND_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SENDTO_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECV_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECVFROM_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SHUTDOWN_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] + (__ASSUME_GETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] + (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_SENDMSG_SYSCALL): + Likewise. + [__LINUX_KERNEL_VERSION >= 0x020625] (__ASSUME_RECVMSG_SYSCALL): + Likewise. + 2015-12-09 Aurelien Jarno * sysdeps/unix/sysv/linux/mips/configure.ac (has-mpf64): Define to -- cgit v1.2.3