[PATCH] Decode recvmmsg syscall

Andreas Schwab schwab at linux-m68k.org
Fri Feb 12 20:39:12 UTC 2010


* net.c (do_msghr): New function to print struct msghdr.
(printmsghdr): Use it.
(printmmsghdr, sys_recvmmsg): New.
* linux/syscall.h: Declare sys_recvmmsg.
(SYS_sub_recvmmsg): Define.
(SYS_socket_nsubcalls): Bump.
* linux/sparc/syscall.h: Likewise.
* linux/arm/syscallent.h: Add sys_recvmmsg.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Adjust.
---
 linux/arm/syscallent.h     |   33 ++++++++++---------
 linux/bfin/syscallent.h    |    1 +
 linux/i386/syscallent.h    |   33 ++++++++++---------
 linux/ia64/syscallent.h    |    5 +--
 linux/m68k/syscallent.h    |   33 ++++++++++---------
 linux/powerpc/syscallent.h |   43 ++++++++++++------------
 linux/s390/syscallent.h    |   33 ++++++++++---------
 linux/s390x/syscallent.h   |   33 ++++++++++---------
 linux/sh/syscallent.h      |   33 ++++++++++---------
 linux/sh64/syscallent.h    |    5 ++-
 linux/sparc/syscall.h      |    4 ++-
 linux/sparc/syscallent.h   |   41 ++++++++++++-----------
 linux/syscall.h            |    4 ++-
 net.c                      |   77 ++++++++++++++++++++++++++++++++++----------
 14 files changed, 217 insertions(+), 161 deletions(-)

diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
index 9d7802b..9b3c0fe 100644
--- a/linux/arm/syscallent.h
+++ b/linux/arm/syscallent.h
@@ -454,33 +454,34 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
 #endif
diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
index 9577d1f..005804c 100644
--- a/linux/bfin/syscallent.h
+++ b/linux/bfin/syscallent.h
@@ -398,3 +398,4 @@
 	{ 5,	TD,	printargs,		"pwritev"	}, /* 367 */
 	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"	}, /* 368 */
 	{ 5,	0,	printargs,		"perf_counter_open"	}, /* 369 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 370 */
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index 6f26467..070ee70 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -453,32 +453,33 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h
index 2391fcf..8755795 100644
--- a/linux/ia64/syscallent.h
+++ b/linux/ia64/syscallent.h
@@ -242,14 +242,13 @@
 
 #include "../dummy.h"
 
-/* You must be careful to check ../syscallent.h so that this table
+/* You must be careful to check ../i386/syscallent.h so that this table
    starts where that one leaves off.
 */
-#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 444
+#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 445
 # error fix me
 #endif
 
-	{ 8,	0,	printargs,		"SYS_444"	}, /* 444 */
 	{ 8,	0,	printargs,		"SYS_445"	}, /* 445 */
 	{ 8,	0,	printargs,		"SYS_446"	}, /* 446 */
 	{ 8,	0,	printargs,		"SYS_447"	}, /* 447 */
diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h
index f24bf31..27523c3 100644
--- a/linux/m68k/syscallent.h
+++ b/linux/m68k/syscallent.h
@@ -452,32 +452,33 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h
index 12e9ba1..68fe2cf 100644
--- a/linux/powerpc/syscallent.h
+++ b/linux/powerpc/syscallent.h
@@ -452,37 +452,38 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	printargs,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	printargs,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
-	{ 5,	0,	printargs,		"SYS_343"	}, /* 444 */
-	{ 5,	0,	printargs,		"SYS_344"	}, /* 445 */
-	{ 5,	0,	printargs,		"SYS_345"	}, /* 446 */
-	{ 5,	0,	printargs,		"SYS_346"	}, /* 447 */
-	{ 5,	0,	printargs,		"SYS_347"	}, /* 448 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
+	{ 5,	0,	printargs,		"SYS_343"	}, /* 445 */
+	{ 5,	0,	printargs,		"SYS_344"	}, /* 446 */
+	{ 5,	0,	printargs,		"SYS_345"	}, /* 447 */
+	{ 5,	0,	printargs,		"SYS_346"	}, /* 448 */
+	{ 5,	0,	printargs,		"SYS_347"	}, /* 449 */
diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h
index 112d18e..3411ca8 100644
--- a/linux/s390/syscallent.h
+++ b/linux/s390/syscallent.h
@@ -452,32 +452,33 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h
index 24a43ca..ca5ce26 100644
--- a/linux/s390x/syscallent.h
+++ b/linux/s390x/syscallent.h
@@ -450,32 +450,33 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
index e5af00e..523bc10 100644
--- a/linux/sh/syscallent.h
+++ b/linux/sh/syscallent.h
@@ -455,33 +455,34 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
 
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h
index f3a6404..96191c1 100644
--- a/linux/sh64/syscallent.h
+++ b/linux/sh64/syscallent.h
@@ -451,8 +451,9 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
 
