Compare commits

..

60 Commits

Author SHA1 Message Date
cff0b9e5ca tests: add kill_child test
This tests repeatedly creates and kills children, so some corner
cases in handling of not-quite-existing processes can be observed.

Previously, strace was crashing in the following situation:

    13994 ????( <unfinished ...>
    ...
    13994 <... ???? resumed>) = ?

as tcp->s_ent wasn't initialised on syscall entering and
strace.c:print_event_exit segfaulted when tried to access
tcp->s_ent->sys_name.

* tests/kill_child.c: New file.
* tests/kill_child.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add kill_child.
(MISC_TESTS): Add kill_child.test.
2019-02-01 12:40:58 +01:00
5cf7f16bad syscall.c: set MEMORY_MAPPING_CHANGE in stub sysent
As unknown syscalls may incur unknown side effects.

* syscall.c (stub_sysent): Set sys_flags to MEMORY_MAPPING_CHANGE.
2019-02-01 12:40:58 +01:00
762abe0ce3 Use accessors for tcp->s_ent, return a stub struct if it is NULL
Since code paths are non-trivial, it's an attempt to future-proof and
prevent improper access of tcp->s_ent fields.

* defs.h (struct tcb): Update the description of s_ent field.
(stub_sysent): New declaration.
(tcp_sysent, n_args): New macro functions.
* ipc.c (SYS_FUNC(ipc)): Use n_args() instead of tcp->s_ent->nargs.
* linux/alpha/get_syscall_args.c (get_syscall_args): Likewise.
* linux/bfin/get_syscall_args.c (get_syscall_args): Likewise.
* linux/hppa/get_syscall_args.c (get_syscall_args): Likewise.
* linux/ia64/get_syscall_args.c (get_syscall_args): Likewise.
* linux/microblaze/get_syscall_args.c (get_syscall_args): Likewise.
* linux/mips/get_syscall_args.c (get_syscall_args): Likewise.
* linux/sh/get_syscall_args.c (get_syscall_args): Likewise.
* linux/sh64/get_syscall_args.c (get_syscall_args): Likewise.
* linux/x86_64/get_syscall_args.c (get_syscall_args): Likewise.
* linux/xtensa/get_syscall_args.c (get_syscall_args): Likewise.
* prctl.c (print_prctl_args): Likewise.
* signal.c (SYS_FUNC(sgetmask)): Likewise.
* util.c (printargs, printargs_u, printargs_d): Likewise.
* syscall.c (decode_ipc_subcall, decode_syscall_subcall: Likewise.
(dumpio, tamper_with_syscall_exiting, syscall_entering_decode,
syscall_entering_decode, syscall_entering_trace, syscall_entering_trace,
syscall_exiting_decode, print_syscall_resume, syscall_exiting_trace,
get_syscall_result): Use tcp_sysent instead of tcp->s_ent().
(stub_sysent): New stub sysent.
(get_scno): Reset scno, s_ent, qual_flg; initialise s->ent from
stub_sysent.
* pathtrace.c (pathtrace_match_set): Use tcp_sysent instead of
tcp->s_ent().
2019-02-01 12:40:58 +01:00
8c015ef905 syscall.c: remove arch check for SEN_execv usage
SEN_* decalrations are always present and can be used regardless
of architecture.

* syscall.c (syscall_entering_trace): Remove "#if defined SPARC ||
defined SPARC64" guard.
2019-02-01 12:40:58 +01:00
fc6c6578dc Merge "<... resumed>" printing
Apparently, it was slightly different with no apparent reason. Use
a single routine to print this message now.

* defs.h (print_syscall_resume): New function declaration.
* strace.c (print_event_exit): Replace open-coding of "<... resumed>"
message printing with a print_syscall_resume() call.
* syscall.c (syscall_exiting_trace): Likewise.
(print_syscall_resume): New function.
* tests/threads-execve.c: Update expected output.
2019-02-01 12:40:57 +01:00
756ccfa00b Implement queueing of threads before dispatching them
It is possible that some tracees call a lot of cheap syscalls too fast,
and that can lead to starvation to the point some tracees are not served
for indefinite amount of time.  In order to solve that unfairness, try
to collect all the pending tracees first along with the relevant
information and only then dispatch the events.

* defs.h: Include "list.h".
(struct tcb): Add wait_data_idx and wait_list fields.
* strace.c (struct tcb_wait_data): Add "msg" field.
(tcb_wait_tab): New static variable.
(expand_tcbtab): Resize tcb_wait_tab along with tcbtab, provide
an additional slot for extra event.
(droptcb): Remove tcp from wait_list.
(maybe_switch_tcbs): Get old pid from
tcb_wait_tab[tcp->wait_data_idx].msg.
(next_event): Add pending_tcps, extra_tcp, wait_nohang, elem, and
wait_tab_pos variables; check for elements in pending_tcps and skip
waiting if the list is not empty; check for extra_tcp and skip waiting
along with swapping wait_data_idx with wait_extra_data_idx;
after the initial wait, call wait4() in loop with WNOHANG flag set;
fetch siginfo on signal and eventmsg on PTRACE_EVENT_EXEC;
return the first tcp in pending_tcps list.
* tests/Makefile.am (XFAIL_TEST): Remove looping_threads.test.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=478419
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=526740
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=851457
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1609318
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1610774
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Co-Authored-by: Denys Vlasenko <dvlasenk@redhat.com>
Co-Authored-by: Andreas Schwab <aschwab@redhat.com>
Co-Authored-by: Jeff Law <law@redhat.com>
Co-Authored-by: DJ Delorie <dj@redhat.com>
2019-02-01 12:40:57 +01:00
1bff0fadad Add a generic list implementation
Similar to the one used in the Linux kernel.

* macros.h (cast_ptr, containerof): New macros.
* list.h: New file.
* Makefile.am (strace_SOURCES): Add it.
2019-02-01 12:40:29 +01:00
c1838de552 tests: check tracing of looping threads
* test/many_looping_threads.c: Remove.
* test/.gitignore: Remove many_looping_threads.
* test/Makefile (PROGS): Likewise.
(many_looping_threads): Remove.
* tests/looping_threads.c: New file.
* tests/looping_threads.test: New test.
* tests/.gitignore: Add looping_threads.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(looping_threads_LDADD): New variable.
(MISC_TESTS, XFAIL_TESTS): Add looping_threads.test.
2019-01-29 15:39:18 +01:00
2c8b6de913 mips o32: fix build
Commit 917c2ccf3a "Refactor stack pointers" moved mips_REG_* macros
from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these
macros are no longer used outside syscall.c or files included by
syscall.c, but this caused a build regression on mips o32 because
decode_syscall_subcall() uses mips_REG_SP prior to its definition.

* syscall.c (decode_syscall_subcall): Move ...
* linux/mips/get_syscall_args.c: ... here.
* NEWS: Mention this fix.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Fixes: v4.26~61 "Refactor stack pointers"
2019-01-08 02:27:18 +00:00
f414d9e3ba Fix build for no-MMU targets
Commit 7488ce9e23 "Check whether PTRACE_GET_SYSCALL_INFO is supported
by the kernel" added a fork() call in test_ptrace_get_syscall_info()
which is included in the main strace executable code.  Although the
test_ptrace_get_syscall_info() routine is not called on no-MMU targets,
the compiler can't optimize it out because it is a global symbol.
So build for no-MMU targets currently fails:

strace-ptrace_syscall_info.o: In function `test_ptrace_get_syscall_info':
ptrace_syscall_info.c:(.text+0x1c): undefined reference to `fork'

* ptrace_syscall_info.c (test_ptrace_get_syscall_info): Make
the definition depend on HAVE_FORK.
* strace.c (init): Call test_ptrace_get_syscall_info unconditionally.
* NEWS: Mention this fix.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: v4.26~50 "Check whether PTRACE_GET_SYSCALL_INFO is supported by the kernel"
2019-01-08 02:27:18 +00:00
04512207ac linux/mips/.gitignore: drop copyright header
The '/*' in the first line of the copyright header matches all files in
that directory.  No other .gitignore file has this header.  Drop it.

* linux/mips/.gitignore: Remove copyright header.

Fixes: v4.26~23 "Add copyright headers to some files that lack them"
2019-01-08 02:27:18 +00:00
3798b04eab Honor xlat styles when decoding sockaddr_in, sockaddr_in6, and sockaddr_ll
* print_fields.h (PRINT_FIELD_NET_PORT): Handle xlat styles.
* sockaddr.c (print_sll_protocol): New function.
(print_sockaddr_data_ll, print_inet_addr, print_sockaddr_data_in6):
Handle xlat styles.
* NEWS: Mention this.
* tests/sockaddr_xlat.c: New file.
* tests/sockaddr_xlat-Xabbrev.c: Likewise.
* tests/sockaddr_xlat-Xraw.c: Likewise.
* tests/sockaddr_xlat-Xverbose.c: Likewise.
* tests/Makefile.am (EXTRA_DIST): Add sockaddr_xlat.c.
* tests/gen_tests.in (sockaddr_xlat-Xabbrev, sockaddr_xlat-Xraw,
sockaddr_xlat-Xverbose): New tests.
* tests/pure_executables.list: Add sockaddr_xlat-Xabbrev,
sockaddr_xlat-Xraw, and sockaddr_xlat-Xverbose.
* tests/.gitignore: Likewise.
2019-01-08 02:27:18 +00:00
b9a262af78 Remove PRINT_FIELD_INET4_ADDR
Reduce code duplication by removing PRINT_FIELD_INET4_ADDR
and using PRINT_FIELD_INET_ADDR instead.

* print_fields.h (PRINT_FIELD_INET4_ADDR): Remove.
* msghdr.c (print_cmsg_ip_pktinfo): Use PRINT_FIELD_INET_ADDR
instead of PRINT_FIELD_INET4_ADDR.
* net.c (print_mreq): Likewise.
* sockaddr.c (print_sockaddr_data_in): Likewise.
2019-01-07 23:30:52 +00:00
bc87159e49 xlat: update REL_* constants
* xlat/evdev_relative_axes.in (REL_HWHEEL_HI_RES): New constant
introduced by Linux kernel commit v5.0-rc1~18^2^7~7.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
77265f5d49 xlat: update UDP_* constants
* xlat/sock_udp_options.in (UDP_GRO): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~379^2~8.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
88d842435e xlat: update FAN_* constants
* xlat/fan_event_flags.in (FAN_OPEN_EXEC, FAN_OPEN_EXEC_PERM): New
constants introduced by Linux kernel commits v5.0-rc1~124^2~5
and v5.0-rc1~124^2~3, respectively.
* NEWS: Mention this.
* tests/fanotify_mark.c (main): Update expected output.
2019-01-05 21:14:42 +00:00
9c529cda68 xlat: update SCTP_* constants
* xlat/sock_sctp_options.in (SCTP_EVENT): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~255^2.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
3ef1efa2d1 xlat: update IFLA_* constants
* xlat/rtnl_ifla_info_data_bridge_attrs.in (IFLA_BR_MULTI_BOOLOPT): New
constant introduced by Linux kernel commit v5.0-rc1~129^2~207^2~2.
* NEWS: Mention this.
* tests/nlattr_ifla_linkinfo.c (main): Update.
2019-01-05 21:14:42 +00:00
17a1b88f8e xlat: update NETNSA_* constants
* xlat/rtnl_nsid_attrs.in (NETNSA_TARGET_NSID, NETNSA_CURRENT_NSID): New
constants introduced by Linux kernel commits v5.0-rc1~129^2~201^2~2
and v5.0-rc1~129^2~201^2, respectively.
* rtnl_nsid.c (rtgenmsg_nla_decoders): Add NETNSA_TARGET_NSID
and NETNSA_CURRENT_NSID.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
be27e07c97 xlat: update SECCOMP_* constants
* xlat/seccomp_ops.in (SECCOMP_GET_NOTIF_SIZES): New constant introduced
by Linux kernel commit v5.0-rc1~66^2~1^2~1.
* xlat/seccomp_ret_action.in (SECCOMP_RET_USER_NOTIF): Likewise.
* xlat/seccomp_filter_flags.in (SECCOMP_FILTER_FLAG_NEW_LISTENER):
Likewise.
* NEWS: Mention this.
* tests/seccomp-filter.c (main): Update expected output.
* tests/seccomp-filter-v.c (main): Likewise.
* tests/seccomp_get_action_avail.c (main): Check SECCOMP_RET_USER_NOTIF.
2019-01-05 21:14:42 +00:00
48f74df7d3 xlat: update NT_* constants
* xlat/nt_descriptor_types.in (NT_ARM_PAC_MASK, NT_MIPS_MSA): New
constants introduced by Linux kernel commits v5.0-rc1~35^2~21
and v5.0-rc1~30^2~58, respectively.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
63de2e2055 xlat: update PR_* constants
* xlat/prctl_options.in (PR_PAC_RESET_KEYS): New constant introduced
by Linux kernel commit v5.0-rc1~35^2~19.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
2b31eeb6c1 xlat: update V4L2_* constants
* xlat/v4l2_buf_types.in (V4L2_BUF_TYPE_META_OUTPUT): New constant
introduced by Linux kernel commit v5.0-rc1~181^2~21.
* xlat/v4l2_device_capabilities_flags.in (V4L2_CAP_META_OUTPUT):
Likewise.
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_CNF4): New constant introduced
by Linux kernel commit v5.0-rc1~182^2~120.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
4ba813df47 xlat: update KVM_CAP_* constants
* xlat/kvm_cap.in (KVM_CAP_MANUAL_DIRTY_LOG_PROTECT,
KVM_CAP_HYPERV_CPUID): New constants introduced by Linux kernel commits
v5.0-rc1~156^2~115 and v5.0-rc1~156^2~74, respectively.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
d0d79b4b7e xlat: update NDA_* constants
* xlat/rtnl_neigh_attrs.in (NDA_PROTOCOL): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~79.
* rtnl_neigh.c (ndmsg_nla_decoders): Add NDA_PROTOCOL.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
536d2af968 xlat: update BTRFS_FEATURE_INCOMPAT_* constants
* xlat/btrfs_features_incompat.in
(BTRFS_FEATURE_INCOMPAT_METADATA_UUID): New constant introduced by Linux
kernel commit v5.0-rc1~126^2~64.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
bfff2ebaa6 xlat: update *_MAGIC constants
* xlat/fsmagic.in (BINDERFS_SUPER_MAGIC): New constant introduced
by Linux kernel commit v5.0-rc1~95^2~15.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
25a73fb12f xlat: update KERN_* constants
* xlat/sysctl_kern.in (KERN_PANIC_ON_WARN, KERN_PANIC_PRINT): New
constants introduced by Linux kernel commits v3.19-rc1~135^2~91
and v5.0-rc1~38^2~16, respectively.
* configure.ac (AC_CHECK_DECLS): Add them.
* NEWS: Mention this.
2019-01-05 21:14:42 +00:00
cf36cc7c78 xlat: update BPF_F_* constants
* xlat/bpf_map_flags.in (BPF_F_ZERO_SEED): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~114^2~18^2~3.
* xlat/bpf_prog_flags.in (BPF_F_ANY_ALIGNMENT): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~209^2~17^2~3.
* NEWS: Mention this.
* tests/bpf.c (BPF_MAP_CREATE_checks, BPF_PROG_LOAD_checks,
print_BPF_PROG_LOAD_attr3, print_BPF_PROG_LOAD_attr4): Update.
2019-01-05 21:14:42 +00:00
91cdd32f65 tests: fix prog_info initialization in bpf-obj_get_info_by_fd-prog*
The sys_bpf(BPF_OBJ_GET_INFO_BY_FD, &bpf_prog_get_info_attr, ...) is
called in a loop.  The bpf_prog_get_info_attr.info object is in size 104
but bpf_prog_get_info_attr.info_len is in size 168.  Hence, if the prog
is jited, the second iteration onwards will have nr_jited_ksyms == 1
which is asking the kernel to fill the
bpf_prog_get_info_attr.info.jited_ksyms and it is NULL.

