Commit Graph

251 Commits

Author SHA1 Message Date
2307d5c968 signal.c: move signalfd parsers to a separate file
* signalfd.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* signal.c (do_signalfd, sys_signalfd, sys_signalfd4): Move to signalfd.c
2015-08-03 09:12:26 +00:00
aba868c6c4 desc.c: move epoll parsers to a separate file
* epoll.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* desc.c (sys_epoll_create1, print_epoll_event, sys_epoll_ctl,
print_epoll_event_array, epoll_wait_common, epoll_wait, epoll_pwait):
Move to epoll.c.
2015-08-01 23:30:03 +00:00
28471d17f9 desc.c: move eventfd parsers to a separate file
* eventfd.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* desc.c (do_eventfd, sys_eventfd, sys_eventfd2): Move to eventfd.c.
2015-08-01 20:46:43 +00:00
0d60cf753e desc.c: move perf_event_open parser to a separate file
* perf.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* desc.c (sys_perf_event_open): Move to perf.c.
2015-08-01 20:46:37 +00:00
811bda6225 stream.c: move poll and ppoll parsers to a separate file
* poll.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* stream.c (decode_poll, sys_poll, sys_ppoll): Move to poll.c.
2015-07-30 22:03:07 +00:00
95b84ea641 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.
2015-07-29 09:18:26 +00:00
ddb53dd142 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.
2015-07-27 15:27:43 +00:00
0e946ab2c2 defs.h: do not include <signal.h>
* printsiginfo.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h: Do not include <signal.h>.
(printsiginfo): Remove.
* printsiginfo.c: Include <signal.h> and "printsiginfo.h".
* strace.c: Likewise.
* sigaltstack.c: Include <signal.h>.
* signal.c: Likewise.
* sigreturn.c: Likewise.
* time.c: Likewise.
2015-07-18 00:01:40 +00:00
1e08a160f7 resource.c: move printrusage and printrusage32 to a separate file
* printrusage.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* resource.c (printrusage, [ALPHA] printrusage32): Move
to printrusage.c.
2015-07-18 00:01:40 +00:00
Elvira Khabirova
28e32df56f Add unique syscall entry numbers (SENs)
* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h.
(syscallent_names, syscallent_patterns, syscallent_files): New variables.
(sen.h): New rule.
* defs.h (struct sysent): Add sen field.
* generate_sen.sh: New file.
* linux/syscall.h: Include "sen.h".
* syscall.c (SEN_NAME): New temporary macro.
(SEN): Use it to prepend syscall entry number.
2015-07-12 22:31:49 +00:00
746db06d91 time.c: move rtc ioctl parser to a separate file
* rtc.c: new file
* Makefile.am (strace_SOURCES): Add it.
* time.c (print_rtc, rtc_ioctl): Move to rtc.c.
2015-07-05 21:37:26 +00:00
3e9d71feaa 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.
2015-05-25 22:25:22 +00:00
8c20d8926c Fix ioctl entries on 32-bit architectures with 64-bit aligned structures
Some ioctl constants are defined to different values on those 32-bit
architectures where structures containing a 64-bit field are aligned on
a 8-byte boundary and have a size multiple of 8 bytes, and on other
32-bit architectures.

* configure.ac: Check the size of a structure containing a 64-bit field.
* linux/32/ioctls_inc.h: Rename to ...
* linux/32/ioctls_inc_align32.h: ... this.
* linux/32/ioctls_inc_align64.h: New file.
* linux/32/ioctls_inc.h: Include either 32/ioctls_inc_align32.h
or ioctls_inc_align64.h depending on SIZEOF_STRUCT_I64_I32.
* Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align32.h and
* linux/32/ioctls_inc_align64.h.
* tests/ioctl.c (main): Test for VIDIOC_ENUMINPUT.
* tests/ioctl.expected: Check VIDIOC_ENUMINPUT decoding.

Reported-by: Philippe De Muyter <phdm@macqel.be>
2015-05-21 22:53:42 +00:00
Ezequiel Garcia
bd8dd776db Add support for Altera's Nios-II softcore architecture
This commit adds strace support for Altera's Nios-II.  The architecture
is supported by Linux since v3.19, and it implements the generic syscall
ABI.

