This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH-for-2.21-and-2.22] s390-64: remove socketcall syscalls
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 11 Jan 2016 17:20:50 +0100
- Subject: Re: [PATCH-for-2.21-and-2.22] s390-64: remove socketcall syscalls
- Authentication-results: sourceware.org; auth=none
- References: <1451010098-22120-1-git-send-email-aurelien at aurel32 dot net> <alpine dot DEB dot 2 dot 10 dot 1512311816490 dot 15940 at digraph dot polyomino dot org dot uk> <20151231211353 dot GH360 at aurel32 dot net> <20151231222845 dot GA12196 at aurel32 dot net>
On 12/31/2015 11:28 PM, Aurelien Jarno wrote:
I have found some times to investigate. It seems there is no issue, my
bad. I just discovered that on s390x, syscalls numbers above 256 are
actually a a call to syscall 0 with the syscall number passed in
register %r1. My version of strace was not aware of the new syscalls
and presented them as syscall setup(). Sorry for the false alert.
That's correct svc does only support NR up to 255 directly.
For 256 and above %r1=NR and svc 0 is needed.
The svc 0 with setup r1 works for NR < 256, too.
So it seems all is fine, but we still need the patch to use the
socketcall interface until we can assume the direct socket syscalls are
always available. I'll repost the patch on the libc-stable interface
with the comment fixed, as I have been told in the meantimes it's a
better list for discussing about already released versions.
On s390x the direct socket syscalls were introduced with kernel 4.3.
Before 4.3, the socket syscalls were always done with c-files in
sysdeps/unix/sysv/linux/.
The entries in syscalls.list were never used on s390x.
The upstream behaviour activates the direct socket calls if
__LINUX_KERNEL_VERSION >= 0x040300. Otherwise the
socketcall-wrapper-syscall is used.
If glibc is build on a system with kernel >= 4.3 and the entries in
syscalls.list, then those direct syscalls are generated
and those aren't available on kernels < 4.3.