95ebf5abfc
2006-10-13 Ulrich Drepper <drepper@redhat.com>
...
Bernhard Kaindl <bk@suse.de>
Dmitry V. Levin <ldv@altlinux.org>
Michael Holzheu <holzheu@de.ibm.com>
Add hooks for new syscalls. Add decoders for *at, inotify*,
pselect6, ppoll and unshare syscalls.
* defs.h: Declare print_sigset.
* desc.c (sys_pselect6): New function.
* file.c (decode_open, decode_access, decode_mkdir,
decode_readlink, decode_chmod, decode_utimes, decode_mknod):
New functions.
(sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod,
sys_utimes, sys_mknod): Use them.
[LINUX] (fstatatflags, unlinkatflags, inotify_modes): New
variables.
[LINUX] (print_dirfd, 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, sys_inotify_add_watch,
sys_inotify_rm_watch): New functions.
* process.c [LINUX] (sys_unshare): New function.
* signal.c (print_sigset): New function.
(sys_sigprocmask): Use it.
* stream.c (decode_poll): New function.
(sys_poll): Use it.
[LINUX] (sys_ppoll): New function.
* linux/syscall.h: Delcare new syscall handlers.
* linux/syscallent.h: Hook up new syscalls.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
Fixes RH#178633.
2006-10-13 20:25:12 +00:00
Roland McGrath
aa524c88c4
2005-05-31 Dmitry V. Levin <ldv@altlinux.org>
...
Deal with memory management issues.
* defs.h (tprint_iov): Update prototype.
* desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate
epoll_event array of arbitrary size on the stack, to avoid
stack overflow.
* file.c (print_xattr_val): Check for integer overflow during
malloc size calculation, to avoid heap corruption.
* io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Change iovec array handling to avoid heap memory allocation.
* mem.c (get_nodes) [LINUX]: Check for integer overflow during
size calculation and do not allocate array of arbitrary size on
the stack, to avoid stack overflow.
* net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of
arbitrary size on the stack, to avoid stack overflow. Do not
trust cmsg.cmsg_len to avoid read beyond the end of allocated
object.
(printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage.
* process.c (sys_setgroups): Check for integer overflow during
malloc size calculation, to avoid heap corruption. Change gid_t
array handling to avoid heap memory allocation.
(sys_getgroups): Likewise.
(sys_setgroups32) [LINUX]: Likewise.
(sys_getgroups32) [LINUX]: Likewise.
* stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer
overflow during malloc size calculation, to avoid heap corruption.
Change pollfd array handling to avoid heap memory allocation.
* system.c (sys_sysctl) [LINUX]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
* util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Fixes RH#159196.
2005-06-01 19:22:06 +00:00
Roland McGrath
b2dee13345
2005-05-31 Dmitry V. Levin <ldv@altlinux.org>
...
* util.c (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument, "const char *", with similar
meaning to the third argument of printxval().
* defs.h (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument.
* bjm.c (sys_query_module) [LINUX]: Pass third argument to
printflags().
* desc.c (sys_fcntl): Likewise.
(sys_flock) [LOCK_SH]: Likewise.
(print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise.
* file.c (sys_open): Likewise.
(solaris_open) [LINUXSPARC]: Likewise.
(sys_access): Likewise.
(sys_chflags, sys_fchflags) [FREEBSD]: Likewise.
(realprintstat) [HAVE_LONG_LONG_OFF_T &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(printstat64) [HAVE_STAT64 &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(sys_setxattr, sys_fsetxattr): Likewise.
* ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget,
sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise.
(sys_mq_open) [LINUX]: Likewise.
(printmqattr) [HAVE_MQUEUE_H]: Likewise.
* mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mprotect): Likewise.
(sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise.
(sys_msync) [MS_ASYNC]: Likewise.
(sys_mctl) [MC_SYNC]: Likewise.
(sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]:
Likewise.
* net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise.
(sys_send, sys_sendto): Likewise.
(sys_sendmsg) [HAVE_SENDMSG]: Likewise.
(sys_recv, sys_recvfrom): Likewise.
(sys_recvmsg) [HAVE_SENDMSG]: Likewise.
(printicmpfilter) [ICMP_FILTER]: Likewise.
* proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise.
* process.c (sys_clone) [LINUX]: Likewise.
(printwaitn): Likewise.
(sys_waitid) [SVR4 || LINUX]: Likewise.
* signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise.
(sys_sigaction): Likewise.
(printcontext) [SVR4]: Likewise.
(print_stack_t) [LINUX) || FREEBSD]: Likewise.
(sys_rt_sigaction) [LINUX]: Likewise.
* sock.c (sock_ioctl) [LINUX]: Likewise.
* stream.c (sys_putmsg, sys_getmsg): Likewise.
(sys_putpmsg) [SYS_putpmsg]: Likewise.
(sys_getpmsg) [SYS_getpmsg]: Likewise.
(sys_poll): Likewise.
(print_transport_message) [TI_BIND]: Likewise.
(stream_ioctl): Likewise.
* system.c (sys_mount, sys_reboot): Likewise.
(sys_cacheflush) [LINUX && M68K]: Likewise.
(sys_capget, sys_capset) [SYS_capget]: Likewise.
* term.c (term_ioctl) [TIOCMGET]: Likewise.
* time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]:
Likewise.
Fixes RH#159310.
2005-06-01 19:02:36 +00:00
Roland McGrath
d9f816f604
2004-09-03 Roland McGrath <roland@redhat.com>
...
* util.c (xlookup, printxval, addflags, printflags): Use const for
struct xlat * argument.
* defs.h (xlookup, printxval, addflags, printflags): Update decls.
* bjm.c: Add const to all struct xlat defns.
* desc.c: Likewise.
* file.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* resource.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* stream.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
2004-09-04 03:39:20 +00:00
Roland McGrath
1c04b0b000
2004-01-13 Roland McGrath <roland@redhat.com>
...
* stream.c (internal_stream_ioctl): Fix typo strict -> struct.
Reported by Petter Reinholdtsen <pere@hungry.com>.
2004-01-13 10:18:46 +00:00
Roland McGrath
2843a4e1d2
2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
...
* defs.h (ioctl_lookup): Prototype change.
* ioctl.c (ioctl_next_match): New function.
* defs.h: Declare it.
* io.c (sys_ioctl): Use it, to display all possible ioctl names
when there's more than one match.
* ioctl.c (ioctl_lookup): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
Patch from Solar Designer <solar@openwall.com>.
2003-11-14 02:54:03 +00:00
Roland McGrath
561c7995d7
2003-04-01 Philippe De Muyter <phdm@macqel.be>
...
* sock.c, stream.c: Check #ifdef LINUX, not linux.
* file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
2003-04-02 01:10:44 +00:00
Roland McGrath
7686eee1d7
Fix output format of last change.
2003-01-10 20:09:43 +00:00
Roland McGrath
38dc6bb84f
2003-01-10 Roland McGrath <roland@redhat.com>
...
* configure.ac: Check struct T_conn_res for QUEUE_ptr or ACCEPTOR_id.
* stream.c (print_transport_message): Use #ifdefs for those members.
2003-01-10 20:05:54 +00:00
Roland McGrath
6d2b34971b
2002-12-22 Roland McGrath <roland@redhat.com>
...
Update to Autoconf 2.57, and Automakify with version 1.7.
* Makefile.am: New file.
* Makefile.in: File removed.
* configure.in: Moved to ...
* configure.ac: ... here. Update for Autoconf 2.5x and Automake.
* aclocal.m4: Moved to ...
* acinclude.m4: ... here. Update for Autoconf 2.5x.
* AUTHORS: New file, makes automake happy.
* autogen.sh: File removed.
* README-CVS: Update to recommend autoreconf instead.
* file.c: HAVE_ST_* -> HAVE_STRUCT_STAT_ST_*.
* net.c: HAVE_SIN6_SCOPE_ID -> HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID,
HAVE_MSG_CONTROL -> HAVE_STRUCT_MSGHDR_MSG_CONTROL.
* strace.c: *_DECLARED -> HAVE_DECL_*
* stream.c: HAVE_* -> HAVE_STRUCT_*
2002-12-30 00:51:30 +00:00
Roland McGrath
34e014ac75
2002-12-15 Roland McGrath <roland@redhat.com>
...
* configure.in: Don't check for putpmsg.
* stream.c (sys_getpmsg, sys_putpmsg): Make these conditional on
#ifdef SYS_*, rather than on HAVE_PUTPMSG.
2002-12-16 20:40:59 +00:00
Michal Ludvig
10a88d09eb
2002-10-07 Michal Ludvig <mludvig@suse.cz>
...
Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
and bugfixes to s390 by D.J. Barrow.
2002-10-07 14:31:00 +00:00
John Hughes
2c4e3a8061
fix unsigned arithmetic bug in previous change
2002-05-24 10:19:44 +00:00
John Hughes
38ae88d332
Improve tracing of timod ioctls
2002-05-23 11:48:58 +00:00
John Hughes
fd15cb31ad
tidy up decode of streams ioctls a little
2002-05-17 11:41:35 +00:00
Wichert Akkerman
42080d852e
add more configure tests for system headers
2001-04-10 10:32:26 +00:00
Wichert Akkerman
d856b99aff
FreeBSD updates, make things compile on Linux 2.2 kernels
2000-10-13 12:47:12 +00:00
Wichert Akkerman
bf79f2e16b
Add FreeBSD support
2000-09-01 21:03:06 +00:00
Wichert Akkerman
faf722234d
test/vfork.c: new file to test vfork traces
...
test/.cvsignore: new file
defs.h: Up maximum number of traced processed to 64
strace.c: Disable some debugging code from davidm
implement setarg for more architectures
implement change_syscall
2000-02-19 23:59:03 +00:00
Pavel Machek
245a6ac0e7
Automatically probe for sys/poll.h
...
Include example of nasty program where strace (by design) gives
incorrect output.
2000-02-01 16:12:33 +00:00
Wichert Akkerman
4dc8a2aec6
Bunch of stuff
1999-12-23 14:20:14 +00:00
Wichert Akkerman
906dade0dd
Tiny display fixup in getpmsg syscall output
1999-11-26 09:18:37 +00:00
Wichert Akkerman
2e2553a534
Merged in a bunch of patches that I got as reaction to the 3.99 release.
...
See the ChangeLog for details
1999-05-09 00:29:58 +00:00
Wichert Akkerman
d4d8e92b30
Update linux sparc support so it compiles and works reasonably
1999-04-18 23:30:29 +00:00
Wichert Akkerman
76baf7c9f6
Initial revision
1999-02-19 00:21:36 +00:00