This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v3 2/2] Use direct socket syscalls for new kernels on sparc
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-alpha at sourceware dot org
- Cc: "David S . Miller" <davem at davemloft dot net>, Aurelien Jarno <aurelien at aurel32 dot net>
- Date: Fri, 4 Mar 2016 18:50:49 +0100
- Subject: [PATCH v3 2/2] Use direct socket syscalls for new kernels on sparc
- Authentication-results: sourceware.org; auth=none
- References: <1457113849-16532-1-git-send-email-aurelien at aurel32 dot net>
All direct socket syscalls have been added in kernel version 4.4 for
SPARC32.
The 3 missing direct socket syscalls bind, listen and setsockopt have
been added in kernel version 4.4 for SPARC64. All others were already
present for SPARC64 in kernel versions 3.2 or earlier.
Changelog:
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_ACCEPT_SYSCALL): New macro.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_CONNECT_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_GETPEERNAME_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_GETSOCKNAME_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_GETSOCKOPT_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_RECV_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_RECVFROM_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_RECVMSG_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SENDMSG_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SENDTO_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SHUTDOWN_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SOCKET_SYSCALL): Likewise.
[ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
(ASSUME_SOCKETPAIR_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL):
Likewise.
---
ChangeLog | 35 +++++++++++++++++++++++++
sysdeps/unix/sysv/linux/sparc/kernel-features.h | 25 ++++++++++++++++++
2 files changed, 60 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 05277f9..32b1fc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,41 @@
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen,
send, setsockopt): Remove.
+ * sysdeps/unix/sysv/linux/sparc/kernel-features.h
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_ACCEPT_SYSCALL): New macro.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_CONNECT_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_GETPEERNAME_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_GETSOCKNAME_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_GETSOCKOPT_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_RECV_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_RECVFROM_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_RECVMSG_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SENDMSG_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SENDTO_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SHUTDOWN_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SOCKET_SYSCALL): Likewise.
+ [ __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400]
+ (ASSUME_SOCKETPAIR_SYSCALL): Likewise.
+ [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL):
+ Likewise.
+ [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL):
+ Likewise.
+ [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL):
+ Likewise.
2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index 3a7baa7..25e7434 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -32,6 +32,31 @@
#define __ASSUME_SENDMMSG_SYSCALL 1
#define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL 1
+/* Direct socketcalls available for SPARC64 in 3.2 and for SPARC32 in 4.4. */
+#if __arch64__ || __LINUX_KERNEL_VERSION >= 0x040400
+# define __ASSUME_ACCEPT_SYSCALL 1
+# define __ASSUME_CONNECT_SYSCALL 1
+# define __ASSUME_GETPEERNAME_SYSCALL 1
+# define __ASSUME_GETSOCKNAME_SYSCALL 1
+# define __ASSUME_GETSOCKOPT_SYSCALL 1
+# define __ASSUME_RECV_SYSCALL 1
+# define __ASSUME_RECVFROM_SYSCALL 1
+# define __ASSUME_RECVMSG_SYSCALL 1
+# define __ASSUME_SENDMSG_SYSCALL 1
+# define __ASSUME_SENDTO_SYSCALL 1
+# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
+# define __ASSUME_SHUTDOWN_SYSCALL 1
+# define __ASSUME_SOCKET_SYSCALL 1
+# define __ASSUME_SOCKETPAIR_SYSCALL 1
+#endif
+
+/* Direct socketcalls available for SPARC32 and for SPARC64 in 4.4. */
+#if __LINUX_KERNEL_VERSION >= 0x040400
+# define __ASSUME_BIND_SYSCALL 1
+# define __ASSUME_LISTEN_SYSCALL 1
+# define __ASSUME_SETSOCKOPT_SYSCALL 1
+#endif
+
#include_next <kernel-features.h>
/* 32-bit SPARC kernels do not support
--
2.7.0