[PATCH] Fix getdents64 decoding

Andreas Schwab schwab at suse.de
Mon Nov 19 16:15:10 UTC 2007


The getdents64 syscall has only 3 arguments, and on two architectures it
is not decoded at all.

Andreas.

2007-11-19  Andreas Schwab  <schwab at suse.de>

	* linux/syscallent.h: Fix argument count for getdents64.
	* linux/arm/syscallent.h: Likewise.
	* linux/m68k/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.

	* linux/ia64/syscallent.h: Use sys_getdents64.
	* linux/sh/syscallent.h: Likewise.

Index: linux/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/syscallent.h,v
retrieving revision 1.50
diff -u -a -p -r1.50 syscallent.h
--- linux/syscallent.h	12 Sep 2007 01:26:33 -0000	1.50
+++ linux/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -250,7 +250,7 @@
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 217 */
 	{ 3,	0,	sys_mincore,		"mincore"	}, /* 218 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 219 */
-	{ 4,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
 	{ 3,	TD,	sys_fcntl,		"fcntl64"	}, /* 221 */
 	{ 4,	0,	printargs,		"SYS_222"	}, /* 222 */
 /*TODO*/{ 5,	0,	printargs,		"security"	}, /* 223 */
Index: linux/arm/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/arm/syscallent.h,v
retrieving revision 1.12
diff -u -a -p -r1.12 syscallent.h
--- linux/arm/syscallent.h	2 Aug 2007 01:44:14 -0000	1.12
+++ linux/arm/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -247,7 +247,7 @@
 	{ 1,	0,	sys_setgid,		"setgid32"	}, /* 214 */
 	{ 1,	0,	sys_setfsuid,		"setfsuid32"	}, /* 215 */
 	{ 1,	0,	sys_setfsgid,		"setfsgid32"	}, /* 216 */
-	{ 4,    0,      sys_getdents64,         "getdents64"    }, /* 217 */
+	{ 3,    0,      sys_getdents64,         "getdents64"    }, /* 217 */
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 218 */
 	{ 3,	0,	printargs,		"mincore"	}, /* 219 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 220 */
Index: linux/ia64/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/ia64/syscallent.h,v
retrieving revision 1.31
diff -u -a -p -r1.31 syscallent.h
--- linux/ia64/syscallent.h	2 Aug 2007 01:44:14 -0000	1.31
+++ linux/ia64/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -1020,7 +1020,7 @@
 	{ 2,	0,	sys_lstat,		"lstat"		}, /* 1211 */
 	{ 2,	TD,	sys_fstat,		"fstat"		}, /* 1212 */
 	{ 6,	TP,	sys_clone,		"clone2"	}, /* 1213 */
-	{ 3,	0,	printargs,		"getdents64"	}, /* 1214 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 1214 */
 	{ 2,	0,	printargs,		"getunwind"	}, /* 1215 */
 	{ 4,	TD,	sys_readahead,		"readahead"	}, /* 1216 */
 	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 1217 */
Index: linux/m68k/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/m68k/syscallent.h,v
retrieving revision 1.5
diff -u -a -p -r1.5 syscallent.h
--- linux/m68k/syscallent.h	24 Jul 2007 01:53:01 -0000	1.5
+++ linux/m68k/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -248,7 +248,7 @@
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 217 */
 	{ 5,	0,	printargs,		"SYS_218"	}, /* 218 */
 	{ 5,	0,	printargs,		"SYS_219"	}, /* 219 */
-	{ 4,	0,	sys_getdents64,		"getdents64"	}, /* 220 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
 	{ 0,	0,	printargs,		"gettid"	}, /* 221 */
 	{ 2,	TS,	sys_kill,		"tkill"		}, /* 222 */
 	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 223 */
Index: linux/sh/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/sh/syscallent.h,v
retrieving revision 1.17
diff -u -a -p -r1.17 syscallent.h
--- linux/sh/syscallent.h	1 Nov 2007 21:54:11 -0000	1.17
+++ linux/sh/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -252,7 +252,7 @@
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 217 */
 	{ 3,	0,	printargs,		"mincore"	}, /* 218 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 219 */
-	{ 4,	0,	printargs,		"getdents64"	}, /* 220 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
 	{ 3,	TD,	sys_fcntl,		"fcntl64"	}, /* 221 */
 	{ 4,	0,	printargs,		"SYS_222"	}, /* 222 */
 	{ 4,	0,	printargs,		"SYS_223"	}, /* 223 */
Index: linux/x86_64/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/x86_64/syscallent.h,v
retrieving revision 1.27
diff -u -a -p -r1.27 syscallent.h
--- linux/x86_64/syscallent.h	2 Aug 2007 01:32:17 -0000	1.27
+++ linux/x86_64/syscallent.h	19 Nov 2007 16:01:48 -0000
@@ -215,7 +215,7 @@
 	{ 4,	0,	printargs,		"epoll_ctl_old"	}, /* 214 */
 	{ 4,	0,	printargs,		"epoll_wait_old"}, /* 215 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 216 */
-	{ 4,	TD,	sys_getdents64,		"getdents64"	}, /* 217 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 217 */
 	{ 1,	0,	printargs,		"set_tid_address"}, /* 218 */
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall"}, /* 219 */
 	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 220 */

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP 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