Commit Graph

2829 Commits

Author SHA1 Message Date
Andreas Schwab
fa5ce37246 Fix crash in ipc_sem test
Properly use union semun as argument of semctl.

* tests/ipc_sem.c (main): Properly use union semun as argument of
semctl.  Don't handle EFAULT specially.
* tests/ipc_sem.test: Revert last change.
2015-03-16 12:18:36 +01:00
Andreas Schwab
712f0e12bd m68k: fix sigreturn decoding
* sigreturn.c (sys_sigreturn) [M68K]: Fetch the words of the
signal mask from the proper place.
2015-03-16 10:55:20 +01:00
Andreas Schwab
0e3811d791 aarch64: fix ioctl decoding
* linux/aarch64/ioctls_inc0.h: Rename from ioctls_inc1.h.
* linux/aarch64/ioctls_inc1.h: Rename from ioctls_inc0.h.
* linux/aarch64/ioctls_arch0.h: Rename from ioctls_arch1.h.
* linux/aarch64/ioctls_arch1.h: Rename from ioctls_arch0.h.
2015-03-16 10:15:29 +01:00
Andreas Schwab
95336102eb tests/select.test: handle architectures using pselect6 syscall
* tests/select.awk (BEGIN): Update regexps to match both select
and pselect6 syscalls.
* tests/select.test: Probe for both select and pselect6 syscall.
2015-03-12 17:22:07 +01: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
Andreas Schwab
dbadf7bcc8 Fix decoding of mmap2 for arm
* syscallent.h (mmap2): Decode with sys_mmap_4koff, not
sys_mmap_pgoff.
2015-03-12 10:52:22 +01:00
Andreas Schwab
a897136801 m68k: define HAVE_SA_RESTORER
On m68k the kernel sigaction structure has the sa_restorer member for
historical reasons.

* signal.c (HAVE_SA_RESTORER): Define for M68K.
2015-03-12 10:24:27 +01:00
d76d306952 aarch64: fix rt_sigreturn decoding
* sigreturn.c (sys_sigreturn) [AARCH64]: Fix personality check.
2015-03-11 16:34:09 +00:00
91bdbb46ff maint: post-release administrivia
* NEWS: Add header line for next release.
2015-03-09 22:05:40 +00:00
dfabccf997 Prepare for 4.10 release
* NEWS: Update for 4.10 release.
* debian/changelog: 4.10-1.
* strace.spec: 4.10-1.
2015-03-06 13:14:15 +00: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
48f0890953 ia64: use PTRACE_GETREGS to fetch registers
* linux/ia64/arch_regs.h: Stop including <asm/rse.h>.
(ia64_frame_ptr): New declaration.
* signal.c (sys_sigreturn) [IA64]: Use ia64_frame_ptr.
* syscall.c [IA64]: Include <asm/rse.h>.
[IA64] (ia64_regs, ia64_frame_ptr): New variable.
[IA64] (ARCH_REGS_FOR_GETREGS): New macro.
[IA64] (ia64_ia32mode): Convert to macro.
[IA64] (ia64_r8, ia64_r10): Remove.
(getrval2, print_pc, get_scno, get_syscall_args, get_error) [IA64]:
Use ia64_regs.
(get_syscall_result) [IA64]: Remove.
2015-03-05 23:37:27 +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
07d70f03ee qemu_multiarch_testing: update
* qemu_multiarch_testing/README: Update statistics.
2015-03-05 19:36:52 +00:00
da66e25779 tests: robustify unix-yy.test
Implement additional synchronization between parent and child processes
to guarantee that the child starts closing connected socket only after
exiting of the parent's accept() syscall.
This guarantee seems to be necessary to reliably receive UNIX_DIAG_PEER
messages from NETLINK_SOCK_DIAG interface.

* tests/net-accept-connect.c: Implement additional synchronization
between parent and child processes.
* tests/unix-yy-connect.awk: Update.
2015-03-05 17:44:32 +00:00
59f63d3106 Use SIGRTMIN from kernel headers
* configure.ac (ASM_SIGRTMIN): Define to SIGRTMIN from <asm/signal.h>.
* signal.c: Use ASM_SIGRTMIN instead of constants provided by libc.
* tests/sigreturn.c: Use ASM_SIGRTMIN instead of hardcoded value.
Use lower RT_* numbers to support pre-3.18 hppa kernels.
* tests/sigreturn.test: Update regexp.
2015-03-05 05:42:30 +00:00
67dab706cf ppc64: fix compilation warning
Fix compilation warning introduced by commit
577be2593d

* signal.c (sys_sigreturn) [POWERPC64]: Fix initialization of signal
mask on 32bit personality.
2015-03-05 04:29:37 +00:00
47e289bb9c aarch64: fix compilation warnings
Fix compilation warnings introduced by commit
5b9b7e1d34:

