olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1498566.patch

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