* tests/bpf-obj_get_info_by_fd.c (main): Clear memory beyond prog_info
at the start of every iteration.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2019-01-05 21:14:42 +00:00
3e93457d5f tests: use tail_alloc instead of calloc in bpf-obj_get_info_by_fd-prog*
This guarantees that map_info and prog_info objects are not accessed
out of bounds.

* tests/bpf-obj_get_info_by_fd.c: Include <string.h>.
(main): Use tail_alloc instead of calloc for map_info and prog_info.
2019-01-05 21:14:42 +00:00
cd5b418320 Bring lists back to the sorted order
* .gitignore: Make the list sorted again.
* Makefile.am (strace_SOURCES): Likewise.
* tests/.gitignore: Likewise.
* tests/gen_tests.in: Likewise.
* tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, EXTRA_DIST):
Likewise.
2019-01-02 00:29:09 +00:00
cab745b842 tests: fix strace-k.test on alpha
Change strace-k.test to use chdir syscall instead of getpid syscall
because the latter is not universally available, e.g. there is no getpid
syscall on alpha.

* tests/stack-fcall-3.c (f3) <default>: Replace getpid with chdir.
* tests/strace-k.test: Likewise.
* tests/strace-k.expected: Likewise.
* tests/strace-k-demangle.expected: Likewise.
* NEWS: Mention this.
2019-01-01 21:36:08 +00:00
d6c71dd061 Fix preprocessor indentation
Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
	cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done
2018-12-30 15:35:21 +00:00
51bd6db1ef Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.26-1.
* strace.spec.in: Likewise.
2018-12-30 15:35:21 +00:00
27739ebccc Prepare for 4.26 release
* NEWS: Update for 4.26 release.
2018-12-26 18:25:10 +00:00
2087d82fc7 strace.spec.in: add a comment about the license 2018-12-26 18:25:10 +00:00
2ecf1d5c2b Update ioctl entries from linux v4.20
* linux/32/ioctls_inc_align16.h: Update from linux v4.20
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/mips/ioctls_arch0.h: Likewise.
* linux/powerpc/ioctls_arch0.h: Likewise.
* linux/s390/ioctls_arch0.h: Likewise.
* linux/s390x/ioctls_arch0.h: Likewise.
* NEWS: Mention this.
2018-12-26 18:25:10 +00:00
721476cb78 maint: update for linux 4.20
* maint/ioctls_sym.sh: Include linux/compiler_attributes.h in every
processed file.
Use asm/ioctls.h workaround for asm-generic/ioctls.h too.
2018-12-26 18:25:10 +00:00
333079522a xlat: update BPF_* constants
* xlat/bpf_map_types.in (BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE): New
constant introduced by Linux kernel commit v4.20-rc1~14^2~124^2~12^2~7.
(BPF_MAP_TYPE_QUEUE, BPF_MAP_TYPE_STACK): New constants introduced
by Linux kernel commit v4.20-rc1~151^2~32^2~11^2~3.
* xlat/bpf_commands.in (BPF_MAP_LOOKUP_AND_DELETE_ELEM): New constant
introduced by Linux kernel commit v4.20-rc1~151^2~32^2~11^2~2.
* tests/bpf.c (BPF_MAP_CREATE_checks): Update.
2018-12-26 01:59:38 +00:00
38ea49ad11 xlat: add PR_SPEC_INDIRECT_BRANCH to pr_spec_cmds
* xlat/pr_spec_cmds.in (PR_SPEC_INDIRECT_BRANCH): New constant,
introduced by Linux commit v4.20-rc5~4^2~3.
* prctl.c (SYS_FUNC(prctl)) <case PR_GET_SPECULATION_CTRL, case
PR_SET_SPECULATION_CTRL>: Add PR_SPEC_INDIRECT_BRANCH handling.
* tests/prctl-spec-inject.c (main): Add PR_SPEC_INDIRECT_BRANCH decoding
checks, update expected output.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
c065838680 xlat: update V4L2_CID_* and V4L2_PIX_FMT_* constants
* xlat/v4l2_control_ids.in (V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS,
V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION): New constants, introduced
by Linux commit v4.20-rc1~51^2~4.
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_MPEG2_SLICE): Likewise.
(V4L2_PIX_FMT_SUNXI_TILED_NV12): New constant, introduced by Linux
commit v4.20-rc1~51^2~3.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
0954bf0ec8 xlat: add ABS_RESERVED to evdev_abs
* xlat/evdev_abs.in (ABS_RESERVED): New constant, introduced by Linux
commit v4.20-rc1~133^2~2^2.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
3adbab7c2b xlat: add REL_RESERVED and REL_WHEEL_HI_RES to evdev_relative_axes
* xlat/evdev_relative_axes.in (REL_RESERVED): New constant, introduced
by Linux commit v4.20-rc1~133^2~2^2.
(REL_WHEEL_HI_RES): New constant, introduced by Linux commit
v4.20-rc1~133^2~2^2~6 and updated by Linux commit v4.20-rc1~133^2~2^2.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
a55f5485c6 xlat: update kvm_cap
* xlat/kvm_cap.in (KVM_CAP_NESTED_STATE): New constant, introduced
by Linux commit v4.19-rc1~87^2~62.
(KVM_CAP_ARM_INJECT_SERROR_ESR): New constant, introduced by Linux
commit v4.19-rc1~55^2~12^2~14, merged with its final value
in v4.19-rc1~55^2~12.
(KVM_CAP_MSR_PLATFORM_INFO): New constant, introduced by Linux commit
v4.19-rc5~8^2~2.
(KVM_CAP_PPC_NESTED_HV): New constant, introduced by Linux commit
v4.20-rc1~113^2~107^2~1.
(KVM_CAP_HYPERV_SEND_IPI): New constant, introduced by Linux commit
v4.20-rc1~113^2~72.
KVM_CAP_COALESCED_PIO): New constant, introduced by Linux commit
v4.20-rc1~113^2~31.
(KVM_CAP_HYPERV_ENLIGHTENED_VMCS): New constant, introduced by Linux
commit v4.20-rc1~113^2~25.
(KVM_CAP_EXCEPTION_PAYLOAD): New constant, introduced by Linux commit
v4.20-rc1~113^2~8.
(KVM_CAP_ARM_VM_IPA_SIZE): New constant, introduced by Linux commit
v4.20-rc1~113^2~5^2~8 and updated by Linux commit
v4.20-rc1~113^2~5.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
95e1e717ac xlat: add IFA_TARGET_NETNSID to rtnl_addr_attrs
* xlat/rtnl_addr_attrs.in (IFA_TARGET_NETNSID): New constant, introduced
by Linux commit v4.20-rc1~14^2~428^2~7.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
e3d913d5fb xlat: update neighbor_cache_entry_flags
* xlat/neighbor_cache_entry_flags.in (NTF_OFFLOADED): New constant,
introduced by Linux commit v4.13-rc1~157^2~252^2~13.
(NTF_STICKY): New constant, introduced by Linux commit
v4.20-rc1~14^2~392.
(NTF_USE, NTF_SELF, NTF_MASTER, NTF_PROXY, NTF_EXT_LEARNED, NTF_ROUTER):
Add fallback definitions.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
e850f7f95c xlat: add flow dissector bpf program type constants
* xlat/bpf_attach_type.in (BPF_FLOW_DISSECTOR): New constant
introduced by Linux commit v4.20-rc1~14^2~259^2~9^2~4.
* xlat/bpf_prog_types.in (BPF_PROG_TYPE_FLOW_DISSECTOR): Likewise.
* NEWS: Mention this.
* tests/bpf.c (BPF_PROG_LOAD_checks, BPF_PROG_QUERY_checks): Update.
* tests/kernel_version.c (print_bpf_attr): Update.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
2a750e9a9f rtnl_tc: add TCA_STATS_BASIC_HW
* xlat/rtnl_tca_stats_attrs.in (TCA_STATS_BASIC_HW): New constant,
introduced by Linux commit v4.20-rc1~14^2~274^2~1.
* rtnl_tc.c (tca_stats_nla_decoders): Add TCA_STATS_BASIC_HW.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
6b662a84b4 xlat: add NETLINK_DUMP_STRICT_CHK to sock_netlink_options
* xlat/sock_netlink_options.in (NETLINK_DUMP_STRICT_CHK): New constant,
introduced by Linux commit v4.20-rc1~14^2~130^2~17.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
665dd0ece8 xlat: add IFLA_BR_VLAN_STATS_PER_PORT to rtnl_ifla_info_data_bridge_attrs
* xlat/rtnl_ifla_info_data_bridge_attrs.in
(IFLA_BR_VLAN_STATS_PER_PORT): New constant, introduced by Linux commit
v4.20-rc1~14^2~90.
* rtnl_link.c (ifla_info_data_bridge_nla_decoders): Add
IFLA_BR_VLAN_STATS_PER_PORT.
* NEWS: Mention this.
* tests/nlattr_ifla_linkinfo.c (main): Check it.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
cd933c16c9 xlat: add TCP_CLOSE to netlink_states
* xlat/netlink_states.in: Decode state 7 as TCP_CLOSE, since that's what
net core sets socket's initial state to.
2018-12-26 01:59:38 +00:00
6c9cfeaaa4 xlat: add fallback definitions to setsock_ipv6_options
* xlat/setsock_ipv6_options.in: Add fallback definitions.
2018-12-26 01:59:38 +00:00
88863bf3ed xlat: add SOL_CAN_* to socketlayers
* xlat/socketlayers.in (SOL_CAN_BASE): New constant, introduced by Linux
commit v2.6.25-rc1~1162^2~1414.
(SOL_CAN_RAW): New constant, introduced by Linux commit
v2.6.25-rc1~1162^2~1413.
* NEWS: Mention this.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
5be335ceaa xlat: add FAN_ENABLE_AUDIT and FAN_REPORT_TID to fan_init_flags
* xlat/fan_init_flags.in (FAN_ENABLE_AUDIT): New constant, introduced
by Linux commit v4.15-rc1~130^2^2~11.
(FAN_REPORT_TID): New constant, introduced by Linux commit
v4.20-rc1~75^2~2.
* NEWS: Mention this.
* tests/fanotify_init.c (main): Update expected output.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-26 01:59:38 +00:00
7e15b04b20 xlat: update siginfo_codes
* xlat/siginfo_codes.in (SI_LWP): Remove, as it is not present on Linux.
(SI_NOINFO): Define only on SPARC, provide fallback value.
2018-12-26 01:59:38 +00:00
40771886ec loop: use XLAT_MACROS_ONLY instead of #stop
As the former allows controlling presence of xlat definitions
during the inclusion and not header generation.