* configure.ac: Add nios2 support.
* cacheflush.c [NIOS2] (sys_cacheflush): New function.
* linux/nios2/*: New Nios-II specific files.
* Makefile.am (EXTRA_DIST): Add them.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
2015-05-19 22:41:49 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
537c964fe9 signal.c: move siginfo_t parsers to a separate file
* printsiginfo.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (printsiginfo): Change second argument's type from int to bool.
* signal.c: Stop defining siginfo_t related constants.
Move inclusion of xlat/sig*_codes.h files to printsiginfo.c
(printsigsource, printsigval, printsiginfo_at): Move to printsiginfo.c.
(printsiginfo): Change second argument's type from int to bool,
split, and move to printsiginfo.c.
2015-03-27 23:41:00 +00:00
174bb2b36e signal.c: move sigaltstack parser to a separate file
* sigaltstack.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* signal.c (print_stack_t, sys_sigaltstack): Move to sigaltstack.c.
* xlat/sigaltstack_flags.in: Add default values.
2015-03-26 15:43:07 +00:00
Denys Vlasenko
588a90f0f0 sparc: rename personality 2 files to personality 1
Run-tested in qemu 32-bit sparc.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-03-25 15:21:57 +01:00
Denys Vlasenko
df4dd8b540 sparc: delete personality 1
Personality 1 for sparc and sparc64 appears to be an old attempt
to support stracing Solaris binaries.

It stalled after the only syscall, solaris_open, was covered:
all other solaris_foo's are printargs.

This change deletes personality 1. Now sparc is an one-personality
arch, and sparc64 is a two-personality one.

For clarity, pure renaming of personality 2 files to personality 1 for sparc64
is performed in the next commit - this prevents a state where syscallent1.h
seems to indergo a lot of changes, where in fact in is deleted, and then
replaced by syscallent2.h

Therefore, tree at this commit will not build.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-03-25 15:21:57 +01:00
8e8d7d219e mips: fix pipe syscall decoding
* linux/mips/arch_getrval2.c: New file.
* Makefile.am (EXTRA_DIST): Add it.
* defs.h [MIPS] (HAVE_GETRVAL2): Define.
2015-03-24 00:05:43 +00:00
a3c483545a sigreturn.c: split arch specific code into separate arch files
Split code that use arch-specific registers to separate arch files.

* sigreturn.c (sys_sigreturn): Move arch-specific code
to linux/*/arch_sigreturn.c, include "arch_sigreturn.c".
* linux/arch_sigreturn.c: New file.
* Makefile.am (EXTRA_DIST): Add linux/arch_sigreturn.c
and linux/*/arch_sigreturn.c files.
2015-03-23 22:25:05 +00:00
d70d1c4aa6 syscall.c: split arch specific code into separate arch files
Split code that use arch-specific registers to separate arch files.

* syscall.c: Move definitions of variables containing fetched registers
to linux/*/arch_regs.c files.
[HAVE_GETRVAL2] (getrval2): Move arch-specific code
to linux/*/arch_getrval2.c, include "arch_getrval2.c".
(print_pc): Move arch-specific code to linux/*/print_pc.c files,
include "print_pc.c".
[X86_64] (x86_64_getregs_old): Rename to getregs_old, move to
linux/x86_64/getregs_old.c, include "getregs_old.c".
[POWERPC] (powerpc_getregs_old): Rename to getregs_old, move to
linux/powerpc/getregs_old.c, include "getregs_old.c".
(get_regs) [X86_64, POWERPC]: Update callers.
(get_scno): Move arch-specific code to linux/*/get_scno.c,
include "get_scno.c".
(get_syscall_args): Move arch-specific code
to linux/*/get_syscall_args.c, include "get_syscall_args.c".
(get_error): Move arch-specific code to linux/*/get_error.c,
include "get_error.c".
(get_syscall_result): Move arch-specific code
to linux/*/get_syscall_result.c, include "get_syscall_result.c".
* Makefile.am (EXTRA_DIST): Add new linux/*/*.c files.
2015-03-23 22:24:59 +00:00
Andreas Schwab
64fc9cedc4 Distribute linux/aarch64/arch_regs.h
* Makefile.am (EXTRA_DIST): Add linux/aarch64/arch_regs.h.
2015-03-12 14:15:50 +01:00
74219ea36f Move sigreturn/rt_sigreturn parser to a separate file
* sigreturn.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (sprintsigmask_n): New prototype.
(tprintsigmask_addr): New macro.
* signal.c (sprintsigmask_n): Make global.
(tprintsigmask_addr): Remove.
(sys_sigreturn): Move to sigreturn.c.
2015-03-06 02:19:01 +00:00
20eca8a1c5 s390, s390x: use PTRACE_GETREGSET to fetch registers
* linux/s390/arch_regs.h: New file.
* linux/s390x/arch_regs.h: New file.
* Makefile.am (EXTRA_DIST): Add them.
* signal.c (sys_sigreturn) [S390 || S390X]: Use s390_frame_ptr.
* syscall.c [S390 || S390X] (s390_regset, s390_frame_ptr): New variable.
[S390 || S390X] (ARCH_REGS_FOR_GETREGSET): New macro.
(print_pc) [S390 || S390X]: Use s390_regset.
(get_scno) [S390 || S390X]: Likewise.
(get_syscall_args) [S390 || S390X]: Likewise.
(get_error) [S390 || S390X]: Likewise.
(get_syscall_result) [S390 || S390X]: Remove.
2015-03-05 22:10:15 +00:00
7abfd29834 ia64: use generic signalent
This complements commit v4.9-321-gfcf7f8d.

* linux/ia64/signalent.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
2015-03-04 12:06:26 +00:00
4341373f2c ioctl: use x32 specific ioctl entries on x32 personality
As ioctls_inc.h generated natively on x32 differs both from 32/ioctls_inc.h
(by 45 entries) and from linux/64/ioctls_inc.h (by 322 entries), use x32
specific ioctl entries on x32 personality.

* linux/x32/ioctls_inc0.h: Generate from linux v3.19 using ioctls_gen.sh.
* linux/x86_64/ioctlent2.h: Remove.
* linux/x86_64/ioctls_arch2.h: New file.
* linux/x86_64/ioctls_inc2.h: New file.
* Makefile.am (EXTRA_DIST): Remove linux/x86_64/ioctlent2.h, add
linux/x86_64/ioctls_arch2.h and linux/x86_64/ioctls_inc2.h.
2015-03-02 02:55:14 +00:00
Mike Frysinger
58c7fe9903 Fix cross-compiling of ioctlsort
Use the AX_PROG_CC_FOR_BUILD helper to set up build settings when cross
compiling.  This way ioctlsort uses the build tools all the time.

* configure.ac: Call AX_PROG_CC_FOR_BUILD.
* Makefile.am (ioctlsort_CC): Set to CC_FOR_BUILD.
(ioctlsort_CPPFLAGS): Change CPPFLAGS to CPPFLAGS_FOR_BUILD.
(ioctlsort_CFLAGS): Change CFLAGS to CFLAGS_FOR_BUILD.
(ioctlsort_LDFLAGS): Change LDFLAGS to LDFLAGS_FOR_BUILD.
(ioctlsort_LD): Delete.
(ioctlsort%): Change to ioctlsort%$(BUILD_EXEEXT).  Use ioctlsort_CFLAGS.
* m4/ax_prog_cc_for_build.m4: Import from the autoconf-archive package.
2015-02-27 04:43:06 +00:00
19fcb27764 x32: fix build regression
* linux/x32/arch_regs.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
2015-02-26 20:40:43 +00:00
7226c3a73d powerpc64: fix build regression
* linux/powerpc64/arch_regs.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
2015-02-23 21:54:07 +00:00
6826f98bc4 Cleanup auxiliary signalent files
* linux/aarch64/signalent1.h: Include "signalent.h".
* linux/powerpc64/signalent1.h: Likewise.
* linux/sparc64/signalent2.h: Likewise.
* linux/tile/signalent1.h: Likewise.
* linux/x32/signalent1.h: Likewise.
* linux/x86_64/signalent1.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/sparc64/signalent.h: Include "sparc/signalent.h".
* linux/sparc64/signalent1.h: Include "sparc/signalent1.h".
* linux/x32/signalent.h: Remove.
* Makefile.am (EXTRA_DIST): Remove linux/x32/signalent.h.
2015-02-23 20:55:11 +00:00
b2f8c77d66 Change errnoent.h files to use designated initializers
* signal.c (printsiginfo): Allow elements of errnoent array to be zero.
* syscall.c (trace_syscall_exiting): Likewise.
* errnoent.sh: Output designated initializers.
* linux/errnoent.h: Regenerated.
* linux/alpha/errnoent.h: Regenerated.
* linux/hppa/errnoent.h: Regenerated.
* linux/mips/errnoent.h: Regenerated.
* linux/sparc/errnoent.h: Regenerated.
* linux/sparc/errnoent1.h: Regenerated.
* linux/powerpc/errnoent.h: New file.
* linux/powerpc64/errnoent.h: Include "powerpc/errnoent.h".
* Makefile.am (EXTRA_DIST): Add linux/powerpc/errnoent.h
and linux/powerpc64/errnoent.h.
2015-02-23 13:29:17 +00:00
789bc3ad99 Cleanup auxiliary errnoent files
* linux/aarch64/errnoent1.h: Include "errnoent.h".
* linux/powerpc64/errnoent1.h: Likewise.
* linux/sparc64/errnoent2.h: Likewise.
* linux/tile/errnoent1.h: Likewise.
* linux/x32/errnoent1.h: Likewise.
* linux/x86_64/errnoent1.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/sparc64/errnoent.h: Include "sparc/errnoent.h".
* linux/sparc64/errnoent1.h: Include "sparc/errnoent1.h".
* linux/x32/errnoent.h: Remove.
* Makefile.am (EXTRA_DIST): Remove linux/x32/errnoent.h.
2015-02-23 03:56:06 +00:00
Etienne Gemsa
4f750b9ad1 Add decoding for evdev ioctls
This patch introduces decoding for evdev ioctls.  For EVIOCSFF the five
first members are decoded, the union is not.  The code was compiled and
tested on x86_64 with Linux 3.13.

* evdev.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (evdev_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call evdev_ioctl for 'E' ioctl commands.
* xlat/evdev_autorepeat.in: New file.
* xlat/evdev_ff_status.in: New file.
* xlat/evdev_ff_types.in: New file.
* xlat/evdev_keycode.in: New file.
* xlat/evdev_leds.in: New file.
* xlat/evdev_misc.in: New file.
* xlat/evdev_mtslots.in: New file.
* xlat/evdev_prop.in: New file.
* xlat/evdev_relative_axes.in: New file.
* xlat/evdev_snd.in: New file.
* xlat/evdev_switch.in: New file.
* xlat/evdev_sync.in: New file.

Signed-off-by: Etienne Gemsa <etienne.gemsa@lse.epita.fr>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2015-02-22 02:29:54 +00:00
87c715b32c Fix "make dist" regression
* Makefile.am (EXTRA_DIST): Remove README-linux.
2015-02-22 01:33:08 +00:00
34bbcc6270 Remove linux/fanotify.h
* linux/fanotify.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
* fanotify.c: Do not include <linux/fanotify.h>.
* xlat/fan_classes.in: Add default values.
* xlat/fan_event_flags.in: Likewise.
* xlat/fan_init_flags.in: Likewise.
* xlat/fan_mark_flags.in: Likewise.
2015-02-19 21:55:09 +00:00
2094573930 Remove linux/keyctl.h
* linux/keyctl.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
* keyctl.c: Do not include <linux/keyctl.h>.
* xlat/key_perms.in: Add default values.
* xlat/key_reqkeys.in: Likewise.
* xlat/key_spec.in: Likewise.
* xlat/keyctl_commands.in: Likewise.
2015-02-19 21:42:31 +00:00
ff6a55dee9 Remove linux/kexec.h
* linux/kexec.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
* kexec.c: Do not include <linux/kexec.h>.
* xlat/kexec_arch_values.in: Add default values.
* xlat/kexec_flags.in: Rename to kexec_load_flags.in, add default
values.
2015-02-19 21:29:01 +00:00
3a232997d8 Remove linux/inotify.h
* linux/inotify.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
* inotify.c: Do not include <linux/inotify.h>.
* xlat/inotify_flags.in: Add default values.
2015-02-19 21:28:59 +00:00
3e6525ff4b Remove linux/reboot.h
* linux/reboot.h: Remove.
* Makefile.am (EXTRA_DIST): Remove it.
* reboot.c: Do not include <linux/reboot.h>.
* xlat/bootflags1.in: Add default values.
* xlat/bootflags2.in: Likewise.
* xlat/bootflags3.in: Likewise.
2015-02-19 20:47:36 +00:00
2f0808b88e Move CAP_* definitions out to header files
* Makefile.am (strace_SOURCES): Add caps0.h and caps1.h.
* caps0.h: New file.
* caps1.h: New file.
* capability.c: Remove CAP_* definitions, include "caps0.h"
and "caps1.h" instead.
Include "xlat/cap_mask0.h" instead of "xlat/capabilities.h".
Include "xlat/cap_mask1.h" instead of "xlat/capabilities1.h".
(print_cap_bits): Update callers.
* xlat/capabilities.in: Rename to xlat/cap_mask0.in.
* xlat/capabilities1.in: Rename to xlat/cap_mask1.in.
2015-02-19 00:33:39 +00:00
5503dd28c6 Move regs-related macros and declarations from defs.h to regs.h
* regs.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arch_regs.h: New file.
* linux/alpha/arch_regs.h: Likewise.
* linux/arm/arch_regs.h: Likewise.
* linux/hppa/arch_regs.h: Likewise.
* linux/i386/arch_regs.h: Likewise.
* linux/ia64/arch_regs.h: Likewise.
* linux/mips/arch_regs.h: Likewise.
* linux/powerpc/arch_regs.h: Likewise.
* linux/sh64/arch_regs.h: Likewise.
* linux/sparc/arch_regs.h: Likewise.
* linux/sparc64/arch_regs.h: Likewise.
* linux/tile/arch_regs.h: Likewise.
* linux/x86_64/arch_regs.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* defs.h: Remove definitions of PTRACE_*, REG_*, PT_*, U_REG_*,
and ARM_* macros.
Remove declarations of struct pt_regs variables.
[SPARC]: Do not include <asm/psr.h>.
[SPARC64]: Do not include <asm/psrcompat.h>.
* bjm.c: Do not include <sys/user.h>.
* process.c: Include "regs.h".
Do not include <sys/user.h> and <sys/reg.h>.
[IA64]: Do not include <asm/ptrace_offsets.h> and <asm/rse.h>.
* util.c: Likewise.
* syscall.c: Likewise.
[AARCH64]: Define struct arm_pt_regs and ARM_* macros.
[SPARC]: Include <asm/psr.h>.
[SPARC64]: Include <asm/psrcompat.h>.
* signal.c: Include "regs.h".
Do not include <sys/user.h> and <sys/reg.h>.
[IA64]: Do not include <asm/ptrace_offsets.h>.
* strace.c [IA64]: Do not include <asm/ptrace_offsets.h>.
2015-02-13 18:28:08 +00:00
fadf379b8e Move all ptrace-related macros and declarations from defs.h to ptrace.h
* ptrace.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* configure.ac (AC_CHECK_HEADERS): Remove linux/ptrace.h and sys/ptrace.h.
* defs.h: Do not include <sys/ptrace.h> and <asm/ptrace.h>.
Remove definitions of PTRACE_* macros.
* process.c: Remove <linux/ptrace.h> workarounds, include "ptrace.h".
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
* strace.c: Include "ptrace.h".
* wait.c: Likewise.
2015-02-13 18:27:58 +00:00
2af6903f45 Implement seccomp decoding
* configure.ac (AC_CHECK_HEADERS): Add linux/filter.h
and linux/seccomp.h.
* defs.h (print_seccomp_filter): New prototype.
* linux/dummy.h (sys_seccomp): Remove.
* linux/syscall.h (sys_seccomp): New prototype.
* prctl.c: Include <linux/seccomp.h>.
(sys_prctl): Decode PR_SET_SECCOMP.
* seccomp.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* xlat/bpf_class.in: New file.
* xlat/bpf_miscop.in: Likewise.
* xlat/bpf_mode.in: Likewise.
* xlat/bpf_op_alu.in: Likewise.
* xlat/bpf_op_jmp.in: Likewise.
* xlat/bpf_rval.in: Likewise.
* xlat/bpf_size.in: Likewise.
* xlat/bpf_src.in: Likewise.
* xlat/seccomp_filter_flags.in: Likewise.
* xlat/seccomp_mode.in: Likewise.
* xlat/seccomp_ops.in: Likewise.
* xlat/seccomp_ret_action.in: Likewise.
2015-02-06 01:23:05 +00:00
fef09070d6 Implement getrandom syscall decoding
* getrandom.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_getrandom): Remove.
* linux/syscall.h (sys_getrandom): New prototype.
* xlat/getrandom_flags.in: New file.
* tests/getrandom.c: New file.
* tests/getrandom.awk: New file.
* tests/getrandom.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add getrandom.
(TESTS): Add getrandom.test.
(EXTRA_DIST): Add getrandom.awk.
* tests/.gitignore: Add getrandom.
2015-02-05 01:10:47 +00:00
679c47c348 tests: run tests for each supported personality
When strace supports more than one personality, run test suite
for each personality supported by the host system.

* bootstrap: Create tests-m32 and tests-mx32 subtrees from tests.
* configure.ac: Check for -m32 and -mx32 runtime support.
(AC_CONFIG_FILES): Add tests-m32/Makefile and tests-mx32/Makefile.
* Makefile.am [HAVE_M32_RUNTIME] (TESTS_M32): Define.
[HAVE_MX32_RUNTIME] (TESTS_MX32): Define.
(SUBDIRS): Add $(TESTS_M32) $(TESTS_MX32).
* .gitignore: Add /tests-m32 and /tests-mx32.
2015-01-24 03:39:34 +00:00
df7aa2b19e ioctl: take all 32 bits of ioctl commands into account
Historically, only 16 bits (8-bit number and 8-bit type) of 32-bit ioctl
commands were used for decoding, which was the source for numerous
annoying collisions like this:

	ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
	ioctl(0, MGSL_IOCGPARAMS or MMTIMER_GETRES or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0x7fffd47f7338) = -1 ENOTTY (Inappropriate ioctl for device)

The solution is to use all 32 bits for decoding, not just "number" and
"type", but also "size" and "direction".

As some architectures override defaults that come from asm-generic/ and
provide alternative definitions for some ioctl commands, we support
per-architecture ioctl definitions and merge them with common
definitions at build time.  During the merge, we used to keep both
generic and architecture-specific definitions, now architecture-specific
definitions have precedence over generic ones -- ioctlsort omits
definitions from asm-generic/ for those ioctl names that have different
definitions in asm/.

Additional bits of "direction" are architecture specific -- the number
of bits and their values differ between architectures.  To reduce
architecture differences in the source code, we keep "direction" in
symbolic form and compile it in ioctlsort.

Additional bits of "size" are also architecture specific -- not only the
number of bits differ between architectures, but sizes of many types
depend on sizeof(long).  To reduce architecture differences in the
source code, we keep 32-bit and 64-bit versions of common ioctl
definitions, and use the appropriate version for each architecture and
personality.

To implement this, the tools for generating ioctl definitions from
kernel headers have been rewritten, and the source format of ioctl
definitions has been extended.   The final ioctlent*.h files that are
included by syscall.c are now generated from source ioctls_inc*.h and
ioctls_arch*.h files at build time with ioctlsort.

* ioctl.c (ioctl_lookup): Use all 32 bits of ioctl command code.
* ioctlsort.c: Rewritten.
* linux/32/ioctls_inc.h: New file.
* linux/64/ioctls_inc.h: New file.
* linux/aarch64/ioctls_arch0.h: New file.
* linux/aarch64/ioctls_arch1.h: New file.
* linux/aarch64/ioctls_inc0.h: New file.
* linux/aarch64/ioctls_inc1.h: New file.
* linux/alpha/ioctls_arch0.h: New file.
* linux/alpha/ioctls_inc0.h: New file.
* linux/arc/ioctls_arch0.h: New file.
* linux/arc/ioctls_inc0.h: New file.
* linux/arm/ioctls_arch0.h: New file.
* linux/arm/ioctls_inc0.h: New file.
* linux/avr32/ioctls_arch0.h: New file.
* linux/avr32/ioctls_inc0.h: New file.
* linux/bfin/ioctls_arch0.h: New file.
* linux/bfin/ioctls_inc0.h: New file.
* linux/hppa/ioctls_arch0.h: New file.
* linux/hppa/ioctls_inc0.h: New file.
* linux/i386/ioctls_arch0.h: New file.
* linux/i386/ioctls_inc0.h: New file.
* linux/ia64/ioctls_arch0.h: New file.
* linux/ia64/ioctls_inc0.h: New file.
* linux/m68k/ioctls_arch0.h: New file.
* linux/m68k/ioctls_inc0.h: New file.
* linux/metag/ioctls_arch0.h: New file.
* linux/metag/ioctls_inc0.h: New file.
* linux/microblaze/ioctls_arch0.h: New file.
* linux/microblaze/ioctls_inc0.h: New file.
* linux/mips/ioctls_arch0.h: New file.
* linux/mips/ioctls_inc0.h: New file.
* linux/or1k/ioctls_arch0.h: New file.
* linux/or1k/ioctls_inc0.h: New file.
* linux/powerpc/ioctls_arch0.h: New file.
* linux/powerpc/ioctls_inc0.h: New file.
* linux/powerpc64/ioctls_arch0.h: New file.
* linux/powerpc64/ioctls_arch1.h: New file.
* linux/powerpc64/ioctls_inc0.h: New file.
* linux/powerpc64/ioctls_inc1.h: New file.
* linux/s390/ioctls_arch0.h: New file.
* linux/s390/ioctls_inc0.h: New file.
* linux/s390x/ioctls_arch0.h: New file.
* linux/s390x/ioctls_inc0.h: New file.
* linux/sh/ioctls_arch0.h: New file.
* linux/sh/ioctls_inc0.h: New file.
* linux/sh64/ioctls_arch0.h: New file.
* linux/sh64/ioctls_inc0.h: New file.
* linux/sparc/ioctls_arch0.h: New file.
* linux/sparc/ioctls_inc0.h: New file.
* linux/sparc64/ioctls_arch0.h: New file.
* linux/sparc64/ioctls_arch2.h: New file.
* linux/sparc64/ioctls_inc0.h: New file.
* linux/sparc64/ioctls_inc2.h: New file.
* linux/tile/ioctls_arch0.h: New file.
* linux/tile/ioctls_arch1.h: New file.
* linux/tile/ioctls_inc0.h: New file.
* linux/tile/ioctls_inc1.h: New file.
* linux/x32/ioctls_arch0.h: New file.
* linux/x32/ioctls_arch1.h: New file.
* linux/x32/ioctls_inc0.h: New file.
* linux/x32/ioctls_inc1.h: New file.
* linux/x86_64/ioctls_arch0.h: New file.
* linux/x86_64/ioctls_arch1.h: New file.
* linux/x86_64/ioctls_inc0.h: New file.
* linux/x86_64/ioctls_inc1.h: New file.
* linux/xtensa/ioctls_arch0.h: New file.
* linux/xtensa/ioctls_inc0.h: New file.
* linux/aarch64/ioctlent.h.in: Remove.
* linux/aarch64/ioctlent1.h: Remove.
* linux/alpha/ioctlent.h.in: Remove.
* linux/arc/ioctlent.h.in: Remove.
* linux/arm/ioctlent.h.in: Remove.
* linux/avr32/ioctlent.h.in: Remove.
* linux/bfin/ioctlent.h.in: Remove.
* linux/hppa/ioctlent.h.in: Remove.
* linux/i386/ioctlent.h.in: Remove.
* linux/ia64/ioctlent.h.in: Remove.
* linux/ioctlent.h.in: Remove.
* linux/ioctlent.sh: Remove.
* linux/m68k/ioctlent.h.in: Remove.
* linux/metag/ioctlent.h.in: Remove.
* linux/microblaze/ioctlent.h.in: Remove.
* linux/mips/ioctlent.h.in: Remove.
* linux/mips/ioctlent.sh: Remove.
* linux/or1k/ioctlent.h.in: Remove.
* linux/powerpc/ioctlent.h.in: Remove.
* linux/powerpc64/ioctlent.h: Remove.
* linux/powerpc64/ioctlent1.h: Remove.
* linux/s390/ioctlent.h.in: Remove.
* linux/s390x/ioctlent.h.in: Remove.
* linux/sh/ioctlent.h.in: Remove.
* linux/sh64/ioctlent.h.in: Remove.
* linux/sparc/ioctlent.h.in: Remove.
* linux/sparc64/ioctlent.h.in: Remove.
* linux/sparc64/ioctlent2.h: Remove.
* linux/tile/ioctlent.h.in: Remove.
* linux/tile/ioctlent1.h: Remove.
* linux/x32/ioctlent.h.in: Remove.
* linux/x32/ioctlent1.h: Remove.
* linux/x86_64/ioctlent.h.in: Remove.
* linux/x86_64/ioctlent1.h: Remove.
* linux/xtensa/ioctlent.h.in: Remove.
* linux/x86_64/ioctlent2.h: Include ioctlent0.h instead of ioctlent.h.
* syscall.c (struct_ioctlent ioctlent0): Likewise.
* Makefile.am: Remove all ioctlent-related definitions.
Define the list of ioctlent*.h files that have to be generated by
presence of $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h files.
Add rules for ioctlent*.h files generation.
(EXTRA_DIST): Update.
* maint/ioctls_gen.sh: New file.
* maint/ioctls_hex.sh: New file.
* maint/ioctls_sym.sh: New file.
* maint/print_ioctlent.c: New file.
* HACKING-scripts: Update for ioctlent.sh -> ioctls_gen.sh migration.
* .gitignore: Add ioctlent[012].h and ioctls_all[012].h.
* configure.ac (AC_CHECK_HEADERS): Add linux/hiddev.h
and linux/mmtimer.h for tests.
* tests/ioctl.c: New file.
* tests/ioctl.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add ioctl.
(TESTS): Add ioctl.test.
* tests/.gitignore: Add ioctl.
2015-01-22 00:27:38 +00:00
af3ab5b854 powerpc64: maintain own linux/powerpc64 subdirectory
Most architectures supported by strace have their own subdirectory in
linux directory, but powerpc64 didn't, causing inconveniences.

* configure.ac (arch): Define to "powerpc64" on powerpc64.
* linux/powerpc/errnoent1.h: Move to linux/powerpc64/.
* linux/powerpc/ioctlent1.h: Likewise.
* linux/powerpc/signalent1.h: Likewise.
* linux/powerpc/syscallent1.h: Likewise.
* linux/powerpc64/ioctlent.h: New file.
* linux/powerpc64/syscallent.h: Likewise.
* linux/powerpc64/userent.h: Likewise.
* Makefile.am (EXTRA_DIST): Remove linux/powerpc/ioctlent1.h,
linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h, and
linux/powerpc/signalent1.h; added linux/powerpc64/errnoent1.h,
linux/powerpc64/ioctlent.h, linux/powerpc64/ioctlent1.h,
linux/powerpc64/signalent1.h, linux/powerpc64/syscallent.h,
linux/powerpc64/syscallent1.h, and linux/powerpc64/userent.h.
2015-01-21 17:34:37 +00:00
d59287dcac mips: remove stub entries from syscallent files, generate stubs at build time
* linux/mips/genstub.sh: New file.
* Makefile.am (EXTRA_DIST): Add it.
* configure.ac [MIPS]: Use it to generate syscallent stubs.
* linux/mips/.gitignore: Add syscallent stubs.
* linux/mips/syscallent-n32.h: Remove stub entries, include
the stub file instead.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
2015-01-13 10:55:32 +00:00
579836cd6b build: add $(builddir)/$(OS)/$(ARCH) to the headers search list
* Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS)/$(ARCH) before
-I$(srcdir)/$(OS)/$(ARCH).
2015-01-13 06:41:44 +00:00
dee03a3c24 Create generic 32-bit syscallent.h
Since arc/syscallent.h, metag/syscallent.h, or1k/syscallent.h, and
tile/syscallent1.h share a lot of identical syscall entries described in
<asm-generic/unistd.h>, move these entries to a new file 32/syscallent.h
using the following automated conversion with subsequent correction of
whitespace indentation:

sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^[[:space:]]*\[[[:space:]]*2\(4[4-9]\|5[0-9]\)/d' linux/arc/syscallent.h

* linux/32/syscallent.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
* linux/arc/syscallent.h: Include "32/syscallent.h",
remove generic 32-bit syscall entries, use designated initializers.
* linux/metag/syscallent.h: Likewise.
* linux/or1k/syscallent.h: Likewise.
* linux/tile/syscallent1.h: Likewise.
2015-01-12 17:32:16 +00:00
200c02c1a7 Create generic 64-bit syscallent.h
Since aarch64/syscallent1.h and tile/syscallent.h share a lot of
identical syscall entries described in <asm-generic/unistd.h>, move
these entries to a new file 64/syscallent.h using the following
automated conversion with subsequent correction of whitespace
indentation:

sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^\[[[:space:]]*2\(4[4-9]\|5[0-9]\)\]/d' linux/tile/syscallent.h

* linux/64/syscallent.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
* linux/aarch64/syscallent1.h: Include "64/syscallent.h",
remove generic 64-bit syscall entries, use designated initializers.
* linux/tile/syscallent.h: Likewise.
2015-01-12 17:32:16 +00:00
ce21ef02da Fix "make dist" regression introduced by commit v4.9-125-g120e5db
* Makefile.am (EXTRA_DIST): Add linux/unix_diag.h.
2015-01-09 02:02:39 +00:00
ab21a9489f Convert do_printstat to a template function
* printstat.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Include "printstat.h".
(do_printstat): Move to printstat.h, parametrize its name
and struct stat.
2015-01-08 01:14:53 +00:00
530bed0ca8 Fix decoding of getgroups, getgroups32, setgroups, and setgroups32 syscalls
Convert parsers of these syscalls to the same scheme as were applied to
parsers of other uid/gid related syscalls.
That is, define two sets of parsers on architectures that support
(either directly or via multiarch) 16-bit and 32-bit gid getgroups
and setgroups syscalls simultaneously, and reuse essentially the same
code by parametrizing uid_t and names of parser functions.

* groups.c: Remove.
(sys_getgroups, sys_setgroups): Move ...
* uid.c: ... here and parametrize their names.
* Makefile.am (strace_SOURCES): Remove groups.c.
* linux/syscall.h (sys_getgroups32, sys_setgroups32): Remove.
[NEED_UID16_PARSERS] (sys_getgroups16, sys_setgroups16): New prototypes.
* linux/arm/syscallent.h: Rename sys_[gs]etgroups to sys_[gs]etgroups16,
rename sys_[gs]etgroups32 to sys_[gs]etgroups.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* tests/uid.c: Test for getgroups.
* tests/uid16.c: Likewise.
* tests/uid32.c: Test for getgroups32.
* tests/uid.awk: Test for getgroups/getgroups32 decoding.
* tests/uid.test: Trace getgroups/getgroups32 syscalls.
2014-12-16 01:09:23 +00:00
80f7db1fed Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls
Define two sets of parsers on architectures that support (either
directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
simultaneously.  Since the code in these two sets is essentially
the same and the key difference between them is the size of uid_t,
implement it by parametrizing uid_t and names of parser functions.

* defs.h (NEED_UID16_PARSERS): New macro.
* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
sys_setreuid16, sys_setuid16): New prototypes.
* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
sys_*uid16 functions.
* uid.c: Stop including <asm/posix_types.h>.
Parametrize uid_t and names of all exported functions.
(get_print_uid): New function.
(sys_getresuid): Use it.
(printuid): Check for (uid_t) -1.
* uid16.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* tests/uid16.c: New file.
* tests/uid16.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
(TESTS): Add uid16.test.
* tests/.gitignore: Add uid16.
2014-12-16 01:07:12 +00:00
2f7d020e22 chown.c: split into separate files
This will make further uid/gid fixes simpler.

* fchownat.c: New file.
* chown.c (sys_fchownat: Move to fchownat.c.
(sys_chown, sys_fchown): Move to uid.c.
* Makefile.am (strace_SOURCES): Remove chown.c, add fchownat.c.
2014-12-15 23:54:37 +00:00
fced7b0930 process.c: split struct_user_offsets into architecture-specific include files
* Makefile.am (EXTRA_DIST): Add linux/alpha/userent.h,
linux/arm/userent.h, linux/avr32/userent.h, linux/bfin/userent.h,
linux/crisv10/userent.h, linux/crisv32/userent.h,
linux/i386/userent.h, linux/i386/userent0.h, linux/ia64/userent.h,
linux/m68k/userent.h, linux/microblaze/userent.h,
linux/mips/userent.h, linux/or1k/userent.h, linux/powerpc/userent.h,
linux/s390/userent.h, linux/s390/userent0.h, linux/s390/userent1.h,
linux/s390x/userent.h, linux/sh/userent.h, linux/sh/userent0.h,
linux/sh64/userent.h, linux/sparc/userent.h, linux/sparc64/userent.h,
linux/tile/userent.h, linux/userent.h, linux/userent0.h,
linux/x32/userent.h, linux/x86_64/userent.h, and
linux/xtensa/userent.h.
* process.c (struct_user_offsets): Split into architecture-specific
include files, inculde userent.h.
2014-12-11 19:25:02 +00:00
03c06ea592 process.c: move sethostname and gethostname parsers to a separate file
* hostname.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_sethostname, sys_gethostname): Move to hostname.c.
2014-12-11 22:52:03 +00:00
9175909acc process.c: move exit parser to a separate file
* exit.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_exit): Move to exit.c.
2014-12-11 22:52:03 +00:00
265903a416 process.c: move clone, setns, unshare, and fork parsers to a separate file
* clone.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_clone, sys_setns, sys_unshare, sys_fork, and
related code to clone.c.
2014-12-11 22:52:03 +00:00
e93ef1eb9d process.c: move get*uid and set*uid parsers to a separate file
* uid.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_getuid, sys_setfsuid, sys_setuid, sys_getresuid,
sys_setreuid, sys_setresuid): Move to uid.c.
2014-12-11 22:52:03 +00:00
7211480fee process.c: move getgroups* and setgroups* parsers to a separate file
* groups.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_setgroups, sys_getgroups, sys_setgroups32,
sys_getgroups32, and related code to groups.c.
2014-12-11 22:52:03 +00:00
7be2318ad2 process.c: move execve and execv parsers to a separate file
* execve.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_execve, sys_execv, and related code to execve.c.
2014-12-11 22:52:03 +00:00
7ccc144fdd process.c: move waitpid, wait4, osf_wait4, and waitid parsers to a separate file
* wait.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_waitpid, sys_wait4, sys_osf_wait4, sys_waitid and
related code to wait.c.
2014-12-11 22:51:45 +00:00
58dd2cf352 process.c: move uname parser to a separate file
* uname.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_uname): Move to uname.c.
2014-12-11 22:04:01 +00:00
e314f808bf process.c: move futex parser to a separate file
* futex.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_futex and related code to futex.c.
2014-12-11 19:25:02 +00:00
8357638568 process.c: move get_robust_list parser to a separate file
* get_robust_list.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_get_robust_list): Move to get_robust_list.c.
2014-12-11 19:25:02 +00:00
fff2f319f9 process.c: move sched_* parsers to a separate file
* sched.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_sched_getscheduler, sys_sched_setscheduler,
sys_sched_getparam, sys_sched_setparam, sys_sched_get_priority_min,
sys_sched_rr_get_interval, and related code to sched.c.
2014-12-11 21:44:56 +00:00
b94b9834fd process.c: move sched_setaffinity and sched_getaffinity parsers to a separate file
* affinity.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_sched_setaffinity, sys_sched_getaffinity): Move
to affinity.c.
2014-12-11 19:25:02 +00:00
53c993d9c1 process.c: move prctl and arch_prctl parsers to a separate file
* prctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c: Move sys_prctl, sys_arch_prctl, and related code to prctl.c.
2014-12-11 21:40:44 +00:00
665f10c9a4 process.c: move getcpu parser to a separate file
* getcpu.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_getcpu): Move to getcpu.c.
2014-12-11 21:40:40 +00:00
db16c52668 process.c: move process_vm_readv and process_vm_writev parsers to a separate file
* process_vm.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_process_vm_readv, sys_process_vm_writev): Move
to process_vm.c.
2014-12-11 21:40:23 +00:00
964d80a0f7 file.c: move open, openat, and creat parsers to a separate file
* open.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_open, sys_openat, sys_creat, and related code
to open.c.
2014-12-11 21:40:20 +00:00
304cd81e46 file.c: move access and faccessat parsers to a separate file
* access.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_access, sys_faccessat and related code to access.c.
2014-12-11 21:40:17 +00:00
d590f3cdd8 file.c: move umask parser to a separate file
* umask.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_umask): Move to umask.c.
2014-12-11 21:40:15 +00:00
b5d25ec2f9 file.c: move lseek and llseek parsers to a separate file
* lseek.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_lseek, sys_llseek, and related code to lseek.c.
2014-12-11 21:40:11 +00:00
9e9ceab3b1 file.c: move readahead parser to a separate file
* readahead.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_readahead): Move to readahead.c.
2014-12-11 21:40:08 +00:00
6934182f16 file.c: move truncate, truncate64, ftruncate, and ftruncate64 parsers to a separate file
* truncate.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_truncate, sys_truncate64, sys_ftruncate, sys_ftruncate64):
Move to truncate.c.
2014-12-11 21:40:04 +00:00
9b2f674adb file.c: move chdir parser to a separate file
* chdir.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_chdir): Move to chdir.c.
2014-12-11 21:39:59 +00:00
231b19fca0 file.c: move link, linkat, unlinkat, and symlinkat parsers to a separate file
* link.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_link, sys_linkat, sys_unlinkat, sys_symlinkat, and
related code to link.c.
2014-12-11 21:39:44 +00:00
46245b3541 file.c: move readlink and readlinkat parsers to a separate file
* readlink.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (decode_readlink, sys_readlink, sys_readlinkat): Move
to readlink.c.
2014-12-11 21:39:35 +00:00
6d20a0b9a3 file.c: move renameat and renameat2 parsers to a separate file
* renameat.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_renameat, sys_renameat2, and related code
to renameat.c.
2014-12-11 21:39:30 +00:00
2b7a53bff5 file.c: move chown, fchown, and fchownat parsers to a separate file
* chown.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_chown, sys_fchownat, sys_fchown): Move to chown.c.
2014-12-11 21:39:28 +00:00
ad5cf1e5ae file.c: move chmod, fchmod, and fchmodat parsers to a separate file
* chmod.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_chmod, sys_fchmodat, sys_fchmod): Move to chmod.c.
2014-12-11 21:39:25 +00:00
481e067836 file.c: move utimes, futimesat, utimensat, and osf_utimes parsers to a separate file
* utimes.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (decode_utimes, sys_utimes, sys_futimesat, sys_utimensat,
sys_osf_utimes): Move to utimes.c.
2014-12-11 21:39:21 +00:00
fb470f350e file.c: move utime parser to a separate file
* utime.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_utime): Move to utime.c.
2014-12-11 21:39:16 +00:00
db23b3414c file.c: move mknod, mknodat, and xmknod parsers to a separate file
* mknod.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_mknod, sys_mknodat, sys_xmknod, and related code
to mknod.c.
2014-12-11 21:39:12 +00:00
9514ac73c7 file.c: export sprintmode and move it to a separate file
* printmode.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (sprintmode): New prototype.
* file.c (sprintmode): Make global and move to printmode.c.
2014-12-11 21:39:02 +00:00
a836430dbb file.c: move getcwd parser to a separate file
* getcwd.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_getcwd): Move to getcwd.c.
2014-12-11 21:38:59 +00:00
769ffe9797 file.c: move *xattr parsers to a separate file
* xattr.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr,
sys_listxattr, sys_flistxattr, sys_removexattr, sys_fremovexattr,
and related code to xattr.c.
2014-12-11 21:38:51 +00:00
63f28dd197 file.c: move fadvise64 and fadvise64_64 parsers to a separate file
* fadvise.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_fadvise64, sys_fadvise64_64, and related code
to fadvise.c.
2014-12-11 21:38:43 +00:00
710b3ae4a2 file.c: move sync_file_range and sync_file_range2 parsers to a separate file
* sync_file_range.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_sync_file_range, sys_sync_file_range2, and related
code to sync_file_range.c.
2014-12-11 21:38:32 +00:00
2795a5f7ac file.c: move fallocate parser to a separate file
* fallocate.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_fallocate): Move to fallocate.c.
2014-12-11 21:38:25 +00:00
85a364a4ac file.c: move swapon parser to a separate file
* swapon.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_swapon and related code to swapon.c.
2014-12-11 21:37:52 +00:00
83034c9de7 Remove system.c
All disjoint parts of system.c have been moved to separate files.

* system.c: Remove.
* Makefile.am (strace_SOURCES): Remove it.
2014-12-04 02:23:40 +00:00
6da7ca378d Move mount parser to a separate file
* mount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_mount and related code to mount.c.
2014-12-04 02:23:40 +00:00
542ca1ef3d Move umount2 parser to a separate file
* umount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_umount2 and related code to umount.c.
2014-12-04 02:23:40 +00:00
d28b6a0264 Move personality parser to a separate file
* personality.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_personality and related code to personality.c.
2014-12-04 02:23:40 +00:00
b21e2fb059 Move syslog parser to a separate file
* syslog.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_syslog and related code to syslog.c.
2014-12-04 02:23:40 +00:00