-#if SYS_ipc_subcall != 419
+#if SYS_ipc_subcall != 420
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
diff --git a/linux/sparc/syscall.h b/linux/sparc/syscall.h
index e47b510..03e3a71 100644
--- a/linux/sparc/syscall.h
+++ b/linux/sparc/syscall.h
@@ -99,6 +99,7 @@ int	sys_socket(),sys_bind(),sys_listen(),sys_accept(),sys_connect();
 int	sys_socketpair(),sys_sendto(),sys_send(),sys_recvfrom(),sys_recv();
 int	sys_sendmsg(),sys_recvmsg(),sys_shutdown(),sys_setsockopt(),sys_getsockopt();
 int	sys_getsockname(),sys_getpeername(),sys_pipe(),sys_accept4();
+int	sys_recvmmsg();
 
 int sys_setresuid(), sys_setresgid(), sys_getresuid(), sys_getresgid(), sys_pread();
 int sys_pwrite(), sys_getcwd();
@@ -233,8 +234,9 @@ int	sys_signalfd(), sys_timerfd(), sys_eventfd();
 #define SYS_sub_sendmsg		(SYS_socket_subcall + 16)
 #define SYS_sub_recvmsg		(SYS_socket_subcall + 17)
 #define SYS_sub_accept4		(SYS_socket_subcall + 18)
+#define SYS_sub_recvmmsg	(SYS_socket_subcall + 19)
 
-#define SYS_socket_nsubcalls	19
+#define SYS_socket_nsubcalls	20
 
 #define SYS_ipc_subcall		((SYS_socket_subcall)+(SYS_socket_nsubcalls))
 #define SYS_sub_semop		(SYS_ipc_subcall + 1)
diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h
index 3c6b2f8..2ffd9f0 100644
--- a/linux/sparc/syscallent.h
+++ b/linux/sparc/syscallent.h
@@ -373,35 +373,36 @@
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 369 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 370 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 371 */
-#if SYS_ipc_subcall != 372
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 372 */
+#if SYS_ipc_subcall != 373
  #error fix me
 #endif
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 372 */
-	{ 4,	TI,	printargs,		"semop"		}, /* 373 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 374 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 375 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 376 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 377 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 373 */
+	{ 4,	TI,	printargs,		"semop"		}, /* 374 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 375 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 376 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 377 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 378 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 379 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 380 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 381 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 382 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 383 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 384 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 385 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 386 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 387 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 383 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 384 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 385 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 386 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 387 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 388 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 389 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 390 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 391 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 392 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 393 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 394 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 395 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 396 */
-	{ 5,	0,	printargs,		"SYS_397"	}, /* 397 */
-	{ 5,	0,	printargs,		"SYS_398"	}, /* 398 */
-	{ 5,	0,	printargs,		"SYS_399"	}, /* 399 */
-	{ 5,	0,	printargs,		"SYS_400"	}, /* 400 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 393 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 394 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 395 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 396 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 397 */
+	{ 5,	0,	printargs,		"SYS_397"	}, /* 398 */
+	{ 5,	0,	printargs,		"SYS_398"	}, /* 399 */
+	{ 5,	0,	printargs,		"SYS_399"	}, /* 400 */
+	{ 5,	0,	printargs,		"SYS_400"	}, /* 401 */
diff --git a/linux/syscall.h b/linux/syscall.h
index 03c8b81..1ba3764 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -113,6 +113,7 @@ int sys_socket(), sys_bind(), sys_connect(), sys_listen(), sys_accept4();
 int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
 int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
 int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
+int sys_recvmmsg();
 
 /* *at syscalls */
 int sys_fchmodat();
