dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b |
|
24-Dec-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
arc, metag, nios2, or1k, tile: fix build Fix build regression introduced by commit 34683e3926d8c2daa368afb805da422ee7043396. * linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. * linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. * linux/nios2/syscallent.h: Likewise. * linux/or1k/syscallent.h: Likewise. * linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. * pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. * NEWS: Mention this build fix. Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
/external/strace/pathtrace.c
|
4b3a1703bde75259457a9c4f0e888439ca849ab9 |
|
22-Nov-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement name_to_handle_at and open_by_handle_at syscalls decoding * file_handle.c: New file. * Makefile.am (strace_SOURCES): Add it. * linux/dummy.h (sys_name_to_handle_at, sys_open_by_handle_at): Remove stub aliases. * pathtrace.c (pathtrace_match): Add SEN_name_to_handle_at. * tests/file_handle.c: New file. * tests/file_handle.test: New test. * tests/Makefile.am (check_PROGRAMS): Add file_handle. (TESTS): Add file_handle.test. * tests/.gitignore: Add file_handle.
/external/strace/pathtrace.c
|
ea1970500ed1b5a1888de3ff6347471c822182fa |
|
22-Nov-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement kexec_file_load syscall decoding * xlat/kexec_file_load_flags.in: New file. * kexec.c: Include "xlat/kexec_file_load_flags.h". (SYS_FUNC(kexec_file_load)): New function. * linux/dummy.h (sys_kexec_file_load): Remove stub alias. * pathtrace.c (pathtrace_match): Add SEN_kexec_file_load.
/external/strace/pathtrace.c
|
87d64ed61f3b3883e2ea282d7f21ea6f9c3430a6 |
|
22-Nov-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
userfaultfd: fix pathtrace support * pathtrace.c (pathtrace_match): Add SEN_userfaultfd.
/external/strace/pathtrace.c
|
2716346602816ba7b74234a04b8e273e78b295cc |
|
02-Aug-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
epoll_create1: fix pathtrace support * pathtrace.c (pathtrace_match): Add SEN_epoll_create1.
/external/strace/pathtrace.c
|
80d5e012a1ed6421ea00d4d8c830667889a059bc |
|
30-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Assume that <poll.h> is available * configure.ac (AC_CHECK_HEADERS): Remove poll.h and sys/poll.h. * pathtrace.c: Include <poll.h> unconditionally. * stream.c: Likewise. [HAVE_SYS_POLL_H]: Compile unconditionally. [!HAVE_SYS_POLL_H]: Remove.
/external/strace/pathtrace.c
|
95b84ea641e724dff6e0f9b7d66a8a00b75c196a |
|
29-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement memfd_create syscall decoding * memfd_create.c: New file. * Makefile.am (strace_SOURCES): Add it. * linux/dummy.h (sys_memfd_create): Remove. * pathtrace.c (pathtrace_match): Add SEN_memfd_create. * xlat/memfd_create_flags.in: New file. * tests/memfd_create.c: New file. * tests/memfd_create.expected: Likewise. * tests/memfd_create.test: New test. * tests/Makefile.am: (check_PROGRAMS): Add memfd_create. (TESTS): Add memfd_create.test. (EXTRA_DIST): Add memfd_create.expected. * tests/.gitignore: Add memfd_create.
/external/strace/pathtrace.c
|
ddb53dd142ea6702afbc1ff238840969183a709d |
|
26-Jul-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement bpf syscall decoding * bpf.c: New file. * Makefile.am (strace_SOURCES): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/bpf.h. * linux/dummy.h (sys_bpf): Remove. * pathtrace.c (pathtrace_match): Add SEN_bpf. * xlat/bpf_commands.in: New file. * xlat/bpf_map_types.in: New file. * xlat/bpf_map_update_elem_flags.in: New file. * xlat/bpf_prog_types.in: New file. * tests/bpf.c: New file. * tests/bpf.test: New test. * tests/Makefile.am (check_PROGRAMS): Add bpf. (TESTS): Add bpf.test. * tests/.gitignore: Add bpf.
/external/strace/pathtrace.c
|
483c15f4bec9c28c34fdf9cd5ffd86ff7f43b928 |
|
10-Jul-2015 |
Elvira Khabirova <lineprinter0@gmail.com> |
Change comparisons with function pointers to comparisons with SENs * pathtrace.c (pathtrace_match): Change all comparisons with function pointers to a single SEN based switch. * syscall.c (dumpio, trace_syscall_entering): Change all comparisons with function pointers to comparisons with SENs. * ipc.c (sys_ipc): Remove. * sock.c (sys_socketcall): Likewise. * linux/dummy.h (sys_ipc, sys_socketcall): New aliases.
/external/strace/pathtrace.c
|
6c8ef051f726138b07f6d1ac50c32ffcd6f7996a |
|
26-May-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Consistently use error_msg instead of fprintf(stderr) * linux/alpha/get_scno.c: Use error_msg. * linux/arm/get_scno.c: Likewise. * linux/mips/get_scno.c: Likewise. * linux/sh/get_scno.c: Likewise. * linux/x86_64/get_scno.c: Likewise. * exit.c (sys_exit): Likewise. * pathtrace.c (pathtrace_select, pathtrace_match): Likewise. * strace.c (alloctcb, droptcb, detach, startup_attach, test_ptrace_seize, init, cleanup, print_debug_info, maybe_allocate_tcb, startup_tcb, trace): Likewise. * syscall.c (update_personality, trace_syscall_exiting, get_scno): Likewise. * unwind.c (DPRINTF): Likewise. * tests/bexecve.test: Update patterns. * tests/detach-stopped.test: Likewise.
/external/strace/pathtrace.c
|
3e9d71feaad428f0f8e335f83b86e9f2a16781fb |
|
25-May-2015 |
Dmitry V. Levin <ldv@altlinux.org> |
Introduce memory allocation wrappers Introduce wrappers to the following functions that do memory allocation: malloc, calloc, realloc, strdup. This commit is a follow-up to the related discussions in strace-devel ML: http://sourceforge.net/p/strace/mailman/message/33618180/ http://sourceforge.net/p/strace/mailman/message/33733470/ * defs.h (xmalloc, xcalloc, xreallocarray, xstrdup): New prototypes. * xmalloc.c: New file. * Makefile.am (strace_SOURCES): Add it. * count.c (count_syscall, call_summary_pers): Use xcalloc. * desc.c (decode_select): Use xmalloc. * dirent.c (sys_getdents, sys_getdents64): Likewise. * net.c (sys_recvmmsg): Use xstrdup. * pathtrace.c (storepath): Use xreallocarray. (pathtrace_match): Use xmalloc. * strace.c (die_out_of_memory): Move to xmalloc.c. (expand_tcbtab): Use xcalloc and xreallocarray. (startup_child): Use xstrdup. (init): Use xmalloc, xcalloc, and xstrdup. * syscall.c (reallocate_qual): Use xreallocarray. (qualify): Use xstrdup. * unwind.c (unwind_tcb_init): Use xmalloc. (build_mmap_cache): Use xcalloc, xreallocarray, and xstrdup. (get_symbol_name): Use xreallocarray. (stacktrace_walk, queue_put): Use xmalloc. * util.c (printstr): Use xmalloc. * vsprintf.c (strace_vfprintf): Likewise.
/external/strace/pathtrace.c
|
7e69ed98cdd3c8ee0bba783927bc95b895c60160 |
|
21-Mar-2015 |
Denys Vlasenko <dvlasenk@redhat.com> |
Change last parameter of umoven() from char* to void* Saves tons of casts. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
6355a1f8677857f613a8b3bbd209506d1634c73f |
|
01-Dec-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Alias sys_mkdir and sys_mkdirat to sys_chmod and sys_fchmodat Special parsers for mkdir and mkdirat are redundant because sys_chmod and sys_fchmodat implement the same decoding. * file.c (decode_mkdir, sys_mkdir, sys_mkdirat): Remove. * linux/dummy.h (sys_mkdir): Alias to sys_chmod. (sys_mkdirat): Alias to sys_fchmodat. * linux/syscall.h (sys_mkdir, sys_mkdirat): Remove. * pathtrace.c (pathtrace_match): Do not check for sys_mkdirat.
/external/strace/pathtrace.c
|
5b677ab904f4ab8b272fdc78b2b9e8321412392d |
|
14-Aug-2014 |
Mike Frysinger <vapier@gentoo.org> |
renameat2: add decoding support * file.c (decode_renameat, sys_renameat2): New functions. (sys_renameat): Use decode_renameat. * pathtrace.c (pathtrace_match): Handle sys_renameat2. * linux/syscall.h (sys_renameat2): New prototype. * xlat/rename_flags.in: New file.
/external/strace/pathtrace.c
|
99db95dd039d8fd700e7759bf4969abb55b979b9 |
|
05-Feb-2014 |
Dmitry V. Levin <ldv@altlinux.org> |
Implement fanotify_init and fanotify_mark decoding * fanotify.c: New file. * linux/fanotify.h: Likewise. * Makefile.am (strace_SOURCES): Add fanotify.c. (EXTRA_DIST): Add linux/fanotify.h. * defs.h (print_dirfd): New prototype. * file.c (print_dirfd): Export. * linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove. * linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New prototypes. * pathtrace.c (pathtrace_match): Handle sys_fanotify_init and sys_fanotify_mark.
/external/strace/pathtrace.c
|
894c7e3858ede412e37a1752c716bed7f30a9605 |
|
01-Feb-2014 |
Philippe Ombredanne <pombredanne@nexb.com> |
Add decoding of sockets descriptor 'paths' for network calls * net.c (sys_bind, sys_listen, do_accept, sys_send, sys_sendto, sys_sendmsg, sys_sendmmsg, sys_recv, sys_recvfrom, sys_recvmsg, sys_recvmmsg, sys_shutdown, sys_getsockopt, sys_setsockopt): Decode socket descriptor arguments using printfd. * pathtrace.c (pathtrace_match): Also check TRACE_NETWORK syscalls that take socket descriptor arguments. * tests/net-fd.test: New test for socket descriptor arguments decoding. * tests/Makefile.am (TESTS): Add net-fd.test. (net-fd.log): New dependency on net.log. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/pathtrace.c
|
d64a7e4755abe2d073676741f38328aa0b83db9f |
|
06-Nov-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
Include <sys/poll.h> only if there is no <poll.h> * pathtrace.c: Do not include <sys/poll.h> if <poll.h> is available. * stream.c: Likewise.
/external/strace/pathtrace.c
|
64778cbfa62d9584c59d3a48b69ba1ebf8bd24e9 |
|
09-Nov-2013 |
Denys Vlasenko <dvlasenk@redhat.com> |
Fix pathtrace_match() to match recent fixes to select decoding. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
61ad0a401c6d1b7b4c1a209f9d61c3790e1e7d15 |
|
06-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Stop using a large static buffer in getfdpath text data bss dec hex filename 245075 680 9836 255591 3e667 strace_old 245143 680 5708 251531 3d68b strace Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
38cfe7c92328e940c71074c9b579b5bf9f2cb2f6 |
|
05-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove variable tracing_paths and check in pathtrace_match Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
7239dbcf2dff792f408c60fe3e278f707fdf497b |
|
05-Mar-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Use dynamically-sized selected[] array for -P PATH While at it, added a small optimization of not remembering the path twice if it happens to be the same. text data bss dec hex filename 245111 680 10860 256651 3ea8b strace_old 245075 680 9804 255559 3e647 strace Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
1a880cf3bd8c12af6d831c2dfa5b259be074d77a |
|
26-Feb-2013 |
Dmitry V. Levin <ldv@altlinux.org> |
pathtrace: fix umovestr return code check * pathtrace.c (upathmatch): Only NUL-terminated strings can be path-matched, so fix the umovestr return code check to filter out unsuitable strings.
/external/strace/pathtrace.c
|
a9fe13c9437707fa132fde4e51a20d88381e7430 |
|
22-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Create and use struct_sysent and struct_ioctlent typedefs. This is a preparatory mass replace patch with no code changes. The future change will need to typedef sysent to sysent0, which results in compile failures when "struct sysent" string gets mangled into "struct sysent0". Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
74ec14f968a418691b851cbbfeb0269174c64b08 |
|
21-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Eliminate many SCNO_IS_VALID checks By adding tcp->s_ent pointer tot syscall table entry, we can replace sysent[tcp->scno] references by tcp->s_ent. More importantly, we may ensure that tcp->s_ent is always valid, regardless of tcp->scno value. This allows us to drop SCNO_IS_VALID(tcp->scno) checks before we access syscall table entry. We can optimize (qual_flags[tcp->scno] & QUAL_foo) checks with a similar technique. Resulting code shrink: text data bss dec hex filename 245975 700 19072 265747 40e13 strace.t3/strace 245703 700 19072 265475 40d03 strace.t4/strace * count.c (count_syscall): Use cheaper SCNO_IN_RANGE() check. * defs.h: Add "int qual_flg" and "const struct sysent *s_ent" to struct tcb. Remove "int u_nargs" from it. Add UNDEFINED_SCNO constant which will mark undefined scnos in tcp->qual_flg. * pathtrace.c (pathtrace_match): Drop SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno]. * process.c (sys_prctl): Use tcp->s_ent->nargs instead of tcp->u_nargs. (sys_waitid): Likewise. * strace.c (init): Add compile-time check that DEFAULT_QUAL_FLAGS constant is consistent with init code. * syscall.c (decode_socket_subcall): Use tcp->s_ent->nargs instead of tcp->u_nargs. Set tcp->qual_flg and tcp->s_ent. (decode_ipc_subcall): Likewise. (printargs): Use tcp->s_ent->nargs instead of tcp->u_nargs. (printargs_lu): Likewise. (printargs_ld): Likewise. (get_scno): [MIPS,ALPHA] Use cheaper SCNO_IN_RANGE() check. If !SCNO_IS_VALID, set tcp->s_ent and tcp->qual_flg to default values. (internal_fork): Use tcp->s_ent instead of sysent[tcp->scno]. (syscall_fixup_for_fork_exec): Remove SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno]. (get_syscall_args): Likewise. (get_error): Drop SCNO_IS_VALID check where it is redundant. (dumpio): Drop SCNO_IS_VALID check where it is redundant. Use tcp->s_ent instead of sysent[tcp->scno]. (trace_syscall_entering): Use (tcp->qual_flg & UNDEFINED_SCNO) instead of SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno]. Drop SCNO_IS_VALID check where it is redundant. Print undefined syscall name with undefined_scno_name(tcp). (trace_syscall_exiting): Likewise. * util.c (setbpt): Use tcp->s_ent instead of sysent[tcp->scno]. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
1ba85436def7da80971aeb902fbc6e52997a46fa |
|
19-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Clean up mmap decoding Previous code merges too many similar, but different ways of decoding mmap. For example, sys_old_mmap is "params in memory" API... except SH[64], where it is "params in regs", i.e. what sys_mmap ("new mmap") function does on other arches! It's much simpler when every mmap handler has same API regardless of arch. Where API means whether params are in regs or in memory, and whether offset is in bytes, pages, or 4k blocks. Then we just insert correct function pointers into arch syscall tables. It turns out there are four common mmap APIs over all architectures which exist in Linux kernel, and one outlier for S390. A number of mmap decoders were plain wrong in arch tables. For example, BFIN has no old_mmap. It returns ENOSYS. I checked kernel sources for all arches nad fixed the tables. There was dead code for x86_64 for old_mmap: x86_64 has no old_mmap. * mem.c: Refactor mmap functions so that we have five mmap syscall handlers, each with the fixed API (not varying by arch). * pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks. * linux/syscall.h: Declare new mmap syscall handler functions. * linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff. * linux/avr32/syscallent.h: mmap is sys_mmap_pgoff. * linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff. * linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff. * linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff. * linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff. * linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff. * linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff. * linux/mips/syscallent.h: mmap is sys_mmap_4kgoff. * linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff. * linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff. * linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff. * linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg. * linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff. * linux/sh64/syscallent.h: Likewise. * linux/sparc/syscallent1.h: mmap is TD|TM. * linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
5721cdbcdba76eef854a30e7e56e328eae976e44 |
|
16-Feb-2013 |
Denys Vlasenko <vda.linux@googlemail.com> |
Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
7943966f6cd137e44f27d56aaf21b023fb1fae63 |
|
27-Oct-2012 |
Dmitry V. Levin <ldv@altlinux.org> |
Enhance quotactl decoding * quota.c (sys_quotactl): Decode 2nd syscall argument using printpath. * pathtrace.c (pathtrace_match): Add quotactl support. * linux/*/syscallent.h: Add TF flag to quotactl entry.
/external/strace/pathtrace.c
|
085e42886052190d3e515ca865546b527f59cdd1 |
|
17-Apr-2012 |
H.J. Lu <hongjiu.lu@intel.com> |
x32: add ia32 support * Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h, linux/x32/ioctlent1.h, linux/x32/signalent1.h and linux/x32/syscallent1.h. * configure.ac: Remove AC_GNU_SOURCE, obsoleted by AC_USE_SYSTEM_EXTENSIONS. * defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32. (PERSONALITY1_WORDSIZE): Set to 4 for X32. * file.c (stat64): New struct for X32. (sys_lseek32): New function for X32. (stat64): Undef. (sys_fstat64): Likewise. (sys_stat64): Likewise. (realprintstat64): New function for X32. (sys_fstat64): Likewise. (sys_stat64): Likewise. * mem.c (sys_old_mmap): New function for X32. * pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32. * syscall.c (update_personality): Add X32 support. (get_scno): Support currpers == 1 for X32. * linux/syscall.h (sys_lseek32): New function prototype for X32. * linux/x32/errnoent1.h: New file. * linux/x32/ioctlent1.h: Likewise. * linux/x32/signalent1.h: Likewise. * linux/x32/syscallent1.h: Likewise.
/external/strace/pathtrace.c
|
35be58119e3727a694d8c9f9b83f372401fcc4c0 |
|
16-Apr-2012 |
H.J. Lu <hongjiu.lu@intel.com> |
Add x32 support to strace X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with 32bit pointers. At system call level, x32 is also identical to x86-64, as shown by many changes like "defined(X86_64) || defined(X32)". The main differerence bewteen x32 and x86-64 is off_t in x32 is long long instead of long. This patch adds x32 support to strace. Tested on Linux/x32. * configure.ac: Support X32. * defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64, Set PERSONALITY2_WORDSIZE to 4 for X86_64. Add tcb::ext_arg for X32. * file.c (stat): New for X32. (sys_lseek): Use 64-bit version for X32. (printstat64): Check current_personality != 1 for X86_64. * ipc.c (indirect_ipccall): Check current_personality == 1 for X86_64. * mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL for zero address. Call printllval for offset for X32. * pathtrace.c (pathtrace_match): Don't check sys_old_mmap for X32. * process.c (ARG_FLAGS): Defined for X32. (ARG_STACK): Likewise. (ARG_PTID): Likewise. (change_syscall): Handle X32. (struct_user_offsets): Support X32. (sys_arch_prctl): Likewise. * signal.c: Include <asm/sigcontext.h> for X32. (SA_RESTORER): Also define for X32. * syscall.c (update_personality): Support X32 for X86_64. (is_restart_error): Likewise. (syscall_fixup_on_sysenter): Likewise. (get_syscall_args): Likewise. (get_syscall_result): Likewise. (get_error): Likewise. (__X32_SYSCALL_BIT): Define if not defined. (__X32_SYSCALL_MASK): Likewise. (get_scno): Check DS register value for X32. Use __X32_SYSCALL_MASK on X32 system calls. * util.c (printllval): Use ext_arg for X32. (printcall): Support X32. (change_syscall): Likewise. (arg0_offset): Likewise. (arg1_offset): Likewise. * Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h, linux/x32/ioctlent.h.in, linux/x32/signalent.h, linux/x32/syscallent.h, linux/x86_64/errnoent2.h, linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and linux/x86_64/syscallent2.h. * linux/x32/errnoent.h: New. * linux/x32/ioctlent.h.in: Likewise. * linux/x32/signalent.h: Likewise. * linux/x32/syscallent.h: Likewise. * linux/x86_64/errnoent2.h: Likewise. * linux/x86_64/ioctlent2.h: Likewise. * linux/x86_64/signalent2.h: Likewise. * linux/x86_64/syscallent2.h: Likewise. Signed-off-by: H.J. Lu <hongjiu.lu@intel.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
a6d91ded3f2d5401e09a9c2fa442aabfbfe593a8 |
|
16-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Tidy up includes and copyright notices, fix indentation The files not mentioned in changelog below had only copyright notices fixes and indentation fixes. * defs.h: Include <stdint.h> and <inttypes.h>. * file.c: Do not include <inttypes.h>. Move struct kernel_dirent declaration below top include block. * block.c: Do not include <stdint.h> and <inttypes.h>. * quota.c: Likewise. * desc.c: Likewise. * signal.c: Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
384b0ada7d821f3797bf5d72dcf096032d662193 |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Fix array size calculation in previous commit * pathtrace.c (getfdpath): Fix array size calculation. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
29865e77e6eee0c380befd0ce53657b5604975ef |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
pathtrace_select() is never called with NULL, remove dead code pathtrace_select() is only called for -P FILE options, and FILE is never a NULL pointer. text data bss dec hex filename 239453 672 19012 259137 3f441 strace.before 239329 672 19012 259013 3f3c5 strace * pathtrace.c (pathtrace_select): Remove "if (path == NULL)...". (pathtrace_select): Remove code which only executes if path == NULL. The code was also buggy, it can free non-malloced pointer. (getfdpath): Simplify snprintf to sprintf. (pathmatch): Use strcmp() == 0 idiom for string equality test. (pathtrace_match): Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
bcde70adbcff01af4a0675d2fd9d9522807d573e |
|
15-Mar-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Remove extra include directives. No code changes. * defs.h: Include <signal.h> unconditionally. Other files were doing it unconditionally, so no harm done. * bjm.c: Remove system includes which are already included by defs.h. * pathtrace.c: Likewise. * process.c: Likewise. * signal.c: Likewise. * strace.c: Likewise. * stream.c: Likewise. * syscall.c: Likewise. * system.c: Likewise. * util.c: Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
e83e157021177930b64ec4aa4983bbe13b39e91b |
|
25-Feb-2012 |
Dmitry V. Levin <ldv@altlinux.org> |
Compress blank lines Suppress repeated empty lines left after automated code removal. This change was made by filtering every source code file through "cat -s".
/external/strace/pathtrace.c
|
ed720fda5d515f1359fcd3242223e553d1216789 |
|
25-Feb-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Automated removal of non-Linux code This change is generated by running every source through the following command: unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD -USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS -UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
bdec9cbcebd256dbebf8fd2f7e35dec55b8bd5ae |
|
06-Feb-2012 |
Dmitry V. Levin <ldv@altlinux.org> |
strace -P: fix handling of invalid syscalls * pathtrace.c (pathtrace_match): Check the given syscall number using SCNO_IN_RANGE.
/external/strace/pathtrace.c
|
6cecba53225ae30f1a28ce6954fb0cda847f3688 |
|
20-Jan-2012 |
Denys Vlasenko <vda.linux@googlemail.com> |
Change umovestr API: return > 0 instead of 0 if NUL was seen * pathtrace.c (upathmatch): Adjust umovestr return value check for new API. * util.c (printpathn): Use umovestr() > 0 return value for more efficient (and robust - we don't depend on "no overwrote past NUL" behavior anymore) handling of terminating NUL. (printstr): Remove useless NUL placement before umovestr() call. Allocate 1 byte more to outstr[] array - for NUL. (umovestr): Change to return 1 if NUL was seen. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/pathtrace.c
|
ad178c0dc050a0bd68179ca60f3aebe0ff6ddd89 |
|
28-Nov-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Remove redundant parsers * desc.c (sys_dup): Remove. * file.c (sys_pivotroot, sys_rmdir, sys_fchdir, sys_chroot, sys_fchroot, sys_unlink, sys_symlink, sys_rename): Remove. * linux/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_pivotroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove. * linux/dummy.h: Add aliases for sys_chroot, sys_dup, sys_pivotroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink. * pathtrace.c (pathtrace_match): Update. * sunos4/dummy.h: Add aliases for sys_chroot, sys_dup, sys_fchdir, sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink. * svr4/dummy.h: Likewise. * sunos4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove. * svr4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
/external/strace/pathtrace.c
|
79a79ea851250a30005d6323b20a9e30d9f336c1 |
|
01-Sep-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Roll back "die on malloc failure" behaviour a bit After recent change, select(2^31-1, NULL, NULL, NULL) would make strace exit. This change caps fdsize so that it is always in [0, 1025*1024], IOW: we will try to allocate at most 1 megabyte, which in practice will almost always work, unlike malloc(2Gig). * desc.c (decode_select): Cap fdsize to 1024*1024. * pathtrace.c (pathtrace_match): Cap fdsize to 1024*1024. * file.c (sys_getdents): Cap len to 1024*1024. (sys_getdents64): Cap len to 1024*1024. * util.c (dumpiov): Refuse to process iov with more than 1024*1024 elements. Don't die on malloc failure. (dumpstr): Don't die on malloc failure. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
1d46ba57a8ab16b353b531f2bbefe2ad7f354ca9 |
|
31-Aug-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Make out-of-memory handling more uniform This fixes one real bug in dumpstr(). * defs.h: Declare die_out_of_memory(). * strace.c (die_out_of_memory): New function. (strace_popen): If allocation fails, call die_out_of_memory(). (main): Likewise. (expand_tcbtab): Likewise. (rebuild_pollv): Likewise. * count.c (count_syscall): Likewise. (call_summary_pers): Likewise. * desc.c (decode_select): Likewise. * file.c (sys_getdents): Likewise. (sys_getdents64): Likewise. (sys_getdirentries): Likewise. * pathtrace.c (pathtrace_match): Likewise. * syscall.c (qualify): Likewise. * util.c (printstr): Likewise. (dumpiov): Likewise. (dumpstr): Likewise. (fixvfork): Likewise. * mem.c (sys_mincore): Don't check free() parameter for NULL. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
b038a43d756c84f98868557a1bbacd048faf1e53 |
|
30-Aug-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Include <sys/param.h> to get PATH_MAX definition * pathtrace.c: Include <sys/param.h> instead of <limits.h> to get PATH_MAX definition. Reported-by: Steve Bennett <steveb@workware.net.au>
/external/strace/pathtrace.c
|
7b609d5ba0852e6c56ba311350ebd4412361777b |
|
22-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Whitespace cleanups. No code changes. * count.c: Place opening curly brace after if (), not on the next line. Almost all strace code alredy uses this style. * desc.c: Likewise. * file.c: Likewise. * net.c: Likewise. * pathtrace.c: Likewise. * process.c: Likewise. * quota.c: Likewise. * signal.c: Likewise. * strace.c: Likewise. * syscall.c: Likewise. * time.c: Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
fcda7a5f4fcfbedb5493bbfc1b37e53c6b3a575c |
|
13-Jun-2011 |
Dmitry V. Levin <ldv@altlinux.org> |
Introduce ARRAY_SIZE() macro * defs.h (ARRAY_SIZE): New macro. * ioctl.c: Use it. * pathtrace.c (pathmatch, storepath): Likewise. * process.c (printpriv): Likewise. * signal.c: Likewise. * syscall.c: Likewise.
/external/strace/pathtrace.c
|
b63256e69bf3f1a74aadb0e14556490bc8f4ef95 |
|
07-Jun-2011 |
Denys Vlasenko <dvlasenk@redhat.com> |
Whitespace cleanups. no code changes. * bjm.c: Fix tabulation (such as extra spaces before tabs), convert punctuation where it deviates from prevalent form elsewhere in strace code, convert sizeof and offsetof where it deviates from from prevalent form, remove space between function/macro/array names and (parameters) or [index], add space between "if" and (condition), correct non-standard or wrong indentaion. * defs.h: Likewise * desc.c: Likewise * file.c: Likewise * ipc.c: Likewise * linux/arm/syscallent.h: Likewise * linux/avr32/syscallent.h: Likewise * linux/hppa/syscallent.h: Likewise * linux/i386/syscallent.h: Likewise * linux/ioctlsort.c: Likewise * linux/m68k/syscallent.h: Likewise * linux/microblaze/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/tile/syscallent.h: Likewise * linux/x86_64/syscallent.h: Likewise * mem.c: Likewise * net.c: Likewise * pathtrace.c: Likewise * process.c: Likewise * signal.c: Likewise * sock.c: Likewise * strace.c: Likewise * stream.c: Likewise * sunos4/syscall.h: Likewise * sunos4/syscallent.h: Likewise * svr4/syscall.h: Likewise * svr4/syscallent.h: Likewise * syscall.c: Likewise * system.c: Likewise * test/childthread.c: Likewise * test/leaderkill.c: Likewise * test/skodic.c: Likewise * time.c: Likewise * util.c: Likewise Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/pathtrace.c
|
8a08277d13d0378c2ff3ce851534c3bf7e31defa |
|
07-Apr-2011 |
Grant Edwards <grant.b.edwards@gmail.com> |
Add ability to print file descriptor paths and filter by those paths * pathtrace.c: New file, implements matching syscall arguments to user-specified file paths. * Makefile.am (strace_SOURCES): Add pathtrace.c. * defs.h (TCB_FILTERED, filtered): New defines. (getfdpath, pathtrace_select, pathtrace_match, show_fd_path, tracing_paths): New declarations. * strace.c (show_fd_path, tracing_paths): New global variables. (usage, main): Implement handling of -y and -P options. * strace.1: Add descriptions of -y and -P options. * syscall.c (trace_syscall_entering): Add path matching logic to the print/noprint decision and set the TCB_FILTERED bit appropriately. (trace_syscall_exiting): Use filtered() macro that checks the TCB_FILTERED bit to determine print/noprint status. * util.c (printfd): Use getfdpath().
/external/strace/pathtrace.c
|