Mark Wielaard a43768
commit d9201968186f799b9a2c0793a29029819372a072
Mark Wielaard a43768
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Mark Wielaard a43768
Date:   Tue Feb 23 15:19:49 2016 +0000
Mark Wielaard a43768
Mark Wielaard a43768
    Bug 359703 s390: wire up separate socketcalls system calls
Mark Wielaard a43768
    
Mark Wielaard a43768
    The linux 4.3 s390 kernel has separate system calls that were originally
Mark Wielaard a43768
    hidden behind the socketcall multiplexer system call. Newer glibc versions
Mark Wielaard a43768
    will use these direct system calls instead of socketcall when available.
Mark Wielaard a43768
    Causing several regtest failures.
Mark Wielaard a43768
    
Mark Wielaard a43768
    This fix simply wires up the split out system calls directly to the
Mark Wielaard a43768
    existing syswrap handlers for s390.
Mark Wielaard a43768
    
Mark Wielaard a43768
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15802 a5019735-40e9-0310-863c-91ae7b9d1cf9
Mark Wielaard a43768
Mark Wielaard a43768
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
Mark Wielaard a43768
index e919b8f..0513789 100644
Mark Wielaard a43768
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
Mark Wielaard a43768
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
Mark Wielaard a43768
@@ -1051,7 +1051,25 @@ static SyscallTableEntry syscall_table[] = {
Mark Wielaard a43768
 // ?????(__NR_seccomp, ),                                             // 348
Mark Wielaard a43768
    LINXY(__NR_getrandom, sys_getrandom),                              // 349
Mark Wielaard a43768
 
Mark Wielaard a43768
-   LINXY(__NR_memfd_create, sys_memfd_create)                         // 350
Mark Wielaard a43768
+   LINXY(__NR_memfd_create, sys_memfd_create),                        // 350
Mark Wielaard a43768
+
Mark Wielaard a43768
+   LINXY(__NR_recvmmsg, sys_recvmmsg),                                // 357
Mark Wielaard a43768
+   LINXY(__NR_sendmmsg, sys_sendmmsg),                                // 358
Mark Wielaard a43768
+   LINXY(__NR_socket, sys_socket),                                    // 359
Mark Wielaard a43768
+   LINXY(__NR_socketpair, sys_socketpair),                            // 360
Mark Wielaard a43768
+   LINX_(__NR_bind, sys_bind),                                        // 361
Mark Wielaard a43768
+   LINX_(__NR_connect, sys_connect),                                  // 362
Mark Wielaard a43768
+   LINX_(__NR_listen, sys_listen),                                    // 363
Mark Wielaard a43768
+   LINXY(__NR_accept4, sys_accept4),                                  // 364
Mark Wielaard a43768
+   LINXY(__NR_getsockopt, sys_getsockopt),                            // 365
Mark Wielaard a43768
+   LINX_(__NR_setsockopt, sys_setsockopt),                            // 366
Mark Wielaard a43768
+   LINXY(__NR_getsockname, sys_getsockname),                          // 367
Mark Wielaard a43768
+   LINXY(__NR_getpeername, sys_getpeername),                          // 368
Mark Wielaard a43768
+   LINX_(__NR_sendto, sys_sendto),                                    // 369
Mark Wielaard a43768
+   LINX_(__NR_sendmsg, sys_sendmsg),                                  // 270
Mark Wielaard a43768
+   LINXY(__NR_recvfrom, sys_recvfrom),                                // 371
Mark Wielaard a43768
+   LINXY(__NR_recvmsg, sys_recvmsg),                                  // 372
Mark Wielaard a43768
+   LINX_(__NR_shutdown, sys_shutdown)                                 // 373
Mark Wielaard a43768
 };
Mark Wielaard a43768
 
Mark Wielaard a43768
 SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
Mark Wielaard a43768
diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h
Mark Wielaard a43768
index 2a4a8f1..0187045 100644
Mark Wielaard a43768
--- a/include/vki/vki-scnums-s390x-linux.h
Mark Wielaard a43768
+++ b/include/vki/vki-scnums-s390x-linux.h
Mark Wielaard a43768
@@ -316,7 +316,26 @@
Mark Wielaard a43768
 #define __NR_seccomp		348
Mark Wielaard a43768
 #define __NR_getrandom		349
Mark Wielaard a43768
 #define __NR_memfd_create	350
Mark Wielaard a43768
-#define NR_syscalls 351
Mark Wielaard a43768
+
Mark Wielaard a43768
+#define __NR_recvmmsg		357
Mark Wielaard a43768
+#define __NR_sendmmsg		358
Mark Wielaard a43768
+#define __NR_socket		359
Mark Wielaard a43768
+#define __NR_socketpair		360
Mark Wielaard a43768
+#define __NR_bind		361
Mark Wielaard a43768
+#define __NR_connect		362
Mark Wielaard a43768
+#define __NR_listen		363
Mark Wielaard a43768
+#define __NR_accept4		364
Mark Wielaard a43768
+#define __NR_getsockopt		365
Mark Wielaard a43768
+#define __NR_setsockopt		366
Mark Wielaard a43768
+#define __NR_getsockname	367
Mark Wielaard a43768
+#define __NR_getpeername	368
Mark Wielaard a43768
+#define __NR_sendto		369
Mark Wielaard a43768
+#define __NR_sendmsg		370
Mark Wielaard a43768
+#define __NR_recvfrom		371
Mark Wielaard a43768
+#define __NR_recvmsg		372
Mark Wielaard a43768
+#define __NR_shutdown		373
Mark Wielaard a43768
+
Mark Wielaard a43768
+#define NR_syscalls 374
Mark Wielaard a43768
 
Mark Wielaard a43768
 /* 
Mark Wielaard a43768
  * There are some system calls that are not present on 64 bit, some