b93d52fe3d
Change the license of strace to LGPL-2.1-or-later
...
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
c6782f144a
tests: change the license to GPL-2.0-or-later
...
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
Shankara Pailoor
bf195a8455
bpf: honor xlat styles when printing kernel version
...
* print_kernel_version.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (print_kernel_version): New prototype.
* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)):
Use print_kernel_version.
* tests/kernel_version.c: New file.
* tests/kernel_version-Xabbrev.c: Likewise.
* tests/kernel_version-Xraw.c: Likewise.
* tests/kernel_version-Xverbose.c: Likewise.
* tests/gen_tests.in (kernel_version, kernel_version-Xabbrev,
kernel_version-Xraw, kernel_version-Xverbose): New tests.
* tests/pure_executables.list: Add kernel_version,
kernel_version-Xabbrev, kernel_version-Xraw, and kernel_version-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-10 23:45:11 +00:00
Shankara Pailoor
e1f15583e0
print_dev_t: add xlat styles support
...
* print_dev_t.c (print_dev_t): Respect xlat_verbosity.
* tests/btrfs.c (sprint_makedev): New function.
(btrfs_print_balance_args, btrfs_test_dev_info_ioctl,
btrfs_test_dev_replace_ioctl, btrfs_test_get_dev_stats_ioctl,
btrfs_test_scrub_ioctls): Use it to update expected output.
* tests/xstatx.c (print_st_mode, sprint_makedev): New functions.
(print_stat): Use them.
* tests/fstat-Xabbrev.c: New file.
* tests/fstat-Xraw.c: Likewise.
* tests/fstat-Xverbose.c: Likewise.
* tests/fstat64-Xabbrev.c: Likewise.
* tests/fstat64-Xraw.c: Likewise.
* tests/fstat64-Xverbose.c: Likewise.
* tests/gen_tests.in (fstat-Xabbrev, fstat-Xraw, fstat-Xverbose,
fstat64-Xabbrev, fstat64-Xraw, fstat64-Xverbose): New entries.
* tests/trace_fstat.in: Likewise.
* tests/trace_stat_like.in: Likewise.
* tests/pure_executables.list: Add fstat-Xabbrev, fstat-Xraw,
fstat-Xverbose, fstat64-Xabbrev, fstat64-Xraw, and fstat64-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-10 23:45:11 +00:00
c40270dd87
i386, x32: use upoke() instead of set_regs()
...
This brings i386 and x32 in line with x86_64
and removes redundant HAVE_GETREGS_OLD checks.
Besides that, use of PTRACE_GET_SYSCALL_INFO would require
an extra get_regs() invocation before set_regs().
* syscall.c (ARCH_MIGHT_USE_SET_REGS): Define to 1.
[HAVE_GETREGS_OLD] (ARCH_MIGHT_USE_SET_REGS): Redefine to 0.
(ptrace_setregset_or_setregs): Check ARCH_MIGHT_USE_SET_REGS instead
of HAVE_GETREGS_OLD.
* linux/i386/arch_regs.c (ARCH_MIGHT_USE_SET_REGS): Redefine to 0.
* linux/powerpc/arch_regs.c: Likewise.
* linux/x86_64/arch_regs.c: Likewise.
* linux/i386/set_error.c (arch_set_error, arch_set_success)
[!HAVE_GETREGS_OLD]: Remove.
* linux/i386/set_scno.c (arch_set_scno) [!HAVE_GETREGS_OLD]: Remove.
* linux/powerpc/set_error.c (arch_set_error, arch_set_success)
[!HAVE_GETREGS_OLD]: Remove.
* linux/powerpc/set_scno.c (arch_set_scno) [!HAVE_GETREGS_OLD]: Remove.
* linux/x86_64/set_error.c [!HAVE_GETREGS_OLD]: Remove.
* linux/x86_64/set_scno.c: Likewise.
2018-12-05 18:37:34 +00:00
5be511bf86
upoke: workaround crippled x32
...
As PTRACE_POKEUSER is crippled on x32 by design from the very first
linux kernel commit v3.4-rc1~33^2~2 when it was introduced,
workaround this by using the raw x86_64 syscall instead.
* linux/ptrace_pokeuser.c: New file.
* linux/x32/ptrace_pokeuser.c: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* upoke.c: Include "ptrace_pokeuser.c".
(upoke): Use ptrace_pokeuser instead of ptrace.
2018-12-05 18:37:34 +00:00
1f84eefc40
x86_64: remove some annoying pieces of unused code
...
* linux/x86_64/get_scno.c (X32_PERSONALITY_NUMBER): Remove.
(arch_get_scno): Remove ifdefed archeological artefacts.
2018-12-05 18:37:34 +00:00
217eccfba5
Refactor tamper_with_syscall_exiting()
...
Move the code than deals with updating the return and error values
to separate functions.
* syscall.c (set_error, set_success): New functions.
(tamper_with_syscall_exiting): Use them.
2018-12-05 16:10:05 +00:00
51d89ef0a0
Refactor get_syscall_args() and get_error()
...
* linux/*/get_error.c: Rename all arch-specific implementations
of get_error() to arch_get_error().
* linux/*/get_syscall_args.c: Rename all arch-specific implementations
of get_syscall_args() to arch_get_syscall_args().
* syscall.c (get_syscall_args, get_error): New functions.
(tamper_with_syscall_exiting, get_syscall_result): Do not clear
tcp->u_error before get_error() invocation as the latter does it now.
2018-12-05 16:10:05 +00:00
917c2ccf3a
Refactor stack pointers
...
Change all linux/*/arch_regs.c to provide either ARCH_SP_REG
or ARCH_SP_PEEK_ADDR. Introduce get_stack_pointer(), rewrite
all code accessing stack pointers to use get_stack_pointer().
On some architectures stack pointers were referred to as frame pointers,
clean up this confusion.
* defs.h (get_stack_pointer): New prototype.
* syscall.c (get_stack_pointer): New function.
* linux/arch_rt_sigframe.c: New file.
* linux/aarch64/arch_regs.c (aarch64_sp_ptr, arm_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/alpha/arch_regs.c: Import linux/alpha/arch_regs.h.
(REG_FP): Rename to REG_SP.
(ARCH_SP_PEEK_ADDR): New macro.
* linux/alpha/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/arc/arch_regs.c (arc_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/arm/arch_regs.c (arm_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/arm/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/avr32/arch_regs.c (avr32_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/bfin/arch_regs.c (ARCH_SP_PEEK_ADDR): New macro.
* linux/hppa/arch_regs.c: Import linux/hppa/arch_regs.h.
(PT_GR30, ARCH_SP_PEEK_ADDR): New macros.
* linux/hppa/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/i386/arch_regs.c (i386_esp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/i386/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/i386/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/ia64/arch_regs.c (ia64_frame_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/ia64/arch_regs.h (ia64_frame_ptr): Remove.
* linux/ia64/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/m68k/arch_regs.c (m68k_usp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/m68k/arch_rt_sigframe.c: Link to i386/arch_rt_sigframe.c.
* linux/m68k/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/metag/arch_regs.c (metag_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/metag/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/microblaze/arch_regs.c (ARCH_SP_PEEK_ADDR): New macro.
* linux/mips/arch_regs.c: Import linux/mips/arch_regs.h.
(mips_regs): Add static qualifier.
(ARCH_SP_REG): New macro.
* linux/mips/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/nios2/arch_regs.c (nios2_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/or1k/arch_regs.c (or1k_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/powerpc/arch_regs.c (ppc_regs): Add static qualifier.
(ARCH_SP_REG): New macro.
* linux/powerpc/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/powerpc/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/powerpc64/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/riscv/arch_regs.c (riscv_sp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/s390/arch_regs.c (s390_frame_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/s390/arch_sigreturn.c (S390_FRAME_PTR): Remove.
(arch_sigreturn): Use get_stack_pointer.
* linux/s390x/arch_regs.c (s390_frame_ptr, s390x_frame_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/s390x/arch_sigreturn.c (S390_FRAME_PTR): Remove.
* linux/sh/arch_regs.c (ARCH_SP_PEEK_ADDR): New macro.
* linux/sh64/arch_regs.c: Likewise.
* linux/sparc/arch_regs.c: Import linux/sparc/arch_regs.h.
(sparc_regs): Add static qualifier.
(ARCH_SP_REG): New macro.
* linux/sparc/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/sparc64/arch_rt_sigframe.c (FUNC_GET_RT_SIGFRAME_ADDR): Use
get_stack_pointer.
* linux/tile/arch_regs.c (tile_regs): Add static qualifier.
(ARCH_SP_REG): New macro.
* linux/tile/arch_sigreturn.c (arch_sigreturn): Use get_stack_pointer.
* linux/x86_64/arch_regs.c (i386_esp_ptr, x86_64_rsp_ptr): Remove.
(ARCH_SP_REG): New macro.
* linux/x86_64/arch_regs.h (i386_esp_ptr, x86_64_rsp_ptr): Remove.
* linux/x86_64/arch_rt_sigframe.c: Link to i386/arch_rt_sigframe.c.
* linux/xtensa/arch_regs.c (ARCH_SP_PEEK_ADDR): New macro.
* linux/aarch64/arch_regs.h: Remove.
* linux/aarch64/arch_rt_sigframe.c: Remove.
* linux/alpha/arch_regs.h: Remove.
* linux/alpha/arch_rt_sigframe.c: Remove.
* linux/arc/arch_regs.h: Remove.
* linux/arc/arch_rt_sigframe.c: Remove.
* linux/arm/arch_regs.h: Remove.
* linux/arm/arch_rt_sigframe.c: Remove.
* linux/avr32/arch_regs.h: Remove.
* linux/avr32/arch_rt_sigframe.c: Remove.
* linux/bfin/arch_rt_sigframe.c: Remove.
* linux/hppa/arch_regs.h: Remove.
* linux/i386/arch_regs.h: Remove.
* linux/m68k/arch_regs.h: Remove.
* linux/metag/arch_regs.h: Remove.
* linux/microblaze/arch_rt_sigframe.c: Remove.
* linux/mips/arch_regs.h: Remove.
* linux/mips/arch_rt_sigframe.c: Remove.
* linux/nios2/arch_regs.h: Remove.
* linux/nios2/arch_rt_sigframe.c: Remove.
* linux/or1k/arch_regs.h: Remove.
* linux/or1k/arch_rt_sigframe.c: Remove.
* linux/powerpc/arch_regs.h: Remove.
* linux/powerpc64/arch_regs.h: Remove.
* linux/riscv/arch_regs.h: Remove.
* linux/riscv/arch_rt_sigframe.c: Remove.
* linux/s390/arch_regs.h: Remove.
* linux/s390/arch_rt_sigframe.c: Remove.
* linux/s390x/arch_regs.h: Remove.
* linux/s390x/arch_rt_sigframe.c: Remove.
* linux/sh/arch_rt_sigframe.c: Remove.
* linux/sh64/arch_rt_sigframe.c: Remove.
* linux/sparc/arch_regs.h: Remove.
* linux/sparc/arch_rt_sigframe.c: Remove.
* linux/sparc64/arch_regs.h: Remove.
* linux/tile/arch_regs.h: Remove.
* linux/tile/arch_rt_sigframe.c: Remove.
* linux/xtensa/arch_rt_sigframe.c: Remove.
* Makefile.am (EXTRA_DIST): Remove them, add linux/arch_rt_sigframe.c.
2018-12-05 16:10:05 +00:00
bcd5cdddec
Refactor print_pc()
...
Split print_pc() into arch-independent print_instruction_pointer()
and arch-specific get_instruction_pointer().
* print_instruction_pointer.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (print_pc): Remove.
(get_instruction_pointer, print_instruction_pointer): New prototypes.
* syscall.c (print_pc): Remove.
(get_instruction_pointer): New function.
* strace.c (printleader): Replace print_pc with
print_instruction_pointer.
2018-12-05 16:10:05 +00:00
afc80cdb3f
ppc64: remove redundant redefinition
...
* linux/powerpc64/arch_regs.c (ARCH_PC_REG): Remove.
2018-12-05 16:10:05 +00:00
Shankara Pailoor
26e1435f91
print_dev_t: print major and minor numbers in hex like stat(1)
...
* print_dev_t.c (print_dev_t): Print major and minor numbers in hex.
* strace.1.in: Update makedev example.
* tests/bpf-obj_get_info_by_fd.c (main): Update expected output.
* tests/btrfs.c (btrfs_print_balance_args, btrfs_test_scrub_ioctls,
btrfs_test_dev_info_ioctl, btrfs_test_get_dev_stats_ioctl,
btrfs_test_dev_replace_ioctl): Update expected output.
* tests/ioctl_dm.c (main): Likewise.
* tests/ioctl_loop.c (print_loop_info, print_loop_info64): Likewise.
* tests/mknod.c (main): Likewise.
* tests/mknodat.c (main): Likewise.
* tests/nlattr_unix_diag_msg.c (main): Likewise.
* tests/ustat.c (main): Likewise.
* tests/xstatx.c (print_stat): Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-05 16:10:05 +00:00
Janosch Frank
f476724ea1
s390x: beautify sthyi data tail prints
...
The test already expects a ", " before the print of struct
padding. Let's add it to s390.c to make the output look a bit nicer and
fix test runs on z/VM that have padding at the end of the STHYI structs.
* s390.c (decode_ebcdic): Add missing comma.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
2018-12-05 16:10:05 +00:00
1dc2a5313c
Stop using SIG_0
...
Number 0 is not a valid signal number, and SIG_0 is not a valid
description for a signal.
* linux/signalent.h: Replace SIG_0 with 0.
* linux/alpha/signalent.h: Likewise.
* linux/hppa/signalent.h: Likewise.
* linux/mips/signalent.h: Likewise.
* linux/sparc/signalent.h: Likewise.
* filter_qualify.c (sigstr_to_uint): Start iterations with number 1.
* tests/fcntl-common.c (test_fcntl_others): Update expected output.
* tests/kill.c (main): Likewise.
* tests/ptrace.c (test_peeksiginfo): Likewise.
* tests/s390_runtime_instr.c (main): Likewise.
2018-11-27 01:13:40 +00:00
114249603e
mem: fix build on architectures where kernel_ulong_t is bigger than long
...
* mem.c (print_mmap_flags): Fix format string.
Fixes: v4.25-26-g0933b3086 "mem: add xlat styles support to print_mmap_flags"
2018-11-26 20:49:05 +00:00
a4fb2fbdde
tests: add remap_file_pages test variants with different xlat verbosity levels
...
* tests/remap_file_pages-Xabbrev.c: New file.
* tests/remap_file_pages-Xraw.c: Likewise.
* tests/remap_file_pages-Xverbose.c: Likewise.
* tests/remap_file_pages.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/pure_executables.list: Add remap_file_pages-Xabbrev,
remap_file_pages-Xraw, and remap_file_pages-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (remap_file_pages-Xabbrev, remap_file_pages-Xraw,
remap_file_pages-Xverbose): New tests.
2018-11-26 02:04:04 +00:00
Shankara Pailoor
0933b30869
mem: add xlat styles support to print_mmap_flags
...
* mem.c (print_mmap_flags): Respect xlat_verbosity.
* tests/mmap.c (main): Update expected output.
* tests/old_mmap.c (main): Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-11-26 02:04:04 +00:00
956dc3ed36
tests: add memfd_create test variants with different xlat verbosity levels
...
* tests/memfd_create-Xabbrev.c: New file.
* tests/memfd_create-Xraw.c: Likewise.
* tests/memfd_create-Xverbose.c: Likewise.
* tests/memfd_create.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/pure_executables.list: Add memfd_create-Xabbrev, memfd_create-Xraw,
and memfd_create-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (memfd_create-Xabbrev, memfd_create-Xraw,
memfd_create-Xverbose): New tests.
2018-11-26 02:04:04 +00:00
Shankara Pailoor
f11fb909d7
memfd_create: add xlat styles support
...
* memfd_create.c (SYS_FUNC(memfd_create)): Respect xlat_verbosity.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-11-26 02:04:04 +00:00
6f9cf06b99
Enhance error diagnostics when the first exec fails
...
When the first exec fails, strace used to print the trace of the child
process till its end, producing a lot of confusing output.
Enhance the diagnostics by hiding irrelevant parts of the trace.
* defs.h (TCB_CHECK_EXEC_SYSCALL): New macro. Change values of TCB_*
macros listed after TCB_CHECK_EXEC_SYSCALL.
(check_exec_syscall): New macro.
* strace.c (dispatch_event) <TE_STOP_BEFORE_EXECVE>: Clear
TCB_CHECK_EXEC_SYSCALL flag.
* syscall.c (syscall_entering_trace): Do not clear TCB_HIDE_LOG when
TCB_CHECK_EXEC_SYSCALL is set, set TCB_CHECK_EXEC_SYSCALL along with
clearing TCB_HIDE_LOG.
(syscall_exiting_decode): Set TCB_HIDE_LOG if TCB_CHECK_EXEC_SYSCALL
is set.
* tests/first_exec_failure.test: New file.
* tests/Makefile.am (MISC_TESTS): Add first_exec_failure.test.
Closes: https://github.com/strace/strace/issues/88
2018-11-24 23:56:38 +00:00
c4c993b642
build: use more traditional git options
...
The support of --no-patch alias to -s option in "git diff" and related
git commands was added in git v1.8.4.
* copyright-year-gen: Use "git show -s" instead of "git show --no-patch".
* file-date-gen: Use "git log -s" instead of "git log --no-patch".
Closes: https://github.com/strace/strace/issues/80
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
97c3deca54
basic_filters: add %net as a possible designation for network syscalls
...
* basic_filters.c (lookup_class) <syscall_class>: Add %net as an alias
for TRACE_NETWORK.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
384e286e5d
hppa: add a comment about old name of syscall number 102
...
Also, remove empty definition.
* linux/hppa/syscallent.h ([102]): Remove empty definition,
add a comment that it was socketcall.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
ab30fe571d
mips: update syscall entry for reserved221 syscall
...
The syscall number 4221 is actually called "reserved221" on mips.
* linux/mips/syscallent-o32.h ([4221]): Set to "reserved221".
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
ca2121efef
arm: add a comment that __ARM_NR_cmpxchg was removed in 4.4
...
* linux/arm/syscallent.h: Add a comment about __ARM_NR_cmpxchg.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
2482e7caba
arm: replace empty syscall entry definitions with comments
...
* linux/arm/syscallent.h ([222]): Remove definition, add a comment
that it was tux syscall.
([223]): Remove definition, add comment that it was unused.
([254]): Remove definition, add comment that it was reserved
for set_thread_area.
([255]): Remove definition, add comment that it was reserved
for get_thread_area.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
f9163e811b
linux/dummy.h: remove unused sys_phys definition
...
* linux/dummy.h (sys_phys): Remove.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
98306f2c05
numa: use already existing array item printing function
...
* numa.c (print_int): Remove.
(SYS_FUNC(move_pages)): Use print_int32_array_member instead of
print_int.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
d30aacd4ec
net: use already existing array item printing function
...
* net.c (print_uint32): Remove.
(print_getsockopt): Use print_uint32_array_member instead of
print_uint32.
2018-11-24 01:22:13 +00:00
Eugene Syromyatnikov
b4b01268bb
Remove HAVE_LINUX_GENETLINK_H ifdefs
...
<linux/netlink.h> is available since Linux 2.6.15 (commit
v2.6.15-rc1~53^2).
* configure.ac (AC_CHECK_HEADERS): Remove linux/genetlink.h.
* socketutils.c [!HAVE_LINUX_GENETLINK_H]: Remove.
* tests/netlink_generic.c [!HAVE_LINUX_GENETLINK_H]: Likewise.
2018-11-24 01:22:13 +00:00
341eb0859d
Document -X option in strace -h output
...
* strace.c (usage): Mention -X option.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Complements: v4.23~308 "Add user interface for configuring xlat output style"
2018-11-21 22:51:49 +00:00
eca7e95886
Move kill_save_errno to a separate header file
...
This function is going to be used outside strace.c,
so make it globally available and move it to a separate header file.
* strace.c (kill_save_errno): Add "inline" keyword, change return type
from "void" to "int", move the function ...
* kill_save_errno.h: ... to this new file.
* Makefile.am (strace_SOURCES): Add it.
2018-11-21 17:32:51 +00:00
422ecbe675
syscall_entering_trace: set TCB_FILTERED along with TCB_HIDE_LOG
...
This allows to remove some of hide_log() checks that became redundant.
* syscall.c (syscall_entering_trace): Set TCB_FILTERED along with
TCB_HIDE_LOG, remove now redundant hide_log(tcp) check.
(syscall_exiting_decode): Replace "filtered(tcp) || hide_log(tcp)"
with "filtered(tcp)".
2018-11-20 04:56:30 +00:00
7a4c6b715d
syscall_entering_trace: optimize clearing of TCB_HIDE_LOG flag
...
* syscall.c (syscall_entering_trace): Since we check for TCB_HIDE_LOG
flag anyway, do not clean it unless it is set.
2018-11-20 04:56:30 +00:00
62267a93f4
print_inet_addr: print nameless and named addresses using the same style
...
* sockaddr.c (print_inet_addr): Handle var_name == NULL case in a more
structured way: use inet_addr("%s") form to print AF_INET addresses
in structureless contexts where no structure field name is available.
Likewise, use inet_pton(AF_INET6, "%s") that case.
* tests/nlattr_ifaddrmsg.c (main): Update expected output.
* tests/nlattr_ifla_af_spec.c (main): Likewise.
Complements: v4.19~76 "print_inet_addr: add support of invocations without field name"
2018-11-12 13:42:11 +00:00
f9e5f12b7c
tests: extend test coverage of RND* ioctl commands
...
* tests/ioctl_random.c (main): Check the error path of RNDADDENTROPY
parser. Check decoding of unrecognized RND* ioctl commands.
2018-11-05 17:40:36 +00:00
Rasmus Villemoes
2649c8c8b6
Add support for /dev/[u]random ioctls
...
* random_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (DECL_IOCTL): Add random.
* ioctl.c (ioctl_decode): Add 'R' case.
* xlat/random_ioctl_cmds.in: New file.
* tests/ioctl_random.c: New file.
* tests/.gitignore: Add ioctl_random.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ioctl_random): New entry.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2018-11-05 17:40:36 +00:00
Eugene Syromyatnikov
e2d2dc699f
Add dist/INSTALL
...
* dist/INSTALL: New file.
* bootstrap: Copy it.
* .gitignore: Add /INSTALL.
References: https://github.com/strace/strace/issues/17
References: https://github.com/strace/strace/issues/55
Closes: https://github.com/strace/strace/issues/67
2018-11-01 13:00:37 +00:00
Eugene Syromyatnikov
846e277d0f
Rename INSTALL to README-configure
...
* INSTALL-git.md: Replace INSTALL with README-configure.
* maint/install.texi: Likewise.
* INSTALL: Rename to README-configure, regenerate.
* Makefile.am (EXTRA_DIST): Add README-configure.
References: https://github.com/strace/strace/issues/85
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-11-01 13:00:37 +00:00
Eugene Syromyatnikov
e471c53d1d
dist/README: add more references
...
* dist/README: Mention README-hacking, add links to repositories
and the mailing list archive.
Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-11-01 13:00:37 +00:00
Eugene Syromyatnikov
5f7f0b6c85
README.md: add a link to the new contributors guide
...
* README.md: Add a link to the Guide of new contributors.
Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
2018-11-01 13:00:37 +00:00
4c9516cc9b
Post-release administrivia
...
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.25-1.
* strace.spec.in: Likewise.
2018-10-30 10:43:31 +00:00
c12d2de112
Prepare for 4.25 release
...
* NEWS: Update for 4.25 release.
2018-10-30 08:09:10 +00:00
5c62e29237
Update copyright headers
...
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-10-30 08:09:10 +00:00
6726f218f7
Update NEWS
2018-10-25 20:50:32 +00:00
Elvira Khabirova
7a7f6c6a7c
Implement decoding of NBD_* ioctl commands
...
* nbd_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (DECL_IOCTL): Add nbd.
* ioctl.c (ioctl_decode): Add 0xab (nbd) case.
* xlat/nbd_ioctl_cmds.in: Likewise.
* xlat/nbd_ioctl_flags.in: Likewise.
* tests/ioctl_nbd.c: Likewise.
* tests/.gitignore: Add ioctl_nbd.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ioctl_nbd): New entry.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-10-25 20:50:32 +00:00
6d6d5bc480
tests: fix build with recent kernel headers
...
Linux commit v4.19-rc2-5-g2ecefa0a15fd0ef88b9cd5d15ceb813008136431
changed the definition of struct keyctl_dh_params in an incompatible
way again. Workaround this issue by using designated initializers.
* tests/keyctl.c (main): Use designated initializers for
struct keyctl_dh_params.
2018-10-25 13:36:54 +00:00
4370024753
arm, sparc, sparc64: wire up io_pgetevents
...
* linux/arm/syscallent.h ([399]): Wire up io_pgetevents syscall
introduced by Linux commit v4.19-rc7~24^2~1.
(ARM_FIRST_SHUFFLED_SYSCALL, SYS_socket_subcall): Raise from 400 to 500,
to make room for new syscalls.
* linux/sparc/syscallent.h ([361]): Wire up io_pgetevents syscall
introduced by Linux commit v4.19~31^2~5.
* linux/sparc64/syscallent.h: Likewise.
2018-10-24 09:05:38 +00:00
Gleb Fotengauer-Malinovskiy
3960969554
Update ioctl entries from linux v4.19
...
* linux/32/ioctls_inc_align16.h: Update from linux v4.19-rc8
using ioctls_gen.sh.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* linux/64/ioctls_inc.h: Likewise.
* linux/x32/ioctls_inc0.h: Likewise.
* linux/i386/ioctls_arch0.h: Likewise.
* linux/x86_64/ioctls_arch0.h: Likewise.
* NEWS: Mention this.
2018-10-24 07:48:56 +00:00