about summary refs log tree commit diff
path: root/elf/sln.c
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2016-03-03 08:17:09 +0100
committerMike Frysinger <vapier@gentoo.org>2016-03-07 11:45:13 -0500
commit1fd66a522e9262d7ff36b015090f3989f93ba468 (patch)
treecde65542c008273af16022d4b0a93104cb037d0d /elf/sln.c
parent78b80a22769f07fcd83763d5b8b3625fe4920574 (diff)
downloadglibc-1fd66a522e9262d7ff36b015090f3989f93ba468.tar.gz
glibc-1fd66a522e9262d7ff36b015090f3989f93ba468.tar.xz
glibc-1fd66a522e9262d7ff36b015090f3989f93ba468.zip
S390: Do not use direct socket syscalls if build on kernels >= 4.3. [BZ #19682]
Beginning with Linux 4.3, the kernel headers contain direct
system call numbers __NR_socket etc. on s390x. On older kernels,
the socket-multiplexer syscall __NR_socketcall was used.

To enable these new syscalls, the patch
"S390: Call direct system calls for socket operations."
(https://sourceware.org/git/?p=glibc.git;a=commit;h=016495b818cb61df7d0d10e6db54074271b3e3a5)
was applied upstream.

If glibc 2.23 is configured with --enable-kernel=4.3 and newer,
the direct socket syscalls are used.
For older kernels, the socket-multiplexer syscall is used instead.

In glibc 2.22 and earlier, this patch is not applied.
If you build glibc on a kernel < 4.3, the socket-multiplexer
syscall is used. But if you build glibc on kernel >= 4.3, the
direct socket-syscalls are used. If you install this glibc on a
kernel < 4.3, all socket operations will fail.
See "Bug 19682 - s390x: Incorrect syscall definitions cause
breakage with Linux 4.3 headers"
(https://sourceware.org/bugzilla/show_bug.cgi?id=19682)
The configure switch --enable-kernel does not influence this
behaviour on older glibc-releases.

The solution is to remove the direct socket-syscalls in
sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
(this patch) on older glibc-releases as it was done by the
upstream patch, too. These entries were never used on s390x,
but the c-files in sysdeps/unix/sysv/linux/.
After this removal, the behaviour of the socket functions are
not changed compared to the original glibc release version
and the socket-multiplexer-syscall is always used.

(cherry picked from commit 425c48c217ef93c2c4f81f9f3bb2fdba096877a2)
Diffstat (limited to 'elf/sln.c')
0 files changed, 0 insertions, 0 deletions