Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
Mark Wielaard d893a2
index 4a8d7e1..d093974 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
Mark Wielaard d893a2
@@ -305,6 +305,10 @@ extern void ML_(linux_POST_sys_msgctl)     ( TId, UW, UW, UW, UW );
Mark Wielaard d893a2
 extern void ML_(linux_PRE_sys_getsockopt)  ( TId, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
 extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
 extern void ML_(linux_PRE_sys_setsockopt)  ( TId, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
+extern void ML_(linux_PRE_sys_recvmmsg)    ( TId, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
+extern void ML_(linux_POST_sys_recvmmsg)   ( TId, UW, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
+extern void ML_(linux_PRE_sys_sendmmsg)    ( TId, UW, UW, UW, UW );
Mark Wielaard d893a2
+extern void ML_(linux_POST_sys_sendmmsg)   ( TId, UW, UW, UW, UW, UW );
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 // Linux-specific (but non-arch-specific) ptrace wrapper helpers
Mark Wielaard d893a2
 extern void ML_(linux_PRE_getregset) ( ThreadId, long, long );
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
Mark Wielaard d893a2
index 16df075..10c1fc2 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-linux.c
Mark Wielaard d893a2
@@ -4063,6 +4063,20 @@ PRE(sys_socketcall)
Mark Wielaard d893a2
       ML_(generic_PRE_sys_recvmsg)( tid, "msg", (struct vki_msghdr *)ARG2_1 );
Mark Wielaard d893a2
       break;
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   case VKI_SYS_RECVMMSG:
Mark Wielaard d893a2
+      /* int recvmmsg(int s, struct mmsghdr *mmsg, int vlen, int flags,
Mark Wielaard d893a2
+                      struct timespec *timeout); */
Mark Wielaard d893a2
+      PRE_MEM_READ_ef("socketcall.recvmmsg(args)", ARG2, 5*sizeof(Addr) );
Mark Wielaard d893a2
+      ML_(linux_PRE_sys_recvmmsg)( tid, ARG2_0, ARG2_1, ARG2_2, ARG2_3,
Mark Wielaard d893a2
+                                   ARG2_4 );
Mark Wielaard d893a2
+      break;
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+   case VKI_SYS_SENDMMSG:
Mark Wielaard d893a2
+      /* int sendmmsg(int s, struct mmsghdr *mmsg, int vlen, int flags); */
Mark Wielaard d893a2
+      PRE_MEM_READ_ef("socketcall.sendmmsg(args)", ARG2, 4*sizeof(Addr) );
Mark Wielaard d893a2
+      ML_(linux_PRE_sys_sendmmsg)( tid, ARG2_0, ARG2_1, ARG2_2, ARG2_3 );
Mark Wielaard d893a2
+      break;
Mark Wielaard d893a2
+
Mark Wielaard d893a2
    default:
Mark Wielaard d893a2
       VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%lx\n",ARG1);
Mark Wielaard d893a2
       SET_STATUS_Failure( VKI_EINVAL );
Mark Wielaard d893a2
@@ -4168,6 +4182,15 @@ POST(sys_socketcall)
Mark Wielaard d893a2
       ML_(generic_POST_sys_recvmsg)( tid, "msg", (struct vki_msghdr *)ARG2_1, RES );
Mark Wielaard d893a2
       break;
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   case VKI_SYS_RECVMMSG:
Mark Wielaard d893a2
+      ML_(linux_POST_sys_recvmmsg)( tid, RES,
Mark Wielaard d893a2
+                                    ARG2_0, ARG2_1, ARG2_2, ARG2_3, ARG2_4 );
Mark Wielaard d893a2
+      break;
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+   case VKI_SYS_SENDMMSG:
Mark Wielaard d893a2
+      ML_(linux_POST_sys_sendmmsg)( tid, RES, ARG2_0, ARG2_1, ARG2_2, ARG2_3 );
Mark Wielaard d893a2
+      break;
Mark Wielaard d893a2
+
Mark Wielaard d893a2
    default:
Mark Wielaard d893a2
       VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%lx\n",ARG1);
Mark Wielaard d893a2
       VG_(core_panic)("... bye!\n");
Mark Wielaard d893a2
@@ -4846,64 +4869,31 @@ PRE(sys_process_vm_writev)
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 PRE(sys_sendmmsg)
Mark Wielaard d893a2
 {
Mark Wielaard d893a2
-   struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
Mark Wielaard d893a2
-   HChar name[32];
Mark Wielaard d893a2
-   UInt i;
Mark Wielaard d893a2
    *flags |= SfMayBlock;
Mark Wielaard d893a2
    PRINT("sys_sendmmsg ( %ld, %#lx, %ld, %ld )",ARG1,ARG2,ARG3,ARG4);
Mark Wielaard d893a2
    PRE_REG_READ4(long, "sendmmsg",
Mark Wielaard d893a2
                  int, s, const struct mmsghdr *, mmsg, int, vlen, int, flags);
Mark Wielaard d893a2
-   for (i = 0; i < ARG3; i++) {
Mark Wielaard d893a2
-      VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
-      ML_(generic_PRE_sys_sendmsg)(tid, name, &mmsg[i].msg_hdr);
Mark Wielaard d893a2
-      VG_(sprintf)(name, "sendmmsg(mmsg[%u].msg_len)", i);
Mark Wielaard d893a2
-      PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
-   }
Mark Wielaard d893a2
+   ML_(linux_PRE_sys_sendmmsg)(tid, ARG1,ARG2,ARG3,ARG4);
Mark Wielaard d893a2
 }
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 POST(sys_sendmmsg)
Mark Wielaard d893a2
 {
Mark Wielaard d893a2
-   if (RES > 0) {
Mark Wielaard d893a2
-      struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
Mark Wielaard d893a2
-      UInt i;
Mark Wielaard d893a2
-      for (i = 0; i < RES; i++) {
Mark Wielaard d893a2
-         POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
-      }
Mark Wielaard d893a2
-   }
Mark Wielaard d893a2
+   ML_(linux_POST_sys_sendmmsg) (tid, RES, ARG1,ARG2,ARG3,ARG4);
Mark Wielaard d893a2
 }
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 PRE(sys_recvmmsg)
Mark Wielaard d893a2
 {
Mark Wielaard d893a2
-   struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
Mark Wielaard d893a2
-   HChar name[32];
Mark Wielaard d893a2
-   UInt i;
Mark Wielaard d893a2
    *flags |= SfMayBlock;
Mark Wielaard d893a2
    PRINT("sys_recvmmsg ( %ld, %#lx, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4,ARG5);
Mark Wielaard d893a2
    PRE_REG_READ5(long, "recvmmsg",
Mark Wielaard d893a2
                  int, s, struct mmsghdr *, mmsg, int, vlen,
Mark Wielaard d893a2
                  int, flags, struct timespec *, timeout);
Mark Wielaard d893a2
-   for (i = 0; i < ARG3; i++) {
Mark Wielaard d893a2
-      VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
-      ML_(generic_PRE_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr);
Mark Wielaard d893a2
-      VG_(sprintf)(name, "recvmmsg(mmsg[%u].msg_len)", i);
Mark Wielaard d893a2
-      PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
-   }
Mark Wielaard d893a2
-   if (ARG5)
Mark Wielaard d893a2
-      PRE_MEM_READ( "recvmmsg(timeout)", ARG5, sizeof(struct vki_timespec) );
Mark Wielaard d893a2
+   ML_(linux_PRE_sys_recvmmsg)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
Mark Wielaard d893a2
 }
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 POST(sys_recvmmsg)
Mark Wielaard d893a2
 {
Mark Wielaard d893a2
-   if (RES > 0) {
Mark Wielaard d893a2
-      struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
Mark Wielaard d893a2
-      HChar name[32];
Mark Wielaard d893a2
-      UInt i;
Mark Wielaard d893a2
-      for (i = 0; i < RES; i++) {
Mark Wielaard d893a2
-         VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
-         ML_(generic_POST_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr, mmsg[i].msg_len);
Mark Wielaard d893a2
-         POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
-      }
Mark Wielaard d893a2
-   }
Mark Wielaard d893a2
+   ML_(linux_POST_sys_recvmmsg) (tid, RES, ARG1,ARG2,ARG3,ARG4,ARG5);
Mark Wielaard d893a2
 }
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 /* ---------------------------------------------------------------------
Mark Wielaard d893a2
@@ -10271,6 +10261,69 @@ ML_(linux_PRE_sys_setsockopt) ( ThreadId tid,
Mark Wielaard d893a2
    }
Mark Wielaard d893a2
 }
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+void
Mark Wielaard d893a2
+ML_(linux_PRE_sys_recvmmsg) ( ThreadId tid,
Mark Wielaard d893a2
+                              UWord arg1, UWord arg2, UWord arg3,
Mark Wielaard d893a2
+                              UWord arg4, UWord arg5 )
Mark Wielaard d893a2
+{
Mark Wielaard d893a2
+   struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
Mark Wielaard d893a2
+   HChar name[40];     // large enough
Mark Wielaard d893a2
+   UInt i;
Mark Wielaard d893a2
+   for (i = 0; i < arg3; i++) {
Mark Wielaard d893a2
+      VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
+      ML_(generic_PRE_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr);
Mark Wielaard d893a2
+      VG_(sprintf)(name, "recvmmsg(mmsg[%u].msg_len)", i);
Mark Wielaard d893a2
+      PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
+   }
Mark Wielaard d893a2
+   if (arg5)
Mark Wielaard d893a2
+      PRE_MEM_READ( "recvmmsg(timeout)", arg5, sizeof(struct vki_timespec) );
Mark Wielaard d893a2
+}
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+void
Mark Wielaard d893a2
+ML_(linux_POST_sys_recvmmsg) (ThreadId tid, UWord res,
Mark Wielaard d893a2
+                              UWord arg1, UWord arg2, UWord arg3,
Mark Wielaard d893a2
+                              UWord arg4, UWord arg5 )
Mark Wielaard d893a2
+{
Mark Wielaard d893a2
+   if (res > 0) {
Mark Wielaard d893a2
+      struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
Mark Wielaard d893a2
+      HChar name[32];    // large enough
Mark Wielaard d893a2
+      UInt i;
Mark Wielaard d893a2
+      for (i = 0; i < res; i++) {
Mark Wielaard d893a2
+         VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
+         ML_(generic_POST_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr, mmsg[i].msg_len);
Mark Wielaard d893a2
+         POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
+      }
Mark Wielaard d893a2
+   }
Mark Wielaard d893a2
+}
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+void
Mark Wielaard d893a2
+ML_(linux_PRE_sys_sendmmsg) ( ThreadId tid,
Mark Wielaard d893a2
+                              UWord arg1, UWord arg2, UWord arg3, UWord arg4 )
Mark Wielaard d893a2
+{
Mark Wielaard d893a2
+   struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
Mark Wielaard d893a2
+   HChar name[40];     // large enough
Mark Wielaard d893a2
+   UInt i;
Mark Wielaard d893a2
+   for (i = 0; i < arg3; i++) {
Mark Wielaard d893a2
+      VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
Mark Wielaard d893a2
+      ML_(generic_PRE_sys_sendmsg)(tid, name, &mmsg[i].msg_hdr);
Mark Wielaard d893a2
+      VG_(sprintf)(name, "sendmmsg(mmsg[%u].msg_len)", i);
Mark Wielaard d893a2
+      PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
+   }
Mark Wielaard d893a2
+}
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+void
Mark Wielaard d893a2
+ML_(linux_POST_sys_sendmmsg) (ThreadId tid, UWord res,
Mark Wielaard d893a2
+                              UWord arg1, UWord arg2, UWord arg3, UWord arg4 )
Mark Wielaard d893a2
+{
Mark Wielaard d893a2
+   if (res > 0) {
Mark Wielaard d893a2
+      struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
Mark Wielaard d893a2
+      UInt i;
Mark Wielaard d893a2
+      for (i = 0; i < res; i++) {
Mark Wielaard d893a2
+         POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
Mark Wielaard d893a2
+      }
Mark Wielaard d893a2
+   }
Mark Wielaard d893a2
+}
Mark Wielaard d893a2
+
Mark Wielaard d893a2
 /* ---------------------------------------------------------------------
Mark Wielaard d893a2
    ptrace wrapper helpers
Mark Wielaard d893a2
    ------------------------------------------------------------------ */
Mark Wielaard d893a2
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
Mark Wielaard d893a2
index bf3ffee..af5cbaf 100644
Mark Wielaard d893a2
--- a/include/vki/vki-linux.h
Mark Wielaard d893a2
+++ b/include/vki/vki-linux.h
Mark Wielaard d893a2
@@ -596,6 +596,8 @@ typedef struct vki_sigevent {
Mark Wielaard d893a2
 #define VKI_SYS_SENDMSG		16	/* sys_sendmsg(2)		*/
Mark Wielaard d893a2
 #define VKI_SYS_RECVMSG		17	/* sys_recvmsg(2)		*/
Mark Wielaard d893a2
 #define VKI_SYS_ACCEPT4		18	/* sys_accept4(2)		*/
Mark Wielaard d893a2
+#define VKI_SYS_RECVMMSG	19	/* sys_recvmmsg(2)              */
Mark Wielaard d893a2
+#define VKI_SYS_SENDMMSG	20	/* sys_sendmmsg(2)              */
Mark Wielaard d893a2
 
Mark Wielaard d893a2
 #ifndef ARCH_HAS_SOCKET_TYPES
Mark Wielaard d893a2
 enum vki_sock_type {
Mark Wielaard d893a2
commit 4b2fb567b7422b2563c52a0ff2c1c166264a02e0
Mark Wielaard d893a2
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Mark Wielaard d893a2
Date:   Tue Feb 17 16:04:09 2015 +0000
Mark Wielaard d893a2
Mark Wielaard d893a2
    Bug #344279 syscall sendmmsg on arm64 (269) and ppc32/64 (349) unhandled.
Mark Wielaard d893a2
    
Mark Wielaard d893a2
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14939 a5019735-40e9-0310-863c-91ae7b9d1cf9
Mark Wielaard d893a2
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
index 1f9670a..e8f4a3e 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
@@ -1043,6 +1043,7 @@ static SyscallTableEntry syscall_main_table[] = {
Mark Wielaard d893a2
    LINXY(__NR_accept4,           sys_accept4),           // 242
Mark Wielaard d893a2
    GENXY(__NR_wait4,             sys_wait4),             // 260
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   LINXY(__NR_sendmmsg,          sys_sendmmsg),          // 269
Mark Wielaard d893a2
    LINXY(__NR_process_vm_readv,  sys_process_vm_readv),  // 270
Mark Wielaard d893a2
    LINX_(__NR_process_vm_writev, sys_process_vm_writev), // 271
Mark Wielaard d893a2
    LINXY(__NR_getrandom,         sys_getrandom),         // 278
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
index 6b53abe..2ce6673 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
@@ -1255,6 +1255,8 @@ static SyscallTableEntry syscall_table[] = {
Mark Wielaard d893a2
 
Mark Wielaard d893a2
    LINX_(__NR_clock_adjtime,     sys_clock_adjtime),    // 347
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   LINXY(__NR_sendmmsg,          sys_sendmmsg),         // 349
Mark Wielaard d893a2
+
Mark Wielaard d893a2
    LINXY(__NR_process_vm_readv,  sys_process_vm_readv), // 351
Mark Wielaard d893a2
    LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
Mark Wielaard d893a2
 
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
index 8d5fa08..f18a10c 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
@@ -1156,6 +1156,8 @@ static SyscallTableEntry syscall_table[] = {
Mark Wielaard d893a2
 
Mark Wielaard d893a2
    LINXY(__NR_clock_adjtime,     sys_clock_adjtime),    // 347
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   LINXY(__NR_sendmmsg,          sys_sendmmsg),         // 349
Mark Wielaard d893a2
+
Mark Wielaard d893a2
    LINXY(__NR_process_vm_readv,  sys_process_vm_readv), // 351
Mark Wielaard d893a2
    LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
Mark Wielaard d893a2
 
Mark Wielaard d893a2
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
index e8f4a3e..7b7e824 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard d893a2
@@ -1040,7 +1040,10 @@ static SyscallTableEntry syscall_main_table[] = {
Mark Wielaard d893a2
    LINX_(__NR_mbind,             sys_mbind),             // 235
Mark Wielaard d893a2
    LINXY(__NR_get_mempolicy,     sys_get_mempolicy),     // 236
Mark Wielaard d893a2
    LINX_(__NR_set_mempolicy,     sys_set_mempolicy),     // 237
Mark Wielaard d893a2
+
Mark Wielaard d893a2
+   LINXY(__NR_recvmmsg,          sys_recvmmsg),          // 243
Mark Wielaard d893a2
    LINXY(__NR_accept4,           sys_accept4),           // 242
Mark Wielaard d893a2
+
Mark Wielaard d893a2
    GENXY(__NR_wait4,             sys_wait4),             // 260
Mark Wielaard d893a2
 
Mark Wielaard d893a2
    LINXY(__NR_sendmmsg,          sys_sendmmsg),          // 269
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
index 2ce6673..7f09fc4 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
Mark Wielaard d893a2
@@ -1251,6 +1251,7 @@ static SyscallTableEntry syscall_table[] = {
Mark Wielaard d893a2
    LINX_(__NR_shutdown,          sys_shutdown),         // 338
Mark Wielaard d893a2
    LINX_(__NR_setsockopt,        sys_setsockopt),       // 339
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   LINXY(__NR_recvmmsg,          sys_recvmmsg),         // 343
Mark Wielaard d893a2
    LINXY(__NR_accept4,           sys_accept4),          // 344
Mark Wielaard d893a2
 
Mark Wielaard d893a2
    LINX_(__NR_clock_adjtime,     sys_clock_adjtime),    // 347
Mark Wielaard d893a2
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
index f18a10c..b309f43 100644
Mark Wielaard d893a2
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
Mark Wielaard d893a2
@@ -1152,6 +1152,7 @@ static SyscallTableEntry syscall_table[] = {
Mark Wielaard d893a2
    LINX_(__NR_pwritev,           sys_pwritev),          // 321
Mark Wielaard d893a2
    LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322
Mark Wielaard d893a2
 
Mark Wielaard d893a2
+   LINXY(__NR_recvmmsg,          sys_recvmmsg),         // 343
Mark Wielaard d893a2
    LINXY(__NR_accept4,           sys_accept4),          // 344
Mark Wielaard d893a2
 
Mark Wielaard d893a2
    LINXY(__NR_clock_adjtime,     sys_clock_adjtime),    // 347