arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1498566.patch

147e83
This patch is from the upstream release/2.20/master branch, which is a
147e83
backport containing only the syscalls.list changes in commit 016495b8 in
147e83
master.
147e83
147e83
commit adba20cf74bc6ea3910afe57d40ed755c92c2ddb
147e83
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
147e83
Date:   Thu Mar 3 08:24:18 2016 +0100
147e83
147e83
    S390: Do not use direct socket syscalls if build on kernels >= 4.3. [BZ #19682]
147e83
    
147e83
    Beginning with Linux 4.3, the kernel headers contain direct
147e83
    system call numbers __NR_socket etc. on s390x. On older kernels,
147e83
    the socket-multiplexer syscall __NR_socketcall was used.
147e83
    
147e83
    To enable these new syscalls, the patch
147e83
    "S390: Call direct system calls for socket operations."
147e83
    (https://sourceware.org/git/?p=glibc.git;a=commit;h=016495b818cb61df7d0d10e6db54074271b3e3a5)
147e83
    was applied upstream.
147e83
    
147e83
    If glibc 2.23 is configured with --enable-kernel=4.3 and newer,
147e83
    the direct socket syscalls are used.
147e83
    For older kernels, the socket-multiplexer syscall is used instead.
147e83
    
147e83
    In glibc 2.22 and earlier, this patch is not applied.
147e83
    If you build glibc on a kernel < 4.3, the socket-multiplexer
147e83
    syscall is used. But if you build glibc on kernel >= 4.3, the
147e83
    direct socket-syscalls are used. If you install this glibc on a
147e83
    kernel < 4.3, all socket operations will fail.
147e83
    See "Bug 19682 - s390x: Incorrect syscall definitions cause
147e83
    breakage with Linux 4.3 headers"
147e83
    (https://sourceware.org/bugzilla/show_bug.cgi?id=19682)
147e83
    The configure switch --enable-kernel does not influence this
147e83
    behaviour on older glibc-releases.
147e83
    
147e83
    The solution is to remove the direct socket-syscalls in
147e83
    sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
147e83
    (this patch) on older glibc-releases as it was done by the
147e83
    upstream patch, too. These entries were never used on s390x,
147e83
    but the c-files in sysdeps/unix/sysv/linux/.
147e83
    After this removal, the behaviour of the socket functions are
147e83
    not changed compared to the original glibc release version
147e83
    and the socket-multiplexer-syscall is always used.
147e83
147e83
Index: b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
147e83
===================================================================
147e83
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
147e83
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
147e83
@@ -14,22 +14,3 @@ shmget		-	shmget		i:iii	__shmget	shmget
147e83
 semop		-	semop		i:ipi	__semop		semop
147e83
 semget		-	semget		i:iii	__semget	semget
147e83
 semctl		-	semctl		i:iiii	__semctl	semctl
147e83
-
147e83
-# proper socket implementations:
147e83
-accept		-	accept		Ci:iBN	__libc_accept	__accept accept
147e83
-bind		-	bind		i:ipi	__bind		bind
147e83
-connect		-	connect		Ci:ipi	__libc_connect	__connect connect
147e83
-getpeername	-	getpeername	i:ipp	__getpeername	getpeername
147e83
-getsockname	-	getsockname	i:ipp	__getsockname	getsockname
147e83
-getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
147e83
-listen		-	listen		i:ii	__listen	listen
147e83
-recv		-	recv		Ci:ibni	__libc_recv	__recv recv
147e83
-recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
147e83
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
147e83
-send		-	send		Ci:ibni	__libc_send	__send send
147e83
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
147e83
-sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
147e83
-setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
147e83
-shutdown	-	shutdown	i:ii	__shutdown	shutdown
147e83
-socket		-	socket		i:iii	__socket	socket
147e83
-socketpair	-	socketpair	i:iiif	__socketpair	socketpair