signal.c:702:45: warning: signed and unsigned type in conditional expression [-Wsign-compare]
syscall.c:746:34: warning: initialization from incompatible pointer type [enabled by default]

* syscall.c [AARCH64] (aarch64_sp_ptr): Add explicit cast.
[AARCH64] (arm_sp_ptr): Change pointer type to unsigned.
* linux/aarch64/arch_regs.h (arm_sp_ptr): Update.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2015-03-05 04:10:52 +00:00
a1c5e0721f i386: simplify sigreturn decoding
* signal.c (sys_sigreturn) [X86_64 || X32 || I386]: Do not define
i386_sigcontext_struct and i386_fpstate structures.
2015-03-05 01:16:52 +00:00
30bcb792cf tests: add a test for sigreturn/rt_sigreturn decoding
Convert test/sigreturn.c into a regular test.

* test/Makefile (PROGS): Remove sigreturn.
* test/.gitignore: Likewise.
* test/sigreturn.c: Rewrite to ...
* tests/sigreturn.c: ... new file.
* tests/sigreturn.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sigreturn.
(TESTS): Add sigreturn.test.
* tests/.gitignore: Add sigreturn.
2015-03-05 00:05:27 +00:00
f3582cd204 sigreturn: print signal mask as a syscall argument
Although sigreturn takes signal mask via frame pointer,
it's more convenient to display signal mask as a syscall argument
rather than an outstanding object of unknown nature:

Before this change:
    sigreturn() (mask [USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]) = 0

After this change:
    sigreturn({mask=[USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]}) = 0

* signal.c (sys_sigreturn): Display signal mask as a syscall argument.
2015-03-04 23:55:25 +00:00
5b9b7e1d34 aarch64: implement rt_sigreturn decoding
* linux/64/syscallent.h (139): Use sys_sigreturn for rt_sigreturn
decoding.
* syscall.c [ARM] (arm_regs): Make static.
[ARM] (arm_sp_ptr): New variable.
[AARCH64] (aarch64_sp_ptr, arm_sp_ptr): New variables.
* linux/aarch64/arch_regs.h: New file.
* linux/arm/arch_regs.h (arm_regs): Remove.
(arm_sp_ptr): New declaration.
* signal.c (sys_sigreturn) [ARM]: Use arm_sp_ptr.
[AARCH64]: Print signal mask.
2015-03-04 23:05:53 +00:00
26d16c8ade arm: simplify sigreturn decoding
* signal.c (sys_sigreturn) [ARM]: Do not define sigcontext and ucontext
structures, fetch signal mask only, use print_sigset_addr_len.
2015-03-04 22:27:35 +00:00
085411b806 s390: fix sigreturn decoding
* signal.c (sys_sigreturn) [S390]: Fix signal mask decoding.
2015-03-04 21:48:44 +00:00
fd6d2072b1 mips o32: fix sigreturn decoding
* signal.c (sys_sigreturn) [LINUX_MIPSO32]: Fix the address of signal mask.
[MIPS] Use print_sigset_addr_len to print signal mask.
2015-03-04 21:48:44 +00:00
ccb4fdac43 x86_64, x32: implement rt_sigreturn decoding
* syscall.c [X86_64 || X32] (x86_64_rsp_ptr): New variable.
* linux/x86_64/arch_regs.h (x86_64_rsp_ptr): New declaration.
* linux/x86_64/syscallent.h (15): Use sys_sigreturn for rt_sigreturn
decoding.
* linux/x32/syscallent.h (513): Likewise.
* signal.c (sys_sigreturn) [X86_64 || X32]: Print signal mask
for non-i386 personalities.
2015-03-04 17:54:25 +00:00
db19936861 sparc, sparc64: fix sigreturn decoding
* linux/sparc/arch_regs.h (U_REG_FP): New macro.
* signal.c (sys_sigreturn) [SPARC || SPARC64]: Fix decoding
of upper 32 bits of the sigmask.
2015-03-04 17:54:25 +00:00
577be2593d ppc, ppc64: fix sigreturn decoding
* signal.c (sys_sigreturn) [POWERPC]: Fix decoding of upper 32 bits
of the sigmask.
2015-03-04 16:06:05 +00:00
d46899286e sigreturn: issue a less innocuous warning
* signal.c (sys_sigreturn): Issue a less innocuous warning on
architectures for which signal mask decoding is not implemented yet.
2015-03-04 14:52:56 +00:00
dca5110aaa bootstrap: do not link Makefile* files
* bootstrap: Do not symlink any Makefile* files, not just Makefile.am
and Makefile.in.

Reported-by: Christopher Covington <cov@codeaurora.org>
2015-03-04 14:52:56 +00:00
1e8a454474 ia64: fix sigreturn decoding
* signal.c (sys_sigreturn) [IA64]: Fix the address of signal mask.
Use print_sigset_addr_len to print signal mask.
2015-03-04 12:11:31 +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
Giedrius Statkevičius
6a63bfa160 Document that -k is available only with libunwind
Without this users might get confused why `man strace` describes
an option that doesn't work.