@@ -227,8 +228,9 @@ int sys_osf_utimes();
 #define SYS_sub_sendmsg		(SYS_socket_subcall + 16)
 #define SYS_sub_recvmsg		(SYS_socket_subcall + 17)
 #define SYS_sub_accept4		(SYS_socket_subcall + 18)
+#define SYS_sub_recvmmsg	(SYS_socket_subcall + 19)
 
-#define SYS_socket_nsubcalls	19
+#define SYS_socket_nsubcalls	20
 #endif /* !(ALPHA || MIPS || HPPA) */
 
 /* sys_ipc subcalls */
diff --git a/net.c b/net.c
index 511f720..ded21a3 100644
--- a/net.c
+++ b/net.c
@@ -1185,6 +1185,30 @@ printcmsghdr(struct tcb *tcp, unsigned long addr, unsigned long len)
 }
 
 static void
+do_msghdr(struct tcb *tcp, struct msghdr *msg)
+{
+	tprintf("{msg_name(%d)=", msg->msg_namelen);
+	printsock(tcp, (long)msg->msg_name, msg->msg_namelen);
+
+	tprintf(", msg_iov(%lu)=", (unsigned long)msg->msg_iovlen);
+	tprint_iov(tcp, (unsigned long)msg->msg_iovlen,
+		   (unsigned long)msg->msg_iov);
+
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
+	tprintf(", msg_controllen=%lu", (unsigned long)msg->msg_controllen);
+	if (msg->msg_controllen)
+		printcmsghdr(tcp, (unsigned long) msg->msg_control,
+			     msg->msg_controllen);
+	tprintf(", msg_flags=");
+	printflags(msg_flags, msg->msg_flags, "MSG_???");
+#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
+	tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
+		(unsigned long) msg->msg_accrights, msg->msg_accrightslen);
+#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
+	tprintf("}");
+}
+
+static void
 printmsghdr(tcp, addr)
 struct tcb *tcp;
 long addr;
@@ -1195,26 +1219,27 @@ long addr;
 		tprintf("%#lx", addr);
 		return;
 	}
-	tprintf("{msg_name(%d)=", msg.msg_namelen);
-	printsock(tcp, (long)msg.msg_name, msg.msg_namelen);
+	do_msghdr(tcp, &msg);
+}
 
-	tprintf(", msg_iov(%lu)=", (unsigned long)msg.msg_iovlen);
-	tprint_iov(tcp, (unsigned long)msg.msg_iovlen,
-		   (unsigned long)msg.msg_iov);
+#ifdef LINUX
+static void
+printmmsghdr(struct tcb *tcp, long addr)
+{
+	struct mmsghdr {
+		struct msghdr msg_hdr;
+		unsigned msg_len;
+	} mmsg;
 
-#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
-	tprintf(", msg_controllen=%lu", (unsigned long)msg.msg_controllen);
-	if (msg.msg_controllen)
-		printcmsghdr(tcp, (unsigned long) msg.msg_control,
-			     msg.msg_controllen);
-	tprintf(", msg_flags=");
-	printflags(msg_flags, msg.msg_flags, "MSG_???");
-#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
-	tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
-		(unsigned long) msg.msg_accrights, msg.msg_accrightslen);
-#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
-	tprintf("}");
+	if (umove(tcp, addr, &mmsg) < 0) {
+		tprintf("%#lx", addr);
+		return;
+	}
+	tprintf("{");
+	do_msghdr(tcp, &mmsg.msg_hdr);
+	tprintf(", %u}", mmsg.msg_len);
 }
+#endif
 
 #endif /* HAVE_SENDMSG */
 
@@ -1503,6 +1528,24 @@ struct tcb *tcp;
 	return 0;
 }
 
+#ifdef LINUX
+int
+sys_recvmmsg(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		tprintf("%ld, ", tcp->u_arg[0]);
+		printmmsghdr(tcp, tcp->u_arg[1]);
+		tprintf(", %ld, ", tcp->u_arg[2]);
+		/* flags */
+		printflags(msg_flags, tcp->u_arg[3], "MSG_???");
+		/* timeout */
+		tprintf(", ");
+		print_timespec(tcp, tcp->u_arg[4]);
+	}
+	return 0;
+}
+#endif
+
 #endif /* HAVE_SENDMSG */
 
 int
-- 
1.6.6.2


Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




More information about the Strace-devel mailing list