* [PATCH v2 1/2] sparc64: remove bind, listen and setsockopt from syscalls.list
2016-03-02 8:25 [PATCH v2 0/2] sparc64: fix socket syscalls with recent kernel headers Aurelien Jarno
2016-03-02 8:25 ` [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc Aurelien Jarno
@ 2016-03-02 8:25 ` Aurelien Jarno
1 sibling, 0 replies; 6+ messages in thread
From: Aurelien Jarno @ 2016-03-02 8:25 UTC (permalink / raw)
To: libc-alpha; +Cc: David S . Miller, Aurelien Jarno
The bind, listen and setsockopt syscalls have recently been added in
kernel 4.4. They should therefore not appear in syscalls.list as it
means they are use inconditionally instead of possibly using the
the socketcall fallback.
All other syscalls from syscalls.list with an equivalent socketcall
version are available in kernel 3.2, which is the required minimum.
Changelog:
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen,
setsockopt): Remove.
---
ChangeLog | 5 +++++
sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list | 3 ---
2 files changed, 5 insertions(+), 3 deletions(-)
I plan to backport this change into version 2.21, 2.22 and 2.23. I can
also backport it to older versions if requested.
diff --git a/ChangeLog b/ChangeLog
index 787fef1..f01786b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-02 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen,
+ setsockopt): Remove.
+
2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/_mcount.S (C_LABEL(_mcount)): Call
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index 3d1c1da..cf18eb4 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -3,18 +3,15 @@
# Override select.S in parent directory:
select - select C:5 __select select
accept - accept C:3 __libc_accept __accept accept
-bind - bind 3 __bind bind
connect - connect C:3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
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
socketpair - socketpair 4 __socketpair socketpair
--
2.7.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc
2016-03-02 8:25 [PATCH v2 0/2] sparc64: fix socket syscalls with recent kernel headers Aurelien Jarno
@ 2016-03-02 8:25 ` Aurelien Jarno
2016-03-02 14:53 ` Joseph Myers
2016-03-02 8:25 ` [PATCH v2 1/2] sparc64: remove bind, listen and setsockopt from syscalls.list Aurelien Jarno
1 sibling, 1 reply; 6+ messages in thread
From: Aurelien Jarno @ 2016-03-02 8:25 UTC (permalink / raw)
To: libc-alpha; +Cc: David S . Miller, Aurelien Jarno
Direct socket syscalls have been added in kernel 4.4 on sparc for
bind, listen and setsockopt. Other direct socket syscalls were present
before kernel 3.2 and are listed directly in syscalls.list, so there is
no need to add them there.
Changelog:
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL):
New macro.
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL):
Likewise.
---
ChangeLog | 7 +++++++
sysdeps/unix/sysv/linux/sparc/kernel-features.h | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f01786b..65aef07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen,
setsockopt): Remove.
+ * sysdeps/unix/sysv/linux/sparc/kernel-features.h
+ [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL):
+ New macro.
+ [__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..6a40cfc 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -32,6 +32,13 @@
#define __ASSUME_SENDMMSG_SYSCALL 1
#define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL 1
+/* Direct socketcalls available for SPARC 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 0/2] sparc64: fix socket syscalls with recent kernel headers
@ 2016-03-02 8:25 Aurelien Jarno
2016-03-02 8:25 ` [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc Aurelien Jarno
2016-03-02 8:25 ` [PATCH v2 1/2] sparc64: remove bind, listen and setsockopt from syscalls.list Aurelien Jarno
0 siblings, 2 replies; 6+ messages in thread
From: Aurelien Jarno @ 2016-03-02 8:25 UTC (permalink / raw)
To: libc-alpha; +Cc: David S . Miller, Aurelien Jarno
This patch series fixes the GNU libc on sparc64 to not use direct socket
syscalls when used built against 4.4+ kernel headers and using
--enable-kernel with a version lower than 4.4.
Patch 1 has already been posted, I just added a comment about backporting
Patch 2 is new
Aurelien Jarno (2):
sparc64: remove bind, listen and setsockopt from syscalls.list
Use direct socket syscalls for new kernels on sparc
ChangeLog | 12 ++++++++++++
sysdeps/unix/sysv/linux/sparc/kernel-features.h | 7 +++++++
sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list | 3 ---
3 files changed, 19 insertions(+), 3 deletions(-)
--
2.7.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc
2016-03-02 8:25 ` [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc Aurelien Jarno
@ 2016-03-02 14:53 ` Joseph Myers
2016-03-03 7:58 ` Aurelien Jarno
0 siblings, 1 reply; 6+ messages in thread
From: Joseph Myers @ 2016-03-02 14:53 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: libc-alpha, David S . Miller
On Wed, 2 Mar 2016, Aurelien Jarno wrote:
> Direct socket syscalls have been added in kernel 4.4 on sparc for
> bind, listen and setsockopt. Other direct socket syscalls were present
> before kernel 3.2 and are listed directly in syscalls.list, so there is
> no need to add them there.
Listed directly in syscalls.list for sparc64. Don't they need __ASSUME_*
adding for sparc32?
(In a few years' time we'll be able to assume 4.4 everywhere, eliminate
all socketcall support and use entries in sysdeps/unix/syscalls.list for
many of these syscalls.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc
2016-03-02 14:53 ` Joseph Myers
@ 2016-03-03 7:58 ` Aurelien Jarno
2016-03-03 22:42 ` Joseph Myers
0 siblings, 1 reply; 6+ messages in thread
From: Aurelien Jarno @ 2016-03-03 7:58 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, David S . Miller
On 2016-03-02 14:52, Joseph Myers wrote:
> On Wed, 2 Mar 2016, Aurelien Jarno wrote:
>
> > Direct socket syscalls have been added in kernel 4.4 on sparc for
> > bind, listen and setsockopt. Other direct socket syscalls were present
> > before kernel 3.2 and are listed directly in syscalls.list, so there is
> > no need to add them there.
>
> Listed directly in syscalls.list for sparc64. Don't they need __ASSUME_*
> adding for sparc32?
Yes, I think they need that. I looked at the exact list, and it seems
that the send syscall is not provided on sparc. Does it means we should
also define __ASSUME_SENDTO_FOR_SEND_SYSCALL and remove it from
syscalls.list?
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc
2016-03-03 7:58 ` Aurelien Jarno
@ 2016-03-03 22:42 ` Joseph Myers
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Myers @ 2016-03-03 22:42 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: libc-alpha, David S . Miller
On Thu, 3 Mar 2016, Aurelien Jarno wrote:
> On 2016-03-02 14:52, Joseph Myers wrote:
> > On Wed, 2 Mar 2016, Aurelien Jarno wrote:
> >
> > > Direct socket syscalls have been added in kernel 4.4 on sparc for
> > > bind, listen and setsockopt. Other direct socket syscalls were present
> > > before kernel 3.2 and are listed directly in syscalls.list, so there is
> > > no need to add them there.
> >
> > Listed directly in syscalls.list for sparc64. Don't they need __ASSUME_*
> > adding for sparc32?
>
> Yes, I think they need that. I looked at the exact list, and it seems
> that the send syscall is not provided on sparc. Does it means we should
> also define __ASSUME_SENDTO_FOR_SEND_SYSCALL and remove it from
> syscalls.list?
If the non-socketcall way of implementing a socket function on a given
architecture involves use of a different syscall, then the appropriate one
of __ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL, __ASSUME_SENDTO_FOR_SEND_SYSCALL,
__ASSUME_RECVFROM_FOR_RECV_SYSCALL should be defined under the relevant
conditions for the syscall in question to be available (and there should
not be a syscalls.list entry for the syscall that does not exist). I have
not reviewed exactly what is right for sparc32 and sparc64 in this regard.
>
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-03 22:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 8:25 [PATCH v2 0/2] sparc64: fix socket syscalls with recent kernel headers Aurelien Jarno
2016-03-02 8:25 ` [PATCH v2 2/2] Use direct socket syscalls for new kernels on sparc Aurelien Jarno
2016-03-02 14:53 ` Joseph Myers
2016-03-03 7:58 ` Aurelien Jarno
2016-03-03 22:42 ` Joseph Myers
2016-03-02 8:25 ` [PATCH v2 1/2] sparc64: remove bind, listen and setsockopt from syscalls.list Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).