Hello community, here is the log from the commit of package strace checked in at Wed Apr 5 17:41:19 CEST 2006. -------- --- strace/strace.changes 2006-03-05 12:42:50.000000000 +0100 +++ strace/strace.changes 2006-03-31 16:04:36.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Mar 31 16:03:10 CEST 2006 - bk@suse.de + +- add parsing for the 13 *at syscalls and pselect6(i386 and x86_84) + +------------------------------------------------------------------- New: ---- strace-openat-syscalls.patch strace-pselect6.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ strace.spec ++++++ --- /var/tmp/diff_new_pack.5MckeS/_old 2006-04-05 17:40:49.000000000 +0200 +++ /var/tmp/diff_new_pack.5MckeS/_new 2006-04-05 17:40:49.000000000 +0200 @@ -16,7 +16,7 @@ Group: Development/Tools/Debuggers Autoreqprov: on Version: 4.5.14 -Release: 1 +Release: 4 Summary: A utility to trace the system calls of a program Source: strace-%{version}.tar.bz2 Patch: strace-%{version}.diff @@ -26,6 +26,8 @@ Patch7: proper_inotify.diff Patch8: strace-sysinfo.diff Patch9: strace-graph.diff +Patch10: strace-openat-syscalls.patch +Patch11: strace-pselect6.patch URL: http://www.liacs.nl/~wichert/strace/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -51,6 +53,8 @@ %patch7 %patch8 %patch9 +%patch10 -p1 +%patch11 -p1 %build %{suse_update_config -f} @@ -76,6 +80,8 @@ %doc %{_mandir}/man1/strace.1.gz %changelog -n strace +* Fri Mar 31 2006 - bk@suse.de +- add parsing for the 13 *at syscalls and pselect6(i386 and x86_84) * Sat Mar 04 2006 - schwab@suse.de - Update to strace 4.5.14 (numerous bug fixes, required to support new kernel features). ++++++ proper_inotify.diff ++++++ --- /var/tmp/diff_new_pack.5MckeS/_old 2006-04-05 17:40:50.000000000 +0200 +++ /var/tmp/diff_new_pack.5MckeS/_new 2006-04-05 17:40:50.000000000 +0200 @@ -122,26 +122,4 @@ /* sys_socketcall subcalls */ ---- linux/syscallent.h -+++ linux/syscallent.h -@@ -322,8 +322,8 @@ - { 3, 0, printargs, "ioprio_set" }, /* 289 */ - { 2, 0, printargs, "ioprio_get" }, /* 290 */ - { 0, 0, printargs, "inotify_init" }, /* 291 */ -- { 3, 0, printargs, "inotify_add_watch" }, /* 292 */ -- { 2, 0, printargs, "inotify_rm_watch" }, /* 293 */ -+ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */ -+ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */ - { 5, 0, printargs, "SYS_294" }, /* 294 */ - { 5, 0, printargs, "SYS_295" }, /* 295 */ - { 5, 0, printargs, "SYS_296" }, /* 296 */ ---- linux/x86_64/syscallent.h -+++ linux/x86_64/syscallent.h -@@ -252,5 +252,5 @@ - { 3, 0, printargs, "ioprio_set" }, /* 251 */ - { 2, 0, printargs, "ioprio_get" }, /* 252 */ - { 0, 0, printargs, "inotify_init" }, /* 253 */ -- { 3, 0, printargs, "inotify_add_watch" }, /* 254 */ -- { 2, 0, printargs, "inotify_rm_watch" }, /* 255 */ -+ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 254 */ -+ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 255 */ +merged the two writing of sys_inotify_add_watch and sys_inotify_rm_watch into syscalls.diff ++++++ strace-openat-syscalls.patch ++++++ 2006-01-22 initially Ulrich Drepper <drepper@redhat.com> - done identically bk@suse.de (not knowing/not having found his patch): * file.c (sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat, sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat, sys_futimesat, sys_mknodat): New functions. The hooks for the new functions are in the syscalls.diff Tested using the glibc testcases by bk@suse.de: --- strace.current/file.c 2005-06-08 22:45:28.000000000 +0200 +++ strace/file.c 2006-03-27 23:52:11.000000000 +0200 @@ -324,6 +324,33 @@ struct tcb *tcp; return 0; } +static inline void printdfd(dfd) +int dfd; +{ + if (dfd == AT_FDCWD) + tprintf("AT_FDCWD, "); + else + tprintf("%d, ", dfd); +} + +int +sys_openat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + /* flags */ + printflags(openmodes, tcp->u_arg[2] + 1, "O_???"); + if (tcp->u_arg[2] & O_CREAT) { + /* mode */ + tprintf(", %#lo", tcp->u_arg[3]); + } + } + return 0; +} + #ifdef LINUXSPARC static const struct xlat openmodessol[] = { { 0, "O_RDWR" }, @@ -400,6 +427,19 @@ struct tcb *tcp; } int +sys_faccessat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + printflags(access_flags, tcp->u_arg[2], "?_OK"); + } + return 0; +} + +int sys_umask(tcp) struct tcb *tcp; { @@ -1128,6 +1168,31 @@ struct tcb *tcp; } #endif +static const struct xlat fstatatflags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { 0, NULL }, +}; + +int +sys_fstatat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + } else { +#ifdef HAVE_STAT64 + printstat64(tcp, tcp->u_arg[2]); +#else + printstat(tcp, tcp->u_arg[2]); +#endif + tprintf(", "); + printflags(fstatatflags, tcp->u_arg[3], "AT_???"); + } + return 0; +} + int sys_fstat64(tcp) struct tcb *tcp; @@ -1696,6 +1757,18 @@ struct tcb *tcp; } int +sys_mkdirat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", %#lo", tcp->u_arg[2]); + } + return 0; +} + +int sys_rmdir(tcp) struct tcb *tcp; { @@ -1757,6 +1830,70 @@ struct tcb *tcp; return 0; } +static const struct xlat unlinkatflags[] = { + { AT_REMOVEDIR, "AT_REMOVEDIR" }, + { 0, NULL }, +}; + +int +sys_linkat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + printdfd(tcp->u_arg[2]); + printpath(tcp, tcp->u_arg[3]); + tprintf(", %ld", tcp->u_arg[4]); + } + return 0; +} + +int +sys_unlinkat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + printflags(unlinkatflags, tcp->u_arg[2], "AT_???"); + } + return 0; +} + +int +sys_symlinkat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", "); + printdfd(tcp->u_arg[1]); + printpath(tcp, tcp->u_arg[2]); + } + return 0; +} + +int +sys_readlinkat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[2]); + else + printpathn(tcp, tcp->u_arg[2], tcp->u_rval); + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} + int sys_symlink(tcp) struct tcb *tcp; @@ -1799,6 +1936,20 @@ struct tcb *tcp; } int +sys_renameat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + printdfd(tcp->u_arg[2]); + printpath(tcp, tcp->u_arg[3]); + } + return 0; +} + +int sys_chown(tcp) struct tcb *tcp; { @@ -1810,6 +2001,29 @@ struct tcb *tcp; return 0; } +#ifdef LINUX +int +sys_fchownat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + printuid(", ", tcp->u_arg[2]); + printuid(", ", tcp->u_arg[3]); + tprintf(", "); + if (tcp->u_arg[4] & AT_SYMLINK_NOFOLLOW) { + tprintf("AT_SYMLINK_NOFOLLOW"); + if (tcp->u_arg[4] & ~AT_SYMLINK_NOFOLLOW) + tprintf("|"); + } + if (tcp->u_arg[4] == 0 || (tcp->u_arg[4] & ~AT_SYMLINK_NOFOLLOW)) + tprintf("%lx", tcp->u_arg[4]); + } + return 0; +} +#endif + int sys_fchown(tcp) struct tcb *tcp; @@ -1833,6 +2050,20 @@ struct tcb *tcp; return 0; } +#ifdef LINUX +int +sys_fchmodat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", %#lo", tcp->u_arg[2]); + } + return 0; +} +#endif + int sys_fchmod(tcp) struct tcb *tcp; @@ -1869,6 +2103,21 @@ struct tcb *tcp; return 0; } +#ifdef LINUX +int +sys_futimesat(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", "); + printtv(tcp, tcp->u_arg[2]); + } + return 0; +} +#endif + int sys_utime(tcp) struct tcb *tcp; @@ -1923,6 +2111,36 @@ struct tcb *tcp; } int +sys_mknodat(tcp) +struct tcb *tcp; +{ + int mode = tcp->u_arg[2]; + + if (entering(tcp)) { + printdfd(tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", %s", sprintmode(mode)); + switch (mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: +#ifdef LINUXSPARC + if (current_personality == 1) + tprintf(", makedev(%lu, %lu)", + (unsigned long) ((tcp->u_arg[3] >> 18) & 0x3fff), + (unsigned long) (tcp->u_arg[3] & 0x3ffff)); + else +#endif + tprintf(", makedev(%lu, %lu)", + (unsigned long) major(tcp->u_arg[3]), + (unsigned long) minor(tcp->u_arg[3])); + break; + default: + break; + } + } + return 0; +} + +int sys_mkfifo(tcp) struct tcb *tcp; { diff -rup strace.current/linux/syscall.h strace/linux/syscall.h --- strace.current/linux/syscall.h 2006-03-27 18:57:22.000000000 +0200 +++ strace/linux/syscall.h 2006-03-27 23:33:07.000000000 +0200 @@ -115,6 +115,12 @@ int sys_query_module(); int sys_poll(); int sys_mincore(); +/* the 13 openat syscalls and pselect6 */ +int sys_openat(), sys_mkdirat(), sys_mknodat(), sys_fchownat(); +int sys_futimesat(), sys_fstatat(), sys_unlinkat(), sys_renameat(); +int sys_linkat(), sys_symlinkat(), sys_readlinkat(); +int sys_fchmodat(), sys_faccessat(), sys_pselect6(); + /* architecture-specific calls */ #ifdef ALPHA int sys_osf_select(); ++++++ strace-pselect6.patch ++++++ Extracted changelog (to only include the pselect6 changes): 2006-01-22 Ulrich Drepper <drepper@redhat.com> * defs.h: Declare sprintsigmask. * desc.c (sys_pselect): New function. * signal.c: Export sprintsigmask. Hooking up the new function is done in the syscalls.diff Origin: pselect6 syscall from attachment https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=123547 of bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178633 --- strace-4.5.14-old/signal.c 2006-01-12 14:34:50.000000000 -0800 +++ strace-4.5.14/signal.c 2006-01-20 22:03:27.000000000 -0800 @@ -313,7 +313,7 @@ int len; #define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(sigset_t)) #endif -static char * +char * sprintsigmask(s, mask, rt) char *s; sigset_t *mask; --- strace-4.5.14-old/defs.h 2006-01-12 02:18:53.000000000 -0800 +++ strace-4.5.14/defs.h 2006-01-20 22:01:25.000000000 -0800 @@ -462,6 +462,7 @@ extern int sigishandled P((struct tcb *, extern void printcall P((struct tcb *)); extern const char *signame P((int)); extern void printsignal P((int)); +extern char *sprintsigmask P((char *, sigset_t *, int)); extern void printleader P((struct tcb *)); extern void printtrailer P((struct tcb *)); extern void tabto P((int)); --- strace-4.5.14-old/desc.c 2005-06-01 12:22:07.000000000 -0700 +++ strace-4.5.14/desc.c 2006-01-20 22:09:31.000000000 -0800 @@ -871,3 +871,25 @@ int long *args = tcp->u_arg; return decode_select(tcp, args, 0); } + +#ifdef LINUX +int +sys_pselect6(tcp) +struct tcb *tcp; +{ + int rc = decode_select(tcp, tcp->u_arg, 0); + if (exiting(tcp)) { + struct { + void *ss; + size_t len; + } data; + sigset_t ss; + if (umove(tcp, tcp->u_arg[5], &data) < 0 + || umoven(tcp, data.ss, data.len, &ss) < 0) + tprintf("{?}, ?"); + else + tprintf(", %s, %zu", sprintsigmask("", &ss, 1), data.len); + } + return rc; +} +#endif ++++++ syscalls.diff ++++++ --- /var/tmp/diff_new_pack.5MckeS/_old 2006-04-05 17:40:50.000000000 +0200 +++ /var/tmp/diff_new_pack.5MckeS/_new 2006-04-05 17:40:50.000000000 +0200 @@ -62,9 +62,27 @@ { 5, 0, printargs, "SYS_278" }, /* 278 */ { 5, 0, printargs, "SYS_279" }, /* 279 */ { 5, 0, printargs, "SYS_280" }, /* 280 */ + +006-01-22 Ulrich Drepper <drepper@redhat.com> +and bk@suse.de independently: + + Renumber IPC and socket subcalls. + +Reason: Needed to make room for parsing the *at syscalls +--- linux/syscall.h ++++ linux/syscall.h +@@ -190,7 +190,7 @@ + # undef SYS_sendmsg + # undef SYS_recvmsg + # endif /* IA64 */ +-# define SYS_socket_subcall 300 ++# define SYS_socket_subcall 320 + #define SYS_sub_socket (SYS_socket_subcall + 1) + #define SYS_sub_bind (SYS_socket_subcall + 2) + #define SYS_sub_connect (SYS_socket_subcall + 3) --- linux/syscallent.h +++ linux/syscallent.h -@@ -316,14 +316,14 @@ +@@ -316,22 +316,42 @@ { 5, 0, printargs, "sys_kexec_load" }, /* 283 */ { 5, TP, sys_waitid, "waitid", SYS_waitid }, /* 284 */ { 5, 0, printargs, "SYS_285" }, /* 285 */ @@ -76,20 +94,64 @@ - { 5, 0, printargs, "SYS_291" }, /* 291 */ - { 5, 0, printargs, "SYS_292" }, /* 292 */ - { 5, 0, printargs, "SYS_293" }, /* 293 */ +- { 5, 0, printargs, "SYS_294" }, /* 294 */ +- { 5, 0, printargs, "SYS_295" }, /* 295 */ +- { 5, 0, printargs, "SYS_296" }, /* 296 */ +- { 5, 0, printargs, "SYS_297" }, /* 297 */ +- { 5, 0, printargs, "SYS_298" }, /* 298 */ +- { 5, 0, printargs, "SYS_299" }, /* 299 */ + { 5, 0, printargs, "add_key" }, /* 286 */ + { 4, 0, printargs, "request_key" }, /* 287 */ + { 5, 0, printargs, "keyctl" }, /* 288 */ + { 3, 0, printargs, "ioprio_set" }, /* 289 */ + { 2, 0, printargs, "ioprio_get" }, /* 290 */ + { 0, 0, printargs, "inotify_init" }, /* 291 */ -+ { 3, 0, printargs, "inotify_add_watch" }, /* 292 */ -+ { 2, 0, printargs, "inotify_rm_watch" }, /* 293 */ - { 5, 0, printargs, "SYS_294" }, /* 294 */ - { 5, 0, printargs, "SYS_295" }, /* 295 */ - { 5, 0, printargs, "SYS_296" }, /* 296 */ ++ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */ ++ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */ ++ { 4, 0, printargs, "migrate_pages" }, /* 294 */ ++ { 4, TD|TF, sys_openat, "openat" }, /* 295 */ ++ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */ ++ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */ ++ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */ ++ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */ ++ { 4, TD|TF, sys_fstatat, "fstatat64" }, /* 300 */ ++ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */ ++ { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */ ++ { 5, TD|TF, sys_linkat, "linkat" }, /* 303 */ ++ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */ ++ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */ ++ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */ ++ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */ ++ { 6, TD, sys_pselect6, "pselect6" }, /* 308 */ ++ { 5, 0, printargs, "ppoll" }, /* 309 */ ++ { 1, 0, printargs, "unshare" }, /* 310 */ ++ { 5, 0, printargs, "SYS_311" }, /* 311 */ ++ { 5, 0, printargs, "SYS_312" }, /* 312 */ ++ { 5, 0, printargs, "SYS_313" }, /* 313 */ ++ { 5, 0, printargs, "SYS_314" }, /* 314 */ ++ { 5, 0, printargs, "SYS_315" }, /* 315 */ ++ { 5, 0, printargs, "SYS_316" }, /* 316 */ ++ { 5, 0, printargs, "SYS_317" }, /* 317 */ ++ { 5, 0, printargs, "SYS_318" }, /* 318 */ ++ { 5, 0, printargs, "SYS_319" }, /* 319 */ + +-#if SYS_socket_subcall != 300 ++#if SYS_socket_subcall != 320 + #error fix me + #endif + { 8, 0, printargs, "socket_subcall"}, /* 300 */ +@@ -353,7 +373,7 @@ + { 5, TN, sys_sendmsg, "sendmsg" }, /* 316 */ + { 5, TN, sys_recvmsg, "recvmsg" }, /* 317 */ + +-#if SYS_ipc_subcall != 318 ++#if SYS_ipc_subcall != 338 + #error fix me + #endif + { 4, 0, printargs, "ipc_subcall" }, /* 318 */ --- linux/x86_64/syscallent.h +++ linux/x86_64/syscallent.h -@@ -246,9 +246,11 @@ +@@ -246,9 +246,26 @@ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 245 */ { 5, 0, printargs, "kexec_load" }, /* 246 */ { 5, TP, sys_waitid, "waitid" }, /* 247 */ @@ -105,5 +167,20 @@ + { 3, 0, printargs, "ioprio_set" }, /* 251 */ + { 2, 0, printargs, "ioprio_get" }, /* 252 */ + { 0, 0, printargs, "inotify_init" }, /* 253 */ -+ { 3, 0, printargs, "inotify_add_watch" }, /* 254 */ -+ { 2, 0, printargs, "inotify_rm_watch" }, /* 255 */ ++ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 254 */ ++ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 255 */ ++ { 4, 0, printargs, "migrate_pages" }, /* 256 */ ++ { 4, TD|TF, sys_openat, "openat" }, /* 257 */ ++ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 258 */ ++ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 259 */ ++ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 260 */ ++ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 261 */ ++ { 4, TD|TF, sys_fstatat, "fstatat" }, /* 262 */ ++ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 263 */ ++ { 4, TD|TF, sys_renameat, "renameat" }, /* 264 */ ++ { 5, TD|TF, sys_linkat, "linkat" }, /* 265 */ ++ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 266 */ ++ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 267 */ ++ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 268 */ ++ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 269 */ ++ { 6, TD, sys_pselect6, "pselect6" }, /* 270 */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de