* strace.1: Note that -k is available only if strace is built
with libunwind.
2015-03-04 00:56:33 +00:00
fde8fac036 debian: update control file
* debian/control (strace, strace-udeb): Add mips64 and mips64el
to architecture list.
Patch by James Cowgill <james410@cowgill.org.uk>

This fixes Debian bug #773375.
2015-03-03 23:12:22 +00:00
f3f136cd4b debian: sync with 4.9-2 package
* debian/changelog: Sync with 4.9-2.
* debian/control: Likewise.
2015-03-03 23:12:22 +00:00
7e6556711e Add arch-specific PTRACE_* constants
* xlat/ptrace_cmds.in: Add arch-specific ptrace commands.
* xlat/ptrace_events.in: Add PTRACE_EVENT_MIGRATE for tile.
* xlat/ptrace_setoptions_flags.in: Add PTRACE_O_TRACEMIGRATE for tile.

This fixes Debian bug #734554.
2015-03-03 23:12:22 +00:00
Mike Frysinger
600eafb6ed Clarify bootstrap-vs-autoreconf usage
* README-hacking: Tell people to run ./bootstrap.
2015-03-03 01:45:30 +00:00
5a64656da6 mips n32: fix preadv/pwritev offset decoding
In mips n32 abi, like in most of 32-bit architectures, offset
is passed to preadv/pwritev syscalls using two syscall arguments.

* io.c (print_llu_from_low_high_val) [LINUX_MIPSN32]: Remove.
2015-03-03 01:36:29 +00:00
Mike Frysinger
d79ed12376 tests: skip ipc_sem.test on broken kernels
Rather than trigger an ERROR which fails `make check`, go with SKIP
instead.  We don't want the testsuite failing due to kernel bugs.

* tests/ipc_sem.c (main): Change 99 to 77.
2015-03-03 01:13:23 +00:00
Mike Frysinger
eb202baf41 tests: skip pc.test on s390
The s390 hardware can't support an exact si_addr, and the current kernels
don't handle text addresses correctly at all.  Until that improves, skip
the test on s390.

* tests/pc.c (main): Return 77 on s390 systems.
2015-03-03 01:13:10 +00:00
Mike Frysinger
90c80c46b8 tests: note the kernel configs for -yy options
* tests/net-yy.test: Note CONFIG_INET_TCP_DIAG.
* tests/unix-yy.test: Note CONFIG_UNIX_DIAG.
2015-03-03 01:12:18 +00:00
301c65cbf0 alpha: fix -yy decoding
* socketutils.c (receive_responses): Align buffer on a sizeof(long) boundary.

Reported-and-tested-by: Mike Frysinger <vapier@gentoo.org>
2015-03-02 23:39:41 +00:00
d50949d21c aarch64, x32: fix decoding of compat personality statfs64/fstatfs64
* statfs.c (struct compat_statfs64) [AARCH64 || X32]: Apply the same
attributes as on X86_64.
2015-03-02 21:34:02 +00:00
f677715a9b mips: fix compilation warning
* syscall.c (get_scno) [MIPS]: Fix harmless compilation warning
about comparison between signed and unsigned integer expressions.
2015-03-02 15:06:51 +00:00
822892ba45 x32: fix compilation warnings
* sysinfo.c (sys_sysinfo): Use ll length format modifier
instead of l and cast kernel ulong types to unsigned long long.
2015-03-02 14:59:20 +00:00
d819fe88fb aarch64: add -i option support
* syscall.c (print_pc): Add aarch64 support.
2015-03-02 03:42:21 +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
77e0d2dccc tests/uid16: skip if real uid is larger than 16bit
* tests/uid16.c (main): Skip if the uid returned by getuid matches
/proc/sys/kernel/overflowuid.
2015-03-02 02:26:02 +00:00
3a15bc8adf tests: fix uid tests on big endian architectures
* tests/uid.c (main): Ignore uids returned by getresuid to avoid
16bit vs 32bit issues on big endian architectures.
Change real UID instead of effective UID in setresuid test.
* tests/uid16.c (main): Likewise.
* tests/uid32.c (main): Change real UID instead of effective UID
in setresuid test to match uid.c
* tests/uid.awk: Update setresuid regexp.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2015-03-02 02:23:55 +00:00
Mike Frysinger
a8dcf253fa tests/getdents: handle older getdents calls
If the tools we use call older getdents syscalls where d_type isn't
passed back, or the arch is old (like Alpha) and can't pass back in
either version, make sure we don't fail.

* tests/getdents.awk (d_type_dir, d_type_reg): Accept DT_UNKNOWN.
2015-03-01 21:42:08 +00:00