* xlat/loop_cmds.in: Remove #stop.
* loop.c: Wrap "xlat/loop_cmds.h" inclusion in XLAT_MACROS_ONLY.
* tests/ioctl_loop.c: Likewise.
2018-12-26 01:59:38 +00:00
09d91633d1 syslog: move constant definitions to xlat
* syslog.c (enum): Remove.
* xlat/syslog_action_type.in: Add fallback definitions.
2018-12-26 01:59:38 +00:00
92e347b556 Add copyright headers to some files that lack them
We do our best to keep copyright headers up to date, yet
git history provides better information on this subject
and is more accurate than copyright headers.
2018-12-24 23:46:43 +00:00
73fa3d6822 Update copyright headers 2018-12-24 23:46:43 +00:00
1207 changed files with 7792 additions and 4127 deletions

6
.gitignore vendored
View File

@ -12,6 +12,8 @@
/.version
/CREDITS
/ChangeLog
/INSTALL
/README
/aclocal.m4
/autom4te.cache
/bpf_attr_check.c
@ -25,7 +27,6 @@
/configure
/depcomp
/gnu
/INSTALL
/install-sh
/ioctl_iocdef.[ih]
/ioctl_redefs[12].h
@ -54,15 +55,14 @@
/native_printer_decls.h
/native_printer_defs.h
/printers.h
/README
/scno.h
/sen.h
/stamp-h1
/strace
/strace-*.tar.gz
/strace-*.tar.xz
/strace.1
/strace-log-merge.1
/strace.1
/strace.dsc
/strace.spec
/sys_func.h

View File

@ -127,8 +127,8 @@ strace_SOURCES = \
fetch_struct_xfs_quotastat.c \
file_handle.c \
file_ioctl.c \
filter_qualify.c \
filter.h \
filter_qualify.c \
flock.c \
flock.h \
fs_x_ioctl.c \
@ -168,6 +168,7 @@ strace_SOURCES = \
linux/asm_stat.h \
linux/x32/asm_stat.h \
linux/x86_64/asm_stat.h \
list.h \
listen.c \
lookup_dcookie.c \
loop.c \
@ -193,10 +194,9 @@ strace_SOURCES = \
netlink.c \
netlink.h \
netlink_crypto.c \
netlink_inet_diag.c \
netlink_kobject_uevent.c \
netlink_kobject_uevent.h \
netlink_sock_diag.h \
netlink_inet_diag.c \
netlink_netfilter.c \
netlink_netlink_diag.c \
netlink_packet_diag.c \
@ -205,6 +205,7 @@ strace_SOURCES = \
netlink_selinux.c \
netlink_smc_diag.c \
netlink_sock_diag.c \
netlink_sock_diag.h \
netlink_unix_diag.c \
nlattr.c \
nlattr.h \
@ -227,8 +228,8 @@ strace_SOURCES = \
prctl.c \
print_aio_sigset.c \
print_dev_t.c \
print_group_req.c \
print_fields.h \
print_group_req.c \
print_ifindex.c \
print_instruction_pointer.c \
print_kernel_version.c \
@ -307,8 +308,8 @@ strace_SOURCES = \
statx.c \
statx.h \
strace.c \
string_to_uint.h \
string_to_uint.c \
string_to_uint.h \
swapon.c \
syscall.c \
sysctl.c \

17
NEWS
View File

@ -1,6 +1,20 @@
Noteworthy changes in release ?.?? (????-??-??)
===============================================
* Improvements
* Enhanced xlat styles support configured by -X option.
* Updated lists of BPF_*, BTRFS_*, FAN_*, IFLA_*, KERN_*, KVM_CAP_*, NDA_*,
NETNSA_*, NT_*, PR_*, REL_*, SECCOMP_*, SCTP_*, UDP_*, V4L2_*, and *_MAGIC
constants.
* Bug fixes
* Fixed strace-k test on alpha.
* Fixed build on mips o32.
* Fixed build on NOMMU architectures.
Noteworthy changes in release 4.26 (2018-12-26)
===============================================
* License
* The test suite is now provided under the terms of
the GNU General Public License version 2 or later.
@ -23,6 +37,9 @@ Noteworthy changes in release ?.?? (????-??-??)
* Enhanced decoding of getsockopt SO_ERROR option.
* Enhanced error diagnostics when the first exec fails.
* Added %net as a short form of %network in syscall specifications.
* Updated lists of ABS_*, BPF_*, FAN_*, IFA_*, IFLA_*, KVM_CAP_*, NETLINK_*,
NTF_*, PR_SPEC_*, REL_*, SOL_*, TCA_*, and V4L2_* constants.
* Updated lists of ioctl commands from Linux 4.20.
* Enhanced manual page.
* Bug fixes

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#include <fcntl.h>

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2002-2004 Roland McGrath <roland@redhat.com>
* Copyright (c) 2009-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2009-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,8 +1,15 @@
/*
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
/* Architecture-specific definitions. */
#ifndef STRACE_ARCH_DEFS_H
#define STRACE_ARCH_DEFS_H
# define STRACE_ARCH_DEFS_H
#include "arch_defs_.h"
#include "linux/arch_defs_.h"
# include "arch_defs_.h"
# include "linux/arch_defs_.h"
#endif /* !STRACE_ARCH_DEFS_H */

2
bind.c
View File

@ -3,7 +3,7 @@
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-2000 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 1999-2017 The strace developers.
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

2
bjm.c
View File

@ -3,7 +3,7 @@
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 1999-2017 The strace developers.
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -47,7 +47,7 @@ typedef struct blk_user_trace_setup {
/* Provide fall-back definitions for BLK* ioctls */
#define XLAT_MACROS_ONLY
# include "xlat/block_ioctl_cmds.h"
#include "xlat/block_ioctl_cmds.h"
#undef XLAT_MACROS_ONLY
#include MPERS_DEFS

View File

@ -1,4 +1,9 @@
#!/bin/sh -eu
#
# Copyright (c) 2014-2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
./m4/gen_bpf_attr_m4.sh
./generate_mpers_am.sh

View File

@ -6,7 +6,7 @@
*/
#ifndef STRACE_BPF_ATTR_H
#define STRACE_BPF_ATTR_H
# define STRACE_BPF_ATTR_H
/*
* The policy is that all fields of type uint64_t in this header file
@ -19,21 +19,21 @@
* v4.16-rc1~123^2~109^2~5^2~4.
*/
#ifndef BPF_OBJ_NAME_LEN
# define BPF_OBJ_NAME_LEN 16U
#else
# if BPF_OBJ_NAME_LEN != 16U
# error "Unexpected value of BPF_OBJ_NAME_LEN"
# ifndef BPF_OBJ_NAME_LEN
# define BPF_OBJ_NAME_LEN 16U
# else
# if BPF_OBJ_NAME_LEN != 16U
# error "Unexpected value of BPF_OBJ_NAME_LEN"
# endif
# endif
#endif
#ifndef BPF_TAG_SIZE
# define BPF_TAG_SIZE 8
#else
# if BPF_TAG_SIZE != 8
# error "Unexpected value of BPF_TAG_SIZE"
# ifndef BPF_TAG_SIZE
# define BPF_TAG_SIZE 8
# else
# if BPF_TAG_SIZE != 8
# error "Unexpected value of BPF_TAG_SIZE"
# endif
# endif
#endif
struct BPF_MAP_CREATE_struct {
uint32_t map_type;
@ -47,9 +47,9 @@ struct BPF_MAP_CREATE_struct {
uint32_t map_ifindex;
};
#define BPF_MAP_CREATE_struct_size \
# define BPF_MAP_CREATE_struct_size \
sizeof(struct BPF_MAP_CREATE_struct)
#define expected_BPF_MAP_CREATE_struct_size 48
# define expected_BPF_MAP_CREATE_struct_size 48
struct BPF_MAP_LOOKUP_ELEM_struct {
uint32_t map_fd;
@ -57,9 +57,9 @@ struct BPF_MAP_LOOKUP_ELEM_struct {
uint64_t ATTRIBUTE_ALIGNED(8) value;
};
#define BPF_MAP_LOOKUP_ELEM_struct_size \
# define BPF_MAP_LOOKUP_ELEM_struct_size \
sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
# define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
struct BPF_MAP_UPDATE_ELEM_struct {
uint32_t map_fd;
@ -68,18 +68,18 @@ struct BPF_MAP_UPDATE_ELEM_struct {
uint64_t ATTRIBUTE_ALIGNED(8) flags;
};
#define BPF_MAP_UPDATE_ELEM_struct_size \
# define BPF_MAP_UPDATE_ELEM_struct_size \
sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
#define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
# define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
struct BPF_MAP_DELETE_ELEM_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
};
#define BPF_MAP_DELETE_ELEM_struct_size \
# define BPF_MAP_DELETE_ELEM_struct_size \
sizeof(struct BPF_MAP_DELETE_ELEM_struct)
#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
# define expected_BPF_MAP_DELETE_ELEM_struct_size 16
struct BPF_MAP_GET_NEXT_KEY_struct {
uint32_t map_fd;
@ -87,9 +87,9 @@ struct BPF_MAP_GET_NEXT_KEY_struct {
uint64_t ATTRIBUTE_ALIGNED(8) next_key;
};
#define BPF_MAP_GET_NEXT_KEY_struct_size \
# define BPF_MAP_GET_NEXT_KEY_struct_size \
sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
#define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
struct BPF_PROG_LOAD_struct {
uint32_t prog_type;
@ -106,9 +106,9 @@ struct BPF_PROG_LOAD_struct {
uint32_t expected_attach_type;
};
#define BPF_PROG_LOAD_struct_size \
# define BPF_PROG_LOAD_struct_size \
offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
#define expected_BPF_PROG_LOAD_struct_size 72
# define expected_BPF_PROG_LOAD_struct_size 72
struct BPF_OBJ_PIN_struct {
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
@ -116,12 +116,12 @@ struct BPF_OBJ_PIN_struct {
uint32_t file_flags;
};
#define BPF_OBJ_PIN_struct_size \
# define BPF_OBJ_PIN_struct_size \
sizeof(struct BPF_OBJ_PIN_struct)
#define expected_BPF_OBJ_PIN_struct_size 16
# define expected_BPF_OBJ_PIN_struct_size 16
#define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
#define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
# define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
# define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
struct BPF_PROG_ATTACH_struct {
uint32_t target_fd;
@ -130,9 +130,9 @@ struct BPF_PROG_ATTACH_struct {
uint32_t attach_flags;
};
#define BPF_PROG_ATTACH_struct_size \
# define BPF_PROG_ATTACH_struct_size \
sizeof(struct BPF_PROG_ATTACH_struct)
#define expected_BPF_PROG_ATTACH_struct_size 16
# define expected_BPF_PROG_ATTACH_struct_size 16
struct BPF_PROG_DETACH_struct {
uint32_t target_fd;
@ -140,9 +140,9 @@ struct BPF_PROG_DETACH_struct {
uint32_t attach_type;
};
#define BPF_PROG_DETACH_struct_size \
# define BPF_PROG_DETACH_struct_size \
sizeof(struct BPF_PROG_DETACH_struct)
#define expected_BPF_PROG_DETACH_struct_size 12
# define expected_BPF_PROG_DETACH_struct_size 12
struct BPF_PROG_TEST_RUN_struct /* test */ {
uint32_t prog_fd;
@ -155,9 +155,9 @@ struct BPF_PROG_TEST_RUN_struct /* test */ {
uint32_t duration;
};
#define BPF_PROG_TEST_RUN_struct_size \
# define BPF_PROG_TEST_RUN_struct_size \
sizeof(struct BPF_PROG_TEST_RUN_struct)
#define expected_BPF_PROG_TEST_RUN_struct_size 40
# define expected_BPF_PROG_TEST_RUN_struct_size 40
struct BPF_PROG_GET_NEXT_ID_struct {
uint32_t start_id;
@ -165,12 +165,12 @@ struct BPF_PROG_GET_NEXT_ID_struct {
uint32_t open_flags;
};
#define BPF_PROG_GET_NEXT_ID_struct_size \
# define BPF_PROG_GET_NEXT_ID_struct_size \
sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
#define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
# define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
#define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
#define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
# define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
# define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
struct BPF_PROG_GET_FD_BY_ID_struct {
uint32_t prog_id;
@ -178,9 +178,9 @@ struct BPF_PROG_GET_FD_BY_ID_struct {
uint32_t open_flags;
};
#define BPF_PROG_GET_FD_BY_ID_struct_size \
# define BPF_PROG_GET_FD_BY_ID_struct_size \
sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
#define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
# define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
struct BPF_MAP_GET_FD_BY_ID_struct {
uint32_t map_id;
@ -188,9 +188,9 @@ struct BPF_MAP_GET_FD_BY_ID_struct {
uint32_t open_flags;
};
#define BPF_MAP_GET_FD_BY_ID_struct_size \
# define BPF_MAP_GET_FD_BY_ID_struct_size \
sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
#define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
# define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
uint32_t bpf_fd;
@ -198,9 +198,9 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
uint64_t ATTRIBUTE_ALIGNED(8) info;
};
#define BPF_OBJ_GET_INFO_BY_FD_struct_size \
# define BPF_OBJ_GET_INFO_BY_FD_struct_size \
sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
#define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
# define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
struct BPF_PROG_QUERY_struct /* query */ {
uint32_t target_fd;
@ -211,18 +211,18 @@ struct BPF_PROG_QUERY_struct /* query */ {
uint32_t prog_cnt;
};
#define BPF_PROG_QUERY_struct_size \
# define BPF_PROG_QUERY_struct_size \
offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
#define expected_BPF_PROG_QUERY_struct_size 28
# define expected_BPF_PROG_QUERY_struct_size 28
struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
uint64_t ATTRIBUTE_ALIGNED(8) name;
uint32_t prog_fd;
};
#define BPF_RAW_TRACEPOINT_OPEN_struct_size \
# define BPF_RAW_TRACEPOINT_OPEN_struct_size \
offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
# define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
struct bpf_map_info_struct {
uint32_t type;
@ -241,9 +241,9 @@ struct bpf_map_info_struct {
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
};
#define bpf_map_info_struct_size \
# define bpf_map_info_struct_size \
sizeof(struct bpf_map_info_struct)
#define expected_bpf_map_info_struct_size 64
# define expected_bpf_map_info_struct_size 64
struct bpf_prog_info_struct {
uint32_t type;
@ -267,8 +267,8 @@ struct bpf_prog_info_struct {
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
};
#define bpf_prog_info_struct_size \
# define bpf_prog_info_struct_size \
sizeof(struct bpf_prog_info_struct)
#define expected_bpf_prog_info_struct_size 104
# define expected_bpf_prog_info_struct_size 104
#endif /* !STRACE_BPF_ATTR_H */

View File

@ -1,14 +1,14 @@
/*
* Classic BPF filter block.
*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_BPF_FILTER_H
#define STRACE_BPF_FILTER_H
# define STRACE_BPF_FILTER_H
struct bpf_filter_block {
uint16_t code;

View File

@ -1,5 +1,12 @@
/*
* Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_BPF_FPROG_H
#define STRACE_BPF_FPROG_H
# define STRACE_BPF_FPROG_H
struct bpf_fprog {
unsigned short len;

View File

@ -1,7 +1,7 @@
/*
* Decoder of seccomp filter programs.
*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

134
btrfs.c
View File

@ -10,10 +10,10 @@
#ifdef HAVE_LINUX_BTRFS_H
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
# include <linux/btrfs.h>
@ -32,8 +32,8 @@ typedef struct btrfs_ioctl_vol_args_v2
#ifdef HAVE_LINUX_BTRFS_H
#include "print_fields.h"
#include <linux/fs.h>
# include "print_fields.h"
# include <linux/fs.h>
/*
* Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
@ -41,15 +41,15 @@ typedef struct btrfs_ioctl_vol_args_v2
*/
typedef __u64 u64;
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
struct btrfs_ioctl_feature_flags {
uint64_t compat_flags;
uint64_t compat_ro_flags;
uint64_t incompat_flags;
};
#endif
# endif
#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
struct btrfs_ioctl_defrag_range_args {
uint64_t start;
uint64_t len;
@ -58,37 +58,37 @@ struct btrfs_ioctl_defrag_range_args {
uint32_t compress_type;
uint32_t unused[4];
};
#endif
# endif
#ifndef BTRFS_LABEL_SIZE
# define BTRFS_LABEL_SIZE 256
#endif
# ifndef BTRFS_LABEL_SIZE
# define BTRFS_LABEL_SIZE 256
# endif
#ifndef BTRFS_IOC_QUOTA_RESCAN
# ifndef BTRFS_IOC_QUOTA_RESCAN
struct btrfs_ioctl_quota_rescan_args {
uint64_t flags, progress, reserved[6];
};
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
struct btrfs_ioctl_quota_rescan_args)
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
struct btrfs_ioctl_quota_rescan_args)
#endif
# endif
#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
#endif
# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
# endif
#ifndef BTRFS_IOC_GET_FEATURES
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
# ifndef BTRFS_IOC_GET_FEATURES
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
struct btrfs_ioctl_feature_flags)
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
struct btrfs_ioctl_feature_flags[2])
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
struct btrfs_ioctl_feature_flags[3])
#endif
# endif
#ifndef BTRFS_IOC_TREE_SEARCH_V2
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
# ifndef BTRFS_IOC_TREE_SEARCH_V2
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
struct btrfs_ioctl_search_args_v2)
struct btrfs_ioctl_search_args_v2 {
struct btrfs_ioctl_search_key key; /* in/out - search parameters */
@ -97,34 +97,34 @@ struct btrfs_ioctl_search_args_v2 {
* to store item */
uint64_t buf[0]; /* out - found items */
};
#endif
# endif
#include "xlat/btrfs_balance_args.h"
#include "xlat/btrfs_balance_ctl_cmds.h"
#include "xlat/btrfs_balance_flags.h"
#include "xlat/btrfs_balance_state.h"
#include "xlat/btrfs_compress_types.h"
#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
#include "xlat/btrfs_defrag_flags.h"
#include "xlat/btrfs_dev_replace_cmds.h"
#include "xlat/btrfs_dev_replace_results.h"
#include "xlat/btrfs_dev_replace_state.h"
#include "xlat/btrfs_dev_stats_flags.h"
#include "xlat/btrfs_dev_stats_values.h"
#include "xlat/btrfs_features_compat.h"
#include "xlat/btrfs_features_compat_ro.h"
#include "xlat/btrfs_features_incompat.h"
#include "xlat/btrfs_key_types.h"
#include "xlat/btrfs_logical_ino_args_flags.h"
#include "xlat/btrfs_qgroup_ctl_cmds.h"
#include "xlat/btrfs_qgroup_inherit_flags.h"
#include "xlat/btrfs_qgroup_limit_flags.h"
#include "xlat/btrfs_qgroup_status_flags.h"
#include "xlat/btrfs_scrub_flags.h"
#include "xlat/btrfs_send_flags.h"
#include "xlat/btrfs_snap_flags_v2.h"
#include "xlat/btrfs_space_info_flags.h"
#include "xlat/btrfs_tree_objectids.h"
# include "xlat/btrfs_balance_args.h"
# include "xlat/btrfs_balance_ctl_cmds.h"
# include "xlat/btrfs_balance_flags.h"
# include "xlat/btrfs_balance_state.h"
# include "xlat/btrfs_compress_types.h"
# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
# include "xlat/btrfs_defrag_flags.h"
# include "xlat/btrfs_dev_replace_cmds.h"
# include "xlat/btrfs_dev_replace_results.h"
# include "xlat/btrfs_dev_replace_state.h"
# include "xlat/btrfs_dev_stats_flags.h"
# include "xlat/btrfs_dev_stats_values.h"
# include "xlat/btrfs_features_compat.h"
# include "xlat/btrfs_features_compat_ro.h"
# include "xlat/btrfs_features_incompat.h"
# include "xlat/btrfs_key_types.h"
# include "xlat/btrfs_logical_ino_args_flags.h"
# include "xlat/btrfs_qgroup_ctl_cmds.h"
# include "xlat/btrfs_qgroup_inherit_flags.h"
# include "xlat/btrfs_qgroup_limit_flags.h"
# include "xlat/btrfs_qgroup_status_flags.h"
# include "xlat/btrfs_scrub_flags.h"
# include "xlat/btrfs_send_flags.h"
# include "xlat/btrfs_snap_flags_v2.h"
# include "xlat/btrfs_space_info_flags.h"
# include "xlat/btrfs_tree_objectids.h"
static inline char
prnibble(char v)
@ -135,7 +135,7 @@ prnibble(char v)
}
/* 8-4-4-4-12 = 36 characters */
#define UUID_STRING_SIZE 36
# define UUID_STRING_SIZE 36
/* Formats uuid, returns 0 if it's all zeroes */
static int
@ -222,9 +222,9 @@ btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
tprints("}");
}
#define btrfs_print_key_type(prefix_, where_, field_) \
# define btrfs_print_key_type(prefix_, where_, field_) \
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
#define btrfs_print_objectid(prefix_, where_, field_) \
# define btrfs_print_objectid(prefix_, where_, field_) \
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
NULL)
@ -718,9 +718,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
struct btrfs_ioctl_fs_info_args args;
char uuid[UUID_STRING_SIZE+1];
uint32_t nodesize, sectorsize, clone_alignment;
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
uint32_t *reserved32;
#endif
# endif
if (entering(tcp))
return 0;
@ -729,16 +729,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
# ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
nodesize = args.nodesize,
sectorsize = args.sectorsize,
clone_alignment = args.clone_alignment;
#else
# else
reserved32 = (void *) args.reserved;
nodesize = reserved32[0];
sectorsize = reserved32[1];
clone_alignment = reserved32[2];
#endif
# endif
btrfs_unparse_uuid(args.fsid, uuid);
PRINT_FIELD_U("{", args, max_id);
@ -892,11 +892,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
tprintf(", flags=");
printflags64(btrfs_logical_ino_args_flags,
#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
# ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
args.flags
#else
# else
args.reserved[3]
#endif
# endif
, "BTRFS_LOGICAL_INO_ARGS_???");
PRINT_FIELD_ADDR64(", ", args, inodes);
tprints("}");
@ -1262,9 +1262,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
case BTRFS_IOC_CLONE: /* FICLONE */
case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */
#ifdef BTRFS_IOC_FILE_EXTENT_SAME
# ifdef BTRFS_IOC_FILE_EXTENT_SAME
case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */
#endif
# endif
/*
* FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
* btrfs ioctls and the code was kept for the generic

View File

@ -4,7 +4,7 @@
* Copyright (c) 2010 Carmelo Amoroso <carmelo.amoroso@st.com>
* Copyright (c) 2015 Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2017 The strace developers.
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
@ -20,15 +20,15 @@
# include "xlat/cacheflush_scope.h"
static const struct xlat cacheflush_flags[] = {
#ifdef FLUSH_CACHE_BOTH
# ifdef FLUSH_CACHE_BOTH
XLAT(FLUSH_CACHE_BOTH),
#endif
#ifdef FLUSH_CACHE_DATA
# endif
# ifdef FLUSH_CACHE_DATA
XLAT(FLUSH_CACHE_DATA),
#endif
#ifdef FLUSH_CACHE_INSN
# endif
# ifdef FLUSH_CACHE_INSN
XLAT(FLUSH_CACHE_INSN),
#endif
# endif
XLAT_END
};
@ -72,18 +72,18 @@ SYS_FUNC(cacheflush)
#ifdef SH
static const struct xlat cacheflush_flags[] = {
#ifdef CACHEFLUSH_D_INVAL
# ifdef CACHEFLUSH_D_INVAL
XLAT(CACHEFLUSH_D_INVAL),
#endif
#ifdef CACHEFLUSH_D_WB
# endif
# ifdef CACHEFLUSH_D_WB
XLAT(CACHEFLUSH_D_WB),
#endif
#ifdef CACHEFLUSH_D_PURGE
# endif
# ifdef CACHEFLUSH_D_PURGE
XLAT(CACHEFLUSH_D_PURGE),
#endif
#ifdef CACHEFLUSH_I
# endif
# ifdef CACHEFLUSH_I
XLAT(CACHEFLUSH_I),
#endif
# endif
XLAT_END
};

View File

@ -2,7 +2,7 @@
* Copyright (c) 2000 Wichert Akkerman <wakkerma@debian.org>
* Copyright (c) 2011 Denys Vlasenko <dvlasenk@redhat.com>
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2017 The strace developers.
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
CAP_CHOWN,
CAP_DAC_OVERRIDE,
CAP_DAC_READ_SEARCH,

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
CAP_MAC_OVERRIDE,
CAP_MAC_ADMIN,
CAP_SYSLOG,

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(chdir)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
static void

View File

@ -1,4 +1,9 @@
#!/bin/sh -ex
#
# Copyright (c) 2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libbluetooth-dev make xz-utils'

View File

@ -1,4 +1,9 @@
#!/bin/sh -ex
#
# Copyright (c) 2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
DISTCHECK_CONFIGURE_FLAGS='--disable-dependency-tracking'
export DISTCHECK_CONFIGURE_FLAGS

View File

@ -283,12 +283,6 @@ AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,,
[#include <sys/types.h>
#include <asm/stat.h>])
AC_CHECK_TYPES([struct termios2],,,
[#include <linux/termios.h>])
AC_CHECK_MEMBERS([struct termios.c_ispeed, struct termios.c_ospeed],,,
[#include <linux/termios.h>])
AC_CHECK_TYPES([struct user_desc],
[AC_CHECK_MEMBERS([struct user_desc.lm],,,
[#include <asm/ldt.h>])],,
@ -651,6 +645,8 @@ AC_CHECK_DECLS(m4_normalize([
KERN_MAX_LOCK_DEPTH,
KERN_NMI_WATCHDOG,
KERN_PANIC_ON_NMI,
KERN_PANIC_ON_WARN,
KERN_PANIC_PRINT,
NET_LLC,
NET_NETFILTER,
NET_DCCP,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,4 +1,9 @@
#! /bin/sh
#!/bin/sh
#
# Copyright (c) 2017-2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
: ${YEAR_FILE:=$1}
: ${DEFAULT_YEAR:=$2}

6
debian/changelog.in vendored
View File

@ -4,6 +4,12 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
strace (4.26-1) unstable; urgency=medium
* New upstream version.
-- Dmitry V. Levin <ldv@altlinux.org> Wed, 26 Dec 2018 18:25:10 +0000
strace (4.25-1) unstable; urgency=medium
* New upstream version.

594
defs.h

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
*/
#ifndef STRACE_DELAY_H
#define STRACE_DELAY_H
# define STRACE_DELAY_H
uint16_t alloc_delay_data(void);
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);

View File

@ -4,7 +4,7 @@
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2017 The strace developers.
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -4,7 +4,7 @@
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

2
dm.c
View File

@ -98,7 +98,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
}
}
#include "xlat/dm_flags.h"
# include "xlat/dm_flags.h"
static void
dm_decode_flags(const struct dm_ioctl *ioc)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The strace developers.
* Copyright (c) 2017-2018 The strace developers.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/

View File

@ -4,18 +4,18 @@
* package. Variable 'program_invocation_name' and function 'die()'
* have to be defined globally.
*
* Copyright (c) 2001-2017 The strace developers.
* Copyright (c) 2001-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_ERROR_PRINTS_H
#define STRACE_ERROR_PRINTS_H
# define STRACE_ERROR_PRINTS_H
#include <stdbool.h>
# include <stdbool.h>
#include "gcc_compat.h"
# include "gcc_compat.h"
extern bool debug_flag;
@ -31,29 +31,29 @@ void error_msg_and_die(const char *fmt, ...)
ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
/* Wrappers for if (debug_flag) error_msg(...) */
#define debug_msg(...) \
# define debug_msg(...) \
do { \
if (debug_flag) \
error_msg(__VA_ARGS__); \
} while (0)
#define debug_perror_msg(...) \
# define debug_perror_msg(...) \
do { \
if (debug_flag) \
perror_msg(__VA_ARGS__); \
} while (0)
/* Simple wrappers for providing function name in error messages */
#define error_func_msg(fmt_, ...) \
# define error_func_msg(fmt_, ...) \
error_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
#define perror_func_msg(fmt_, ...) \
# define perror_func_msg(fmt_, ...) \
perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
#define debug_func_msg(fmt_, ...) \
# define debug_func_msg(fmt_, ...) \
debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
#define debug_func_perror_msg(fmt_, ...) \
# define debug_func_perror_msg(fmt_, ...) \
debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
#define error_func_msg_and_die(fmt_, ...) \
# define error_func_msg_and_die(fmt_, ...) \
error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
#define perror_func_msg_and_die(fmt_, ...) \
# define perror_func_msg_and_die(fmt_, ...) \
perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
#endif /* !STRACE_ERROR_PRINTS_H */

View File

@ -186,7 +186,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
return RVAL_IOCTL_DECODED;
}
#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
# define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
(dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))

View File

@ -11,7 +11,7 @@
#ifdef HAVE_LINUX_INPUT_H
#include DEF_MPERS_TYPE(struct_ff_effect)
# include DEF_MPERS_TYPE(struct_ff_effect)
# include <linux/ioctl.h>
# include <linux/input.h>

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2007 Ulrich Drepper <drepper@redhat.com>
* Copyright (c) 2008-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2008-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -6,16 +6,16 @@
*/
#ifndef STRACE_F_OWNER_EX_H
#define STRACE_F_OWNER_EX_H
# define STRACE_F_OWNER_EX_H
#include <linux/fcntl.h>
# include <linux/fcntl.h>
#if defined HAVE_STRUCT_F_OWNER_EX
# if defined HAVE_STRUCT_F_OWNER_EX
typedef struct f_owner_ex struct_kernel_f_owner_ex;
#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
# elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
#else
# error struct f_owner_ex definition not found in <linux/fcntl.h>
#endif
# else
# error struct f_owner_ex definition not found in <linux/fcntl.h>
# endif
#endif /* !STRACE_F_OWNER_EX_H */

View File

@ -5,7 +5,7 @@
* Copyright (c) 2009 Andreas Schwab <schwab@redhat.com>
* Copyright (c) 2009 Kirill A. Shutemov <kirill@shutemov.name>
* Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2017 The strace developers.
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#ifdef HAVE_LINUX_FALLOC_H

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(fchownat)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2016-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#include DEF_MPERS_TYPE(struct_keyctl_kdf_params)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#include DEF_MPERS_TYPE(struct_xfs_dqstats)

View File

@ -1,4 +1,9 @@
#! /bin/sh
#!/bin/sh
#
# Copyright (c) 2017-2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
if [ "$1" = "-f" ]; then
shift

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -7,7 +7,7 @@
*/
#ifndef STRACE_FILTER_H
#define STRACE_FILTER_H
# define STRACE_FILTER_H
struct number_set;
typedef int (*string_to_uint_func)(const char *);

View File

@ -3,7 +3,7 @@
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 1999-2017 The strace developers.
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

26
flock.h
View File

@ -1,30 +1,30 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_FLOCK_H
#define STRACE_FLOCK_H
# define STRACE_FLOCK_H
#include <linux/fcntl.h>
# include <linux/fcntl.h>
#if defined HAVE_STRUCT_FLOCK
# if defined HAVE_STRUCT_FLOCK
typedef struct flock struct_kernel_flock;
#elif defined HAVE_STRUCT___KERNEL_FLOCK
# elif defined HAVE_STRUCT___KERNEL_FLOCK
typedef struct __kernel_flock struct_kernel_flock;
#else
# error struct flock definition not found in <linux/fcntl.h>
#endif
# else
# error struct flock definition not found in <linux/fcntl.h>
# endif
#if defined HAVE_STRUCT_FLOCK64
# if defined HAVE_STRUCT_FLOCK64
typedef struct flock64 struct_kernel_flock64;
#elif defined HAVE_STRUCT___KERNEL_FLOCK64
# elif defined HAVE_STRUCT___KERNEL_FLOCK64
typedef struct __kernel_flock64 struct_kernel_flock64;
#else
# error struct flock64 definition not found in <linux/fcntl.h>
#endif
# else
# error struct flock64 definition not found in <linux/fcntl.h>
# endif
#endif /* !STRACE_FLOCK_H */

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
* Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(fstatfs)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(fstatfs64)

View File

@ -7,114 +7,114 @@
*/
#ifndef STRACE_GCC_COMPAT_H
#define STRACE_GCC_COMPAT_H
# define STRACE_GCC_COMPAT_H
#if defined __GNUC__ && defined __GNUC_MINOR__
# define GNUC_PREREQ(maj, min) \
# if defined __GNUC__ && defined __GNUC_MINOR__
# define GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define GNUC_PREREQ(maj, min) 0
#endif
# else
# define GNUC_PREREQ(maj, min) 0
# endif
#if defined __clang__ && defined __clang_major__ && defined __clang_minor__
# define CLANG_PREREQ(maj, min) \
# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
# define CLANG_PREREQ(maj, min) \
((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
#else
# define CLANG_PREREQ(maj, min) 0
#endif
# else
# define CLANG_PREREQ(maj, min) 0
# endif
#if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
# define __attribute__(x) /* empty */
#endif
# if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
# define __attribute__(x) /* empty */
# endif
#if GNUC_PREREQ(2, 5)
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
#else
# define ATTRIBUTE_NORETURN /* empty */
#endif
# if GNUC_PREREQ(2, 5)
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
# else
# define ATTRIBUTE_NORETURN /* empty */
# endif
#if GNUC_PREREQ(2, 7)
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
# define ATTRIBUTE_PACKED __attribute__((__packed__))
#else
# define ATTRIBUTE_FORMAT(args) /* empty */
# define ATTRIBUTE_ALIGNED(arg) /* empty */
# define ATTRIBUTE_PACKED /* empty */
#endif
# if GNUC_PREREQ(2, 7)
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
# define ATTRIBUTE_PACKED __attribute__((__packed__))
# else
# define ATTRIBUTE_FORMAT(args) /* empty */
# define ATTRIBUTE_ALIGNED(arg) /* empty */
# define ATTRIBUTE_PACKED /* empty */
# endif
#if GNUC_PREREQ(3, 0)
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
# if GNUC_PREREQ(3, 0)
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
#else
# define SAME_TYPE(x, y) 0
# define MUST_BE_ARRAY(a) 0
#endif
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
# else
# define SAME_TYPE(x, y) 0
# define MUST_BE_ARRAY(a) 0
# endif
#if GNUC_PREREQ(3, 0)
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
#else
# define ATTRIBUTE_MALLOC /* empty */
#endif
# if GNUC_PREREQ(3, 0)
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
# else
# define ATTRIBUTE_MALLOC /* empty */
# endif
#if GNUC_PREREQ(3, 1)
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
#else
# define ATTRIBUTE_NOINLINE /* empty */
#endif
# if GNUC_PREREQ(3, 1)
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
# else
# define ATTRIBUTE_NOINLINE /* empty */
# endif
#if GNUC_PREREQ(4, 0)
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
#else
# define ATTRIBUTE_SENTINEL /* empty */
#endif
# if GNUC_PREREQ(4, 0)
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
# else
# define ATTRIBUTE_SENTINEL /* empty */
# endif
#if GNUC_PREREQ(4, 1)
# define ALIGNOF(t_) __alignof__(t_)
#else
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
#endif
# if GNUC_PREREQ(4, 1)
# define ALIGNOF(t_) __alignof__(t_)
# else
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
# endif
#if GNUC_PREREQ(4, 3)
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
#else
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
#endif
# if GNUC_PREREQ(4, 3)
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
# else
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
# endif
#if GNUC_PREREQ(7, 0)
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
#else
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
#endif
# if GNUC_PREREQ(7, 0)
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
# else
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
# endif
#if CLANG_PREREQ(2, 8)
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
# if CLANG_PREREQ(2, 8)
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
_Pragma("clang diagnostic push"); \
_Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
_Pragma("clang diagnostic pop");
#elif GNUC_PREREQ(4, 2)
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
# elif GNUC_PREREQ(4, 2)
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Woverride-init\"");
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
_Pragma("GCC diagnostic pop");
#else
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT /* empty */
# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
#endif
# else
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT /* empty */
# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
# endif
#if GNUC_PREREQ(6, 0)
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
# if GNUC_PREREQ(6, 0)
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
_Pragma("GCC diagnostic pop");
#else
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
#endif
# else
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
# endif
#endif /* !STRACE_GCC_COMPAT_H */

View File

@ -1,4 +1,9 @@
#!/bin/sh -e
#
# Copyright (c) 2015-2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am |
xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' |

View File

@ -1,4 +1,9 @@
#!/bin/sh -e
#
# Copyright (c) 2015-2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
echo 'enum {'
echo 'SEN_printargs = 0,'

View File

@ -6,9 +6,9 @@
*/
#ifndef STRACE_GET_PERSONALITY_H
#define STRACE_GET_PERSONALITY_H
# define STRACE_GET_PERSONALITY_H
#include "ptrace.h"
# include "ptrace.h"
extern int
get_personality_from_syscall_info(const struct ptrace_syscall_info *);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2012-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(getcpu)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(getcwd)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(getpagesize)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#include "xlat/getrandom_flags.h"

2
hdio.c
View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2009, 2010 Jeff Mahoney <jeffm@suse.com>
* Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2014-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
#ifdef HAVE_LINUX_UTSNAME_H

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2006-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017 Alexey Neyman <stilor@att.net>
* Copyright (c) 2017-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2001 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2004-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 1999-2017 The strace developers.
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(ioperm)

7
iopl.c
View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
SYS_FUNC(iopl)

2
ipc.c
View File

@ -21,7 +21,7 @@ SYS_FUNC(ipc)
printxval_u(ipccalls, call, NULL);
unsigned int i;
for (i = 1; i < tcp->s_ent->nargs; ++i)
for (i = 1; i < n_args(tcp); ++i)
tprintf(", %#" PRI_klx, tcp->u_arg[i]);
return RVAL_DECODED;

View File

@ -7,21 +7,21 @@
*/
#ifndef STRACE_IPC_DEFS_H
#define STRACE_IPC_DEFS_H
# define STRACE_IPC_DEFS_H
#ifdef HAVE_SYS_IPC_H
# include <sys/ipc.h>
#elif defined HAVE_LINUX_IPC_H
# include <linux/ipc.h>
# ifdef HAVE_SYS_IPC_H
# include <sys/ipc.h>
# elif defined HAVE_LINUX_IPC_H
# include <linux/ipc.h>
/* While glibc uses __key, the kernel uses key. */
# define __key key
#endif
# define __key key
# endif
#if !defined IPC_64
# define IPC_64 0x100
#endif
# if !defined IPC_64
# define IPC_64 0x100
# endif
#define PRINTCTL(flagset, arg, dflt) \
# define PRINTCTL(flagset, arg, dflt) \
do { \
if ((arg) & IPC_64) { \
print_xlat(IPC_64); \

View File

@ -5,7 +5,7 @@
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -5,7 +5,7 @@
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

2
kcmp.c
View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,17 +1,17 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2017 The strace developers.
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_KERNEL_TYPES_H
#define STRACE_KERNEL_TYPES_H
# define STRACE_KERNEL_TYPES_H
# if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
# include <asm/posix_types.h>
# include <asm/posix_types.h>
typedef __kernel_long_t kernel_long_t;
typedef __kernel_ulong_t kernel_ulong_t;
@ -35,15 +35,15 @@ typedef struct {
char d_name[1];
} kernel_dirent;
#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
# define PRI_kl "ll"
#else
# define PRI_kl "l"
#endif
# if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
# define PRI_kl "ll"
# else
# define PRI_kl "l"
# endif
#define PRI_kld PRI_kl"d"
#define PRI_klu PRI_kl"u"
#define PRI_klx PRI_kl"x"
# define PRI_kld PRI_kl"d"
# define PRI_klu PRI_kl"u"
# define PRI_klx PRI_kl"x"
/*
* The kernel used to define 64-bit types on 64-bit systems on a per-arch
@ -54,17 +54,17 @@ typedef struct {
* every printing of __u64 or __s64 to stdint types.
* The exception is Android, where for MIPS64 unsigned long long is used.
*/
#if SIZEOF_LONG == 4
# define PRI__64 "ll"
#elif defined ALPHA || defined IA64 || defined __powerpc64__ \
# if SIZEOF_LONG == 4
# define PRI__64 "ll"
# elif defined ALPHA || defined IA64 || defined __powerpc64__ \
|| (defined MIPS && !defined __ANDROID__)
# define PRI__64 "l"
#else
# define PRI__64 "ll"
#endif
# define PRI__64 "l"
# else
# define PRI__64 "ll"
# endif
#define PRI__d64 PRI__64"d"
#define PRI__u64 PRI__64"u"
#define PRI__x64 PRI__64"x"
# define PRI__d64 PRI__64"d"
# define PRI__u64 PRI__64"u"
# define PRI__x64 PRI__64"x"
#endif /* !STRACE_KERNEL_TYPES_H */

View File

@ -1,14 +1,21 @@
#ifndef STRACE_KEYCTL_KDF_PARAMS_H
#define STRACE_KEYCTL_KDF_PARAMS_H
/*
* Copyright (c) 2017-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <stdint.h>
#include "kernel_types.h"
#ifndef STRACE_KEYCTL_KDF_PARAMS_H
# define STRACE_KEYCTL_KDF_PARAMS_H
# include <stdint.h>
# include "kernel_types.h"
/* from include/linux/crypto.h */
#define CRYPTO_MAX_ALG_NAME 128
# define CRYPTO_MAX_ALG_NAME 128
/* from security/keys/internal.h */
#define KEYCTL_KDF_MAX_OI_LEN 64 /* max length of otherinfo */
# define KEYCTL_KDF_MAX_OI_LEN 64 /* max length of otherinfo */
struct keyctl_kdf_params {
char *hashname;

View File

@ -6,11 +6,11 @@
*/
#ifndef STRACE_KILL_SAVE_ERRNO_H
#define STRACE_KILL_SAVE_ERRNO_H
# define STRACE_KILL_SAVE_ERRNO_H
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
# include <sys/types.h>
# include <signal.h>
# include <errno.h>
static inline int
kill_save_errno(pid_t pid, int sig)

2
kvm.c
View File

@ -107,7 +107,7 @@ map_len(struct mmap_cache_entry_t *map_info)
: 0;
}
#define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
# define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
static struct vcpu_info*
vcpu_get_info(struct tcb *const tcp, int fd)

View File

@ -9,30 +9,30 @@
*/
#ifndef STRACE_LARGEFILE_WRAPPERS_H
#define STRACE_LARGEFILE_WRAPPERS_H
# define STRACE_LARGEFILE_WRAPPERS_H
#include "defs.h"
# include "defs.h"
#ifdef _LARGEFILE64_SOURCE
# ifdef HAVE_FOPEN64
# define fopen_stream fopen64
# ifdef _LARGEFILE64_SOURCE
# ifdef HAVE_FOPEN64
# define fopen_stream fopen64
# else
# define fopen_stream fopen
# endif
# define struct_stat struct stat64
# define stat_file stat64
# define struct_dirent struct dirent64
# define read_dir readdir64
# define struct_rlimit struct rlimit64
# define set_rlimit setrlimit64
# else
# define fopen_stream fopen
# define struct_stat struct stat
# define stat_file stat
# define struct_dirent struct dirent
# define read_dir readdir
# define struct_rlimit struct rlimit
# define set_rlimit setrlimit
# endif
# define struct_stat struct stat64
# define stat_file stat64
# define struct_dirent struct dirent64
# define read_dir readdir64
# define struct_rlimit struct rlimit64
# define set_rlimit setrlimit64
#else
# define fopen_stream fopen
# define struct_stat struct stat
# define stat_file stat
# define struct_dirent struct dirent
# define read_dir readdir
# define struct_rlimit struct rlimit
# define set_rlimit setrlimit
#endif
#endif /* STRACE_LARGEFILE_WRAPPERS_H */

2
link.c
View File

@ -5,7 +5,7 @@
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 2006 Ulrich Drepper <drepper@redhat.com>
* Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2006-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#if defined M68K
# include "32/ioctls_inc_align16.h"
#elif defined X86_64 || defined X32 \

View File

@ -34,6 +34,7 @@
{ "asm-generic/ioctls.h", "TIOCGETD", 0, 0x5424, 0 },
{ "asm-generic/ioctls.h", "TIOCGEXCL", _IOC_READ, 0x5440, 0x04 },
{ "asm-generic/ioctls.h", "TIOCGICOUNT", 0, 0x545D, 0 },
{ "asm-generic/ioctls.h", "TIOCGISO7816", _IOC_READ, 0x5442, 0x28 },
{ "asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0, 0x5456, 0 },
{ "asm-generic/ioctls.h", "TIOCGPGRP", 0, 0x540F, 0 },
{ "asm-generic/ioctls.h", "TIOCGPKT", _IOC_READ, 0x5438, 0x04 },
@ -66,6 +67,7 @@
{ "asm-generic/ioctls.h", "TIOCSERSWILD", 0, 0x5455, 0 },
{ "asm-generic/ioctls.h", "TIOCSETD", 0, 0x5423, 0 },
{ "asm-generic/ioctls.h", "TIOCSIG", _IOC_WRITE, 0x5436, 0x04 },
{ "asm-generic/ioctls.h", "TIOCSISO7816", _IOC_READ|_IOC_WRITE, 0x5443, 0x28 },
{ "asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0, 0x5457, 0 },
{ "asm-generic/ioctls.h", "TIOCSPGRP", 0, 0x5410, 0 },
{ "asm-generic/ioctls.h", "TIOCSPTLCK", _IOC_WRITE, 0x5431, 0x04 },
@ -497,6 +499,7 @@
{ "linux/android/binder.h", "BC_TRANSACTION", _IOC_WRITE, 0x6300, 0x40 },
{ "linux/android/binder.h", "BC_TRANSACTION_SG", _IOC_WRITE, 0x6311, 0x48 },
{ "linux/android/binder.h", "BINDER_GET_NODE_DEBUG_INFO", _IOC_READ|_IOC_WRITE, 0x620b, 0x18 },
{ "linux/android/binder.h", "BINDER_GET_NODE_INFO_FOR_REF", _IOC_READ|_IOC_WRITE, 0x620c, 0x18 },
{ "linux/android/binder.h", "BINDER_SET_CONTEXT_MGR", _IOC_WRITE, 0x6207, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_PRIORITY", _IOC_WRITE, 0x6206, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_TIMEOUT", _IOC_WRITE, 0x6203, 0x08 },
@ -604,6 +607,8 @@
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
{ "linux/blkzoned.h", "BLKGETNRZONES", _IOC_READ, 0x1285, 0x04 },
{ "linux/blkzoned.h", "BLKGETZONESZ", _IOC_READ, 0x1284, 0x04 },
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
@ -1331,6 +1336,7 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES_NEW", _IOC_READ|_IOC_WRITE, 0x4b14, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_QUEUE_WAVE_STATE", _IOC_READ|_IOC_WRITE, 0x4b1b, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_TILE_CONFIG", _IOC_READ|_IOC_WRITE, 0x4b12, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_MAP_MEMORY_TO_GPU", _IOC_READ|_IOC_WRITE, 0x4b18, 0x18 },
@ -1404,7 +1410,10 @@
{ "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 },
{ "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c },
{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 },
{ "linux/media.h", "MEDIA_IOC_REQUEST_ALLOC", _IOC_READ, 0x7c05, 0x04 },
{ "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x30 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_QUEUE", _IOC_NONE, 0x7c80, 0x00 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_REINIT", _IOC_NONE, 0x7c81, 0x00 },
{ "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 },
@ -2002,6 +2011,8 @@
{ "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 },
{ "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 },
{ "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 },
{ "linux/udmabuf.h", "UDMABUF_CREATE", _IOC_WRITE, 0x7542, 0x18 },
{ "linux/udmabuf.h", "UDMABUF_CREATE_LIST", _IOC_WRITE, 0x7543, 0x08 },
{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1a },
{ "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c },
{ "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x58 },
@ -2044,16 +2055,26 @@
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_TRIGGER", _IOC_NONE, 0x5b16, 0x00 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_WAIT_SRQ", _IOC_WRITE, 0x5b17, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_API_VERSION", _IOC_READ, 0x5b10, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_AUTO_ABORT", _IOC_WRITE, 0x5b19, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CANCEL_IO", _IOC_NONE, 0x5b23, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEANUP_IO", _IOC_NONE, 0x5b24, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", _IOC_NONE, 0x5b07, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", _IOC_NONE, 0x5b06, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CONFIG_TERMCHAR", _IOC_WRITE, 0x5b0c, 0x02 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CTRL_REQUEST", _IOC_READ|_IOC_WRITE, 0x5b08, 0x0c },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_EOM_ENABLE", _IOC_WRITE, 0x5b0b, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_GET_TIMEOUT", _IOC_READ, 0x5b09, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", _IOC_NONE, 0x5b01, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_MSG_IN_ATTR", _IOC_READ, 0x5b18, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_READ", _IOC_READ|_IOC_WRITE, 0x5b0e, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_SET_TIMEOUT", _IOC_WRITE, 0x5b0a, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE", _IOC_READ|_IOC_WRITE, 0x5b0d, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE_RESULT", _IOC_READ|_IOC_WRITE, 0x5b0f, 0x04 },
{ "linux/usbdevice_fs.h", "USBDEVFS_ALLOC_STREAMS", _IOC_READ, 0x551c, 0x08 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK32", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },

View File

@ -34,6 +34,7 @@
{ "asm-generic/ioctls.h", "TIOCGETD", 0, 0x5424, 0 },
{ "asm-generic/ioctls.h", "TIOCGEXCL", _IOC_READ, 0x5440, 0x04 },
{ "asm-generic/ioctls.h", "TIOCGICOUNT", 0, 0x545D, 0 },
{ "asm-generic/ioctls.h", "TIOCGISO7816", _IOC_READ, 0x5442, 0x28 },
{ "asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0, 0x5456, 0 },
{ "asm-generic/ioctls.h", "TIOCGPGRP", 0, 0x540F, 0 },
{ "asm-generic/ioctls.h", "TIOCGPKT", _IOC_READ, 0x5438, 0x04 },
@ -66,6 +67,7 @@
{ "asm-generic/ioctls.h", "TIOCSERSWILD", 0, 0x5455, 0 },
{ "asm-generic/ioctls.h", "TIOCSETD", 0, 0x5423, 0 },
{ "asm-generic/ioctls.h", "TIOCSIG", _IOC_WRITE, 0x5436, 0x04 },
{ "asm-generic/ioctls.h", "TIOCSISO7816", _IOC_READ|_IOC_WRITE, 0x5443, 0x28 },
{ "asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0, 0x5457, 0 },
{ "asm-generic/ioctls.h", "TIOCSPGRP", 0, 0x5410, 0 },
{ "asm-generic/ioctls.h", "TIOCSPTLCK", _IOC_WRITE, 0x5431, 0x04 },
@ -497,6 +499,7 @@
{ "linux/android/binder.h", "BC_TRANSACTION", _IOC_WRITE, 0x6300, 0x40 },
{ "linux/android/binder.h", "BC_TRANSACTION_SG", _IOC_WRITE, 0x6311, 0x48 },
{ "linux/android/binder.h", "BINDER_GET_NODE_DEBUG_INFO", _IOC_READ|_IOC_WRITE, 0x620b, 0x18 },
{ "linux/android/binder.h", "BINDER_GET_NODE_INFO_FOR_REF", _IOC_READ|_IOC_WRITE, 0x620c, 0x18 },
{ "linux/android/binder.h", "BINDER_SET_CONTEXT_MGR", _IOC_WRITE, 0x6207, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_PRIORITY", _IOC_WRITE, 0x6206, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_TIMEOUT", _IOC_WRITE, 0x6203, 0x08 },
@ -604,6 +607,8 @@
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
{ "linux/blkzoned.h", "BLKGETNRZONES", _IOC_READ, 0x1285, 0x04 },
{ "linux/blkzoned.h", "BLKGETZONESZ", _IOC_READ, 0x1284, 0x04 },
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
@ -1331,6 +1336,7 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES_NEW", _IOC_READ|_IOC_WRITE, 0x4b14, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_QUEUE_WAVE_STATE", _IOC_READ|_IOC_WRITE, 0x4b1b, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_TILE_CONFIG", _IOC_READ|_IOC_WRITE, 0x4b12, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_MAP_MEMORY_TO_GPU", _IOC_READ|_IOC_WRITE, 0x4b18, 0x18 },
@ -1404,7 +1410,10 @@
{ "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 },
{ "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c },
{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 },
{ "linux/media.h", "MEDIA_IOC_REQUEST_ALLOC", _IOC_READ, 0x7c05, 0x04 },
{ "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_QUEUE", _IOC_NONE, 0x7c80, 0x00 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_REINIT", _IOC_NONE, 0x7c81, 0x00 },
{ "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 },
@ -2002,6 +2011,8 @@
{ "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 },
{ "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 },
{ "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 },
{ "linux/udmabuf.h", "UDMABUF_CREATE", _IOC_WRITE, 0x7542, 0x18 },
{ "linux/udmabuf.h", "UDMABUF_CREATE_LIST", _IOC_WRITE, 0x7543, 0x08 },
{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c },
{ "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c },
{ "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x60 },
@ -2044,16 +2055,26 @@
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_TRIGGER", _IOC_NONE, 0x5b16, 0x00 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_WAIT_SRQ", _IOC_WRITE, 0x5b17, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_API_VERSION", _IOC_READ, 0x5b10, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_AUTO_ABORT", _IOC_WRITE, 0x5b19, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CANCEL_IO", _IOC_NONE, 0x5b23, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEANUP_IO", _IOC_NONE, 0x5b24, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", _IOC_NONE, 0x5b07, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", _IOC_NONE, 0x5b06, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CONFIG_TERMCHAR", _IOC_WRITE, 0x5b0c, 0x02 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CTRL_REQUEST", _IOC_READ|_IOC_WRITE, 0x5b08, 0x0c },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_EOM_ENABLE", _IOC_WRITE, 0x5b0b, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_GET_TIMEOUT", _IOC_READ, 0x5b09, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", _IOC_NONE, 0x5b01, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_MSG_IN_ATTR", _IOC_READ, 0x5b18, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_READ", _IOC_READ|_IOC_WRITE, 0x5b0e, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_SET_TIMEOUT", _IOC_WRITE, 0x5b0a, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE", _IOC_READ|_IOC_WRITE, 0x5b0d, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE_RESULT", _IOC_READ|_IOC_WRITE, 0x5b0f, 0x04 },
{ "linux/usbdevice_fs.h", "USBDEVFS_ALLOC_STREAMS", _IOC_READ, 0x551c, 0x08 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK32", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },

View File

@ -34,6 +34,7 @@
{ "asm-generic/ioctls.h", "TIOCGETD", 0, 0x5424, 0 },
{ "asm-generic/ioctls.h", "TIOCGEXCL", _IOC_READ, 0x5440, 0x04 },
{ "asm-generic/ioctls.h", "TIOCGICOUNT", 0, 0x545D, 0 },
{ "asm-generic/ioctls.h", "TIOCGISO7816", _IOC_READ, 0x5442, 0x28 },
{ "asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0, 0x5456, 0 },
{ "asm-generic/ioctls.h", "TIOCGPGRP", 0, 0x540F, 0 },
{ "asm-generic/ioctls.h", "TIOCGPKT", _IOC_READ, 0x5438, 0x04 },
@ -66,6 +67,7 @@
{ "asm-generic/ioctls.h", "TIOCSERSWILD", 0, 0x5455, 0 },
{ "asm-generic/ioctls.h", "TIOCSETD", 0, 0x5423, 0 },
{ "asm-generic/ioctls.h", "TIOCSIG", _IOC_WRITE, 0x5436, 0x04 },
{ "asm-generic/ioctls.h", "TIOCSISO7816", _IOC_READ|_IOC_WRITE, 0x5443, 0x28 },
{ "asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0, 0x5457, 0 },
{ "asm-generic/ioctls.h", "TIOCSPGRP", 0, 0x5410, 0 },
{ "asm-generic/ioctls.h", "TIOCSPTLCK", _IOC_WRITE, 0x5431, 0x04 },
@ -497,6 +499,7 @@
{ "linux/android/binder.h", "BC_TRANSACTION", _IOC_WRITE, 0x6300, 0x40 },
{ "linux/android/binder.h", "BC_TRANSACTION_SG", _IOC_WRITE, 0x6311, 0x48 },
{ "linux/android/binder.h", "BINDER_GET_NODE_DEBUG_INFO", _IOC_READ|_IOC_WRITE, 0x620b, 0x18 },
{ "linux/android/binder.h", "BINDER_GET_NODE_INFO_FOR_REF", _IOC_READ|_IOC_WRITE, 0x620c, 0x18 },
{ "linux/android/binder.h", "BINDER_SET_CONTEXT_MGR", _IOC_WRITE, 0x6207, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_PRIORITY", _IOC_WRITE, 0x6206, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_TIMEOUT", _IOC_WRITE, 0x6203, 0x08 },
@ -604,6 +607,8 @@
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
{ "linux/blkzoned.h", "BLKGETNRZONES", _IOC_READ, 0x1285, 0x04 },
{ "linux/blkzoned.h", "BLKGETZONESZ", _IOC_READ, 0x1284, 0x04 },
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
@ -1331,6 +1336,7 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES_NEW", _IOC_READ|_IOC_WRITE, 0x4b14, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_QUEUE_WAVE_STATE", _IOC_READ|_IOC_WRITE, 0x4b1b, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_TILE_CONFIG", _IOC_READ|_IOC_WRITE, 0x4b12, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_MAP_MEMORY_TO_GPU", _IOC_READ|_IOC_WRITE, 0x4b18, 0x18 },
@ -1404,7 +1410,10 @@
{ "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 },
{ "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c },
{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 },
{ "linux/media.h", "MEDIA_IOC_REQUEST_ALLOC", _IOC_READ, 0x7c05, 0x04 },
{ "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_QUEUE", _IOC_NONE, 0x7c80, 0x00 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_REINIT", _IOC_NONE, 0x7c81, 0x00 },
{ "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 },
@ -2002,6 +2011,8 @@
{ "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 },
{ "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 },
{ "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 },
{ "linux/udmabuf.h", "UDMABUF_CREATE", _IOC_WRITE, 0x7542, 0x18 },
{ "linux/udmabuf.h", "UDMABUF_CREATE_LIST", _IOC_WRITE, 0x7543, 0x08 },
{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c },
{ "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c },
{ "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x60 },
@ -2044,16 +2055,26 @@
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_TRIGGER", _IOC_NONE, 0x5b16, 0x00 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_WAIT_SRQ", _IOC_WRITE, 0x5b17, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_API_VERSION", _IOC_READ, 0x5b10, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_AUTO_ABORT", _IOC_WRITE, 0x5b19, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CANCEL_IO", _IOC_NONE, 0x5b23, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEANUP_IO", _IOC_NONE, 0x5b24, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", _IOC_NONE, 0x5b07, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", _IOC_NONE, 0x5b06, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CONFIG_TERMCHAR", _IOC_WRITE, 0x5b0c, 0x02 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CTRL_REQUEST", _IOC_READ|_IOC_WRITE, 0x5b08, 0x0c },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_EOM_ENABLE", _IOC_WRITE, 0x5b0b, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_GET_TIMEOUT", _IOC_READ, 0x5b09, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", _IOC_NONE, 0x5b01, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_MSG_IN_ATTR", _IOC_READ, 0x5b18, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_READ", _IOC_READ|_IOC_WRITE, 0x5b0e, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_SET_TIMEOUT", _IOC_WRITE, 0x5b0a, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE", _IOC_READ|_IOC_WRITE, 0x5b0d, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE_RESULT", _IOC_READ|_IOC_WRITE, 0x5b0f, 0x04 },
{ "linux/usbdevice_fs.h", "USBDEVFS_ALLOC_STREAMS", _IOC_READ, 0x551c, 0x08 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK32", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef sys_ARCH_mmap
# define sys_ARCH_mmap sys_mmap
#endif

View File

@ -34,6 +34,7 @@
{ "asm-generic/ioctls.h", "TIOCGETD", 0, 0x5424, 0 },
{ "asm-generic/ioctls.h", "TIOCGEXCL", _IOC_READ, 0x5440, 0x04 },
{ "asm-generic/ioctls.h", "TIOCGICOUNT", 0, 0x545D, 0 },
{ "asm-generic/ioctls.h", "TIOCGISO7816", _IOC_READ, 0x5442, 0x28 },
{ "asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0, 0x5456, 0 },
{ "asm-generic/ioctls.h", "TIOCGPGRP", 0, 0x540F, 0 },
{ "asm-generic/ioctls.h", "TIOCGPKT", _IOC_READ, 0x5438, 0x04 },
@ -66,6 +67,7 @@
{ "asm-generic/ioctls.h", "TIOCSERSWILD", 0, 0x5455, 0 },
{ "asm-generic/ioctls.h", "TIOCSETD", 0, 0x5423, 0 },
{ "asm-generic/ioctls.h", "TIOCSIG", _IOC_WRITE, 0x5436, 0x04 },
{ "asm-generic/ioctls.h", "TIOCSISO7816", _IOC_READ|_IOC_WRITE, 0x5443, 0x28 },
{ "asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0, 0x5457, 0 },
{ "asm-generic/ioctls.h", "TIOCSPGRP", 0, 0x5410, 0 },
{ "asm-generic/ioctls.h", "TIOCSPTLCK", _IOC_WRITE, 0x5431, 0x04 },
@ -497,6 +499,7 @@
{ "linux/android/binder.h", "BC_TRANSACTION", _IOC_WRITE, 0x6300, 0x40 },
{ "linux/android/binder.h", "BC_TRANSACTION_SG", _IOC_WRITE, 0x6311, 0x48 },
{ "linux/android/binder.h", "BINDER_GET_NODE_DEBUG_INFO", _IOC_READ|_IOC_WRITE, 0x620b, 0x18 },
{ "linux/android/binder.h", "BINDER_GET_NODE_INFO_FOR_REF", _IOC_READ|_IOC_WRITE, 0x620c, 0x18 },
{ "linux/android/binder.h", "BINDER_SET_CONTEXT_MGR", _IOC_WRITE, 0x6207, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_PRIORITY", _IOC_WRITE, 0x6206, 0x04 },
{ "linux/android/binder.h", "BINDER_SET_IDLE_TIMEOUT", _IOC_WRITE, 0x6203, 0x08 },
@ -604,6 +607,8 @@
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x9364, 0x08 },
{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 },
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
{ "linux/blkzoned.h", "BLKGETNRZONES", _IOC_READ, 0x1285, 0x04 },
{ "linux/blkzoned.h", "BLKGETZONESZ", _IOC_READ, 0x1284, 0x04 },
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
@ -1331,6 +1336,7 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES_NEW", _IOC_READ|_IOC_WRITE, 0x4b14, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_QUEUE_WAVE_STATE", _IOC_READ|_IOC_WRITE, 0x4b1b, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_TILE_CONFIG", _IOC_READ|_IOC_WRITE, 0x4b12, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_MAP_MEMORY_TO_GPU", _IOC_READ|_IOC_WRITE, 0x4b18, 0x18 },
@ -1404,7 +1410,10 @@
{ "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 },
{ "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x28 },
{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 },
{ "linux/media.h", "MEDIA_IOC_REQUEST_ALLOC", _IOC_READ, 0x7c05, 0x04 },
{ "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x34 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_QUEUE", _IOC_NONE, 0x7c80, 0x00 },
{ "linux/media.h", "MEDIA_REQUEST_IOC_REINIT", _IOC_NONE, 0x7c81, 0x00 },
{ "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 },
{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 },
@ -2002,6 +2011,8 @@
{ "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 },
{ "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x08 },
{ "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x08 },
{ "linux/udmabuf.h", "UDMABUF_CREATE", _IOC_WRITE, 0x7542, 0x18 },
{ "linux/udmabuf.h", "UDMABUF_CREATE_LIST", _IOC_WRITE, 0x7543, 0x08 },
{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1c },
{ "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c },
{ "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x68 },
@ -2044,16 +2055,26 @@
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_TRIGGER", _IOC_NONE, 0x5b16, 0x00 },
{ "linux/usb/tmc.h", "USBTMC488_IOCTL_WAIT_SRQ", _IOC_WRITE, 0x5b17, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_API_VERSION", _IOC_READ, 0x5b10, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_AUTO_ABORT", _IOC_WRITE, 0x5b19, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CANCEL_IO", _IOC_NONE, 0x5b23, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEANUP_IO", _IOC_NONE, 0x5b24, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", _IOC_NONE, 0x5b07, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", _IOC_NONE, 0x5b06, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CONFIG_TERMCHAR", _IOC_WRITE, 0x5b0c, 0x02 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_CTRL_REQUEST", _IOC_READ|_IOC_WRITE, 0x5b08, 0x10 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_EOM_ENABLE", _IOC_WRITE, 0x5b0b, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_GET_TIMEOUT", _IOC_READ, 0x5b09, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", _IOC_NONE, 0x5b01, 0x00 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_MSG_IN_ATTR", _IOC_READ, 0x5b18, 0x01 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_READ", _IOC_READ|_IOC_WRITE, 0x5b0e, 0x14 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_SET_TIMEOUT", _IOC_WRITE, 0x5b0a, 0x04 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE", _IOC_READ|_IOC_WRITE, 0x5b0d, 0x14 },
{ "linux/usb/tmc.h", "USBTMC_IOCTL_WRITE_RESULT", _IOC_READ|_IOC_WRITE, 0x5b0f, 0x04 },
{ "linux/usbdevice_fs.h", "USBDEVFS_ALLOC_STREAMS", _IOC_READ, 0x551c, 0x08 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK", _IOC_READ|_IOC_WRITE, 0x5502, 0x18 },
{ "linux/usbdevice_fs.h", "USBDEVFS_BULK32", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 },

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
[ 0] = { 2, TM, SEN(io_setup), "io_setup" },
[ 1] = { 1, TM, SEN(io_destroy), "io_destroy" },
[ 2] = { 3, 0, SEN(io_submit), "io_submit" },

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#define HAVE_ARCH_OLD_MMAP 1
#define HAVE_ARCH_OLD_SELECT 1
#define HAVE_ARCH_UID16_SYSCALLS 1

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
struct arm_pt_regs {
uint32_t uregs[18];
};

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "negated_errno.h"
#define arch_get_error arm_get_error

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
/* Return codes: 1 - ok, 0 - ignore, other - error. */
static int
arch_get_scno(struct tcb *tcp)

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#define arch_get_syscall_args arm_get_syscall_args
#include "arm/get_syscall_args.c"
#undef arch_get_syscall_args

View File

@ -8,7 +8,7 @@
*/
#ifndef STRACE_RAW_SYSCALL_H
#define STRACE_RAW_SYSCALL_H
# define STRACE_RAW_SYSCALL_H
# include "kernel_types.h"

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#define arch_set_error arm_set_error
#define arch_set_success arm_set_success
#include "arm/set_error.c"

View File

@ -1,3 +1,10 @@
/*
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef NT_ARM_SYSTEM_CALL
# define NT_ARM_SYSTEM_CALL 0x404
#endif

Some files were not shown because too many files have changed in this diff Show More