diff --git a/valgrind-3.11.0-s390-separate-socketcalls.patch b/valgrind-3.11.0-s390-separate-socketcalls.patch new file mode 100644 index 0000000..96e0ef6 --- /dev/null +++ b/valgrind-3.11.0-s390-separate-socketcalls.patch @@ -0,0 +1,79 @@ +commit d9201968186f799b9a2c0793a29029819372a072 +Author: mjw +Date: Tue Feb 23 15:19:49 2016 +0000 + + Bug 359703 s390: wire up separate socketcalls system calls + + The linux 4.3 s390 kernel has separate system calls that were originally + hidden behind the socketcall multiplexer system call. Newer glibc versions + will use these direct system calls instead of socketcall when available. + Causing several regtest failures. + + This fix simply wires up the split out system calls directly to the + existing syswrap handlers for s390. + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15802 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c +index e919b8f..0513789 100644 +--- a/coregrind/m_syswrap/syswrap-s390x-linux.c ++++ b/coregrind/m_syswrap/syswrap-s390x-linux.c +@@ -1051,7 +1051,25 @@ static SyscallTableEntry syscall_table[] = { + // ?????(__NR_seccomp, ), // 348 + LINXY(__NR_getrandom, sys_getrandom), // 349 + +- LINXY(__NR_memfd_create, sys_memfd_create) // 350 ++ LINXY(__NR_memfd_create, sys_memfd_create), // 350 ++ ++ LINXY(__NR_recvmmsg, sys_recvmmsg), // 357 ++ LINXY(__NR_sendmmsg, sys_sendmmsg), // 358 ++ LINXY(__NR_socket, sys_socket), // 359 ++ LINXY(__NR_socketpair, sys_socketpair), // 360 ++ LINX_(__NR_bind, sys_bind), // 361 ++ LINX_(__NR_connect, sys_connect), // 362 ++ LINX_(__NR_listen, sys_listen), // 363 ++ LINXY(__NR_accept4, sys_accept4), // 364 ++ LINXY(__NR_getsockopt, sys_getsockopt), // 365 ++ LINX_(__NR_setsockopt, sys_setsockopt), // 366 ++ LINXY(__NR_getsockname, sys_getsockname), // 367 ++ LINXY(__NR_getpeername, sys_getpeername), // 368 ++ LINX_(__NR_sendto, sys_sendto), // 369 ++ LINX_(__NR_sendmsg, sys_sendmsg), // 270 ++ LINXY(__NR_recvfrom, sys_recvfrom), // 371 ++ LINXY(__NR_recvmsg, sys_recvmsg), // 372 ++ LINX_(__NR_shutdown, sys_shutdown) // 373 + }; + + SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) +diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h +index 2a4a8f1..0187045 100644 +--- a/include/vki/vki-scnums-s390x-linux.h ++++ b/include/vki/vki-scnums-s390x-linux.h +@@ -316,7 +316,26 @@ + #define __NR_seccomp 348 + #define __NR_getrandom 349 + #define __NR_memfd_create 350 +-#define NR_syscalls 351 ++ ++#define __NR_recvmmsg 357 ++#define __NR_sendmmsg 358 ++#define __NR_socket 359 ++#define __NR_socketpair 360 ++#define __NR_bind 361 ++#define __NR_connect 362 ++#define __NR_listen 363 ++#define __NR_accept4 364 ++#define __NR_getsockopt 365 ++#define __NR_setsockopt 366 ++#define __NR_getsockname 367 ++#define __NR_getpeername 368 ++#define __NR_sendto 369 ++#define __NR_sendmsg 370 ++#define __NR_recvfrom 371 ++#define __NR_recvmsg 372 ++#define __NR_shutdown 373 ++ ++#define NR_syscalls 374 + + /* + * There are some system calls that are not present on 64 bit, some diff --git a/valgrind.spec b/valgrind.spec index fa56aeb..4f1e2ad 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -108,6 +108,9 @@ Patch19: valgrind-3.11.0-futex.patch # KDE#359289 s390: Implement popcnt insn. Patch20: valgrind-3.11.0-s390x-popcnt.patch +# KDE#359703 s390: wire up separate socketcalls system calls +Patch21: valgrind-3.11.0-s390-separate-socketcalls.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -232,6 +235,7 @@ Valgrind User Manual for details. %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -424,6 +428,9 @@ echo ===============END TESTING=============== %endif %changelog +* Tue Feb 23 2016 Mark Wielaard +- Add valgrind-3.11.0-s390-separate-socketcalls.patch + * Thu Feb 18 2016 Mark Wielaard - 3.11.0-14 - Update valgrind-3.11.0-futex.patch (fix helgrind/drd regression). - Update valgrind-3.11.0-x86_unwind.patch (include amd64 fix).