Compare commits

..

17 Commits

Author SHA1 Message Date
6ab67a54de travis: use the previous image version ...
... in attempt to figure out why it no longer works.
2017-12-23 01:02:34 +00:00
cb1f64ef3a Update NEWS 2017-12-21 13:12:36 +00:00
af319a087d Add description of new filtering syntax
* strace.1.in (.SS Filtering): Add description of new filtering syntax.
2017-12-21 13:12:36 +00:00
85aac65364 tests: check path filter
* tests/filtering_path.c: New file.
* tests/filtering_path.test: Likewise.
* tests/.gitignore: Add filtering_path.
* tests/Makefile.am (check_PROGRAMS): Add filtering_path.
(MISC_TESTS): Add filtering_path.test.
2017-12-21 13:12:36 +00:00
fb0ff98257 tests: check fd filter
* tests/filtering_fd-syntax.test: New file.
* tests/filtering_fd.c: Likewise.
* tests/filtering_fd.test: Likewise.
* tests/mmap_name.sh: Likewise.
* tests/mmap.test: Move mmap name testing to mmap_name.sh.
* tests/options-syntax.test: Remove fd filtering checks.
* tests/.gitignore: Add filtering_fd.
* tests/Makefile.am (check_PROGRAMS): Add filtering_fd.
(MISC_TESTS): Add filering_fd-syntax.test, filtering_fd.test.
(EXTRA_DIST): Add mmap_name.sh.
2017-12-21 13:12:36 +00:00
7ac26b2274 tests: check new syntax of inject/fault actions
* tests/qual_fault-exit_group.test: Add checks with new syntax.
* tests/qual_fault.test: Likewise.
* tests/qual_inject-error-signal.test: Likewise.
* tests/qual_inject-retval.test: Likewise.
* tests/qual_inject-signal.test: Likewise.
* tests/tampering-syntax.sh: New file.
* tests/qual_fault-syntax.test: Move common syntax checks to tampering-syntax.sh.
Add checks with new syntax.
* tests/qual_inject-syntax.test: Likewise.
* tests/Makefile.am (EXTRA_DIST): Add tampering-syntax.sh.
2017-12-21 13:12:36 +00:00
077bac4a1f tests: check expression parsing
* tests/filtering_action-syntax.test: New file.
* tests/filtering_expression-empty.test: Likewise.
* tests/filtering_expression-syntax.test: Likewise.
* tests/Makefile.am (MISC_TESTS): Add new files.
2017-12-21 13:12:36 +00:00
37f33a4686 tests: check error handling of syscall filter
* tests/filtering_syscall-syntax.test: Add checks of syscall filter.
* tests/qual_fault-syntax.test: Move checks with ':' to filtering_syscall-syntax.test
* tests/qual_inject-syntax.test: Likewise.
2017-12-21 13:12:36 +00:00
302f2d16d0 Add stacktrace filter action
* defs.h (QUAL_STACKTRACE): Add new qual flag.
(stacktrace): Add macro for checking QUAL_STACKTRACE.
(stack_trace_enabled): Change description.
* filter.h (DECL_FILTER_ACTION): Declare stacktrace filter action type.
* filter_action.c (action_types): Add stacktrace filter action type.
(add_action): Update stack_trace_enabled.
* strace.c (stack_trace_enabled): Change description.
(init): Use filtering_parse for -k option.
* syscall.c (syscall_entering_trace, syscall_exiting_decode,
syscall_exiting_trace): Use stacktrace macro instead of
stack_trace_enabled.
* unwind.c (apply_stacktrace): Add filter action function.
2017-12-21 13:12:36 +00:00
2de045936f Implement new filtering language parsing
* basic_filters.c (lookup_class, qualify_syscall_class, qualify_syscall,
qualify_syscall_tokens, parse_syscall_filter, qualify_tokens,
parse_fd_filter, parse_path_filter): Add qualify_mode argument.
(qualify_tokens, qualify_syscall_tokens): Use set inversion only in
qualify mode.
(lookup_class): Use deprecated class names only in qualify mode.
* defs.h (qualify): Remove declaration.
(filtering_parse): Add new declaration.
* filter.c (struct filter_type, parse_filter):
Add bool argument to parse_*_filter declarations.
* filter.h (parse_filter_action, parse_qualify_action,
parse_filter_expression): Add new declarations.
(parse_filter, qualify_tokens, qualify_syscall_tokens):
Add qualify_mode argument.
(DECL_FILTER): Add bool argument to parse_*_filter declarations.
* filter_action.c (parse_filter_action): Add new parsing function.
(inject_path_tracing): Use filtering_parse instead of qualify.
* filter_expression.c (parse_filter_expression): Implement parsing of filter
expression.
(parse_operator, push_operator, is_higher_priority): Add helper functions.
(is_space_ascii, is_allowed_in_name): Add new declarations.
* filter_parse.c: New file.
* filter_qualify.c (qualify_read, qualify_write, qualify_signals,
qualify_trace, qualify_abbrev, qualify_verbose, qualify_raw,
qualify_inject_common, qualify_fault, qualify_inject): Use main_part and args
arguments.
* strace.c (init): Use filtering_parse instead of qualify.
* Makefile.am (strace_SOURCES): Add filter_parse.c.
2017-12-21 13:12:36 +00:00
7d93fbe00e Optimize default filtering
* filter_action.c (default_flags): Add default flags variable.
(add_action): Update default flags.
(filter_syscall): Add default_flags to qual_flg.
(filtering_parse_finish): Init trace action for pathtracing.
* strace.c (init): Remove default filters.
2017-12-21 13:12:36 +00:00
70a8481f6d Improve fd filtering
* pathtrace.c (fdmatch_fd_func): New function.
(match_fd_common): Likewise.
(pathtrace_match_set): Move fd matching to match_fd_common.
* filter.h (match_fd_common): Add new declaration.
* basic_filters.c (is_fd_in_set): New function.
(run_fd_filter): Use match_fd_common for fd filter.
2017-12-21 13:12:36 +00:00
59b2dbbdbd Implement path filter
* basic_filters.c (parse_path_filter, run_path_filter, free_path_filter):
New functions.
* filter.c (filter_types): Add path filter type.
(set_filter_priv_data): New function.
* filter.h (set_filter_priv_data, expression_add_filter_and):
Add declarations.
(DECL_FILTER): Add path filter declaration.
* filter_action.c (inject_path_tracing): New function.
(filtering_parse_finish): Use it.
* filter_expression.c (add_variable_token, add_operator_token,
expression_add_filter_and): New functions.
* pathtrace.c (storepath): Duplicate path.
2017-12-21 13:12:36 +00:00
dfc18a8a98 Implement fd filter and read/write actions
* basic_actions.c (apply_read, apply_write): New functions.
* basic_filters.c (parse_fd_filter, run_fd_filter, free_fd_filter): Likewise.
* defs.h (QUAL_READ, QUAL_WRITE): Add new flags.
(dump_read, dump_write): Add macros for these flags.
* filter.c (filter_types): Add fd filter type.
* filter.h (DECL_FILTER): Add fd filter declaration.
(DECL_FILTER_ACTION): Add read and write filter action declarations.
* filter_action.c (action_types): Add read and write filter action types.
* filter_qualify.c (read_set, write_set): Remove set variables.
(qualify_read, qualify_write): Use new filtering API.
* number_set.h (read_set, write_set): Remove set variable declarations.
* syscall.c (dumpio): Check dump_read, dump_write macros
instead of global sets.
2017-12-21 13:12:36 +00:00
f00b9df5cb tests: improve syscall set syntax testing
* tests/filtering_syscall-syntax.test: New file.
* tests/options-syntax.test: Move syscall set syntax testing to
filtering_syscall-syntax.test.
* tests/qual_fault-syntax.test: Likewise.
* tests/qual_inject-syntax.test: Likewise.
* tests/Makefile.am (MISC_TESTS): Add filtering_syscall-syntax.test.
2017-12-21 13:12:36 +00:00
ae02a6cbb8 Implement inject and fault actions
* basic_actions.c (not_injected, apply_inject, parse_inject_common,
parse_inject, apply_fault, parse_fault): New functions.
* defs.h (struct inject_opts): Add init flag.
(qual_flags): Remove declaration.
* filter_action.c (action_types): Add inject and fault action types.
(set_filter_action_priv_data): New function.
* filter_qualify.c (inject_set): Remove variable.
(parse_inject_expression): Remove function.
(parse_inject_common_args): Add function for inject/fault arguments parsing.
(qualify_inject_common): Use parse_inject_common_args instead of
parse_inject_expression, use new filtering API.
(qualify_fault, qualify_inject): Remove "argument" from description
argument of qualify_inject_common.
(qual_flags): Remove function.
* filter.h (parse_inject_common_args, not_injected,
set_filter_action_priv_data): New declarations.
(DECL_FILTER_ACTION): Declare inject and fault actions.
(DECL_FILTER_ACTION_PARSER): Declare inject and fault action parsers.
* strace.c (trace_syscall): Call filter_syscall only when tcp->qual_flg
is empty.
* syscall.c (decode_socket_subcall): Remove qual_flags from decoder.
(decode_ipc_subcall): Likewise.
(decode_mips_subcall): Likewise.
(get_scno): Likewise.
(inject_vec, tamper_with_syscall_entering): Remove inject_vec support code.
2017-12-21 13:12:36 +00:00
4c2d68c14b Introduce new filtering architecture
This change introduces new filtering architecture primitives: filter,
filter_action and bool_expression. Filtering is now done after decoding of
syscall and tcp->qual_flg stores filtering results.

* basic_actions.c: New file.
* filter_action.c: Likewise.
* filter_expression.c: Likewise.
* filter.c: Likewise.
* basic_filters.c (parse_syscall_filter, run_syscall_filter,
free_syscall_filter): New functions.
* defs.h (filter_syscall, filtering_parsing_finish): Add new declarations.
* filter.h: Add new declarations.
* filter_qualify.c (abbrev_set, raw_set, trace_set, verbose_set):
Remove set variables.
(qualify_trace, qualify_abbrev, qualify_verbose, qualify_raw):
Use new filtering API.
(qual_flags): Remove QUAL_* flags for trace, abbrev, verbose, raw.
* strace.c (init): Call filtering_parse_finish after command line parsing.
(trace_syscall): Add filtering after syscall decoding.
* Makefile.am (strace_SOURCES): Add new files.
2017-12-21 13:12:36 +00:00
919 changed files with 13276 additions and 28796 deletions

3
.gitignore vendored
View File

@ -14,7 +14,6 @@
/ChangeLog
/aclocal.m4
/autom4te.cache
/bpf_attr_check.c
/compile
/config.guess
/config.h
@ -24,7 +23,6 @@
/config.sub
/configure
/depcomp
/gnu
/install-sh
/ioctl_iocdef.[ih]
/ioctl_redefs[12].h
@ -52,7 +50,6 @@
/native_printer_decls.h
/native_printer_defs.h
/printers.h
/README
/scno.h
/sen.h
/stamp-h1

View File

@ -1,73 +1,37 @@
image: "ubuntu:17.10"
before_script:
- ci/install-dependencies.sh
- ./travis-install.sh
variables:
GIT_DEPTH: "2147483647"
SLEEP_A_BIT: "sleep 0.2"
VERBOSE: "1"
gcc-x86_64-libdw:
gcc-x86_64:
stage: test
script: ci/run-build-and-tests.sh
script: ./travis-build.sh
variables:
CC: "gcc"
TARGET: "x86_64"
STACKTRACE: "libdw"
gcc-x86_64-libunwind:
gcc-x86:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "gcc"
TARGET: "x86_64"
STACKTRACE: "libunwind"
gcc-x86_64-nounwind:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "gcc"
TARGET: "x86_64"
STACKTRACE: "no"
gcc-x86-nounwind:
stage: test
script: ci/run-build-and-tests.sh
script: ./travis-build.sh
variables:
CC: "gcc"
TARGET: "x86"
STACKTRACE: "no"
clang-x86_64-libdw:
clang-x86_64:
stage: test
script: ci/run-build-and-tests.sh
script: ./travis-build.sh
variables:
CC: "clang"
TARGET: "x86_64"
STACKTRACE: "libdw"
clang-x86_64-libunwind:
clang-x86:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "clang"
TARGET: "x86_64"
STACKTRACE: "libunwind"
clang-x86_64-nounwind:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "clang"
TARGET: "x86_64"
STACKTRACE: "no"
clang-x86-nounwind:
stage: test
script: ci/run-build-and-tests.sh
script: ./travis-build.sh
variables:
CC: "clang"
TARGET: "x86"
STACKTRACE: "no"

View File

@ -1,7 +1,6 @@
# Map git author names and email addresses to canonical/preferred form.
<ak@linux.intel.com> <ak@suse.de>
Chen Jingpiao <chenjingpiao@gmail.com>
Chen Jingpiao <chenjingpiao@gmail.com> <chenjingpiao@foxmail.com>
<chenjingpiao@gmail.com> <chenjingpiao@foxmail.com>
<damir@altlinux.org> <damir@altlinux.ru>
<dgilbert@redhat.com> <dave@treblig.org>
<edgar.iglesias@gmail.com> <edgar@axis.com>
@ -20,7 +19,6 @@ Chen Jingpiao <chenjingpiao@gmail.com> <chenjingpiao@foxmail.com>
<will@williammanley.net> <william.manley@youview.com>
Carmelo Amoroso <carmelo.amoroso@st.com>
Edgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com> <edos@linux.com>
Elvira Khabirova <lineprinter@altlinux.org> <lineprinter0@gmail.com>
Eugene Syromyatnikov <evgsyr@gmail.com>
Eugene Syromyatnikov <evgsyr@gmail.com> <esyr@redhat.com>
Frederik Schüler <fs@debian.org>

View File

@ -2,9 +2,11 @@ language: c
dist: trusty
before_install: ci/install-dependencies.sh
group: deprecated-2017Q4
script: ci/run-build-and-tests.sh
before_install: ./travis-install.sh
script: ./travis-build.sh
sudo: required
@ -21,50 +23,35 @@ matrix:
- compiler: gcc
env:
- TARGET=x86_64
- STACKTRACE=libunwind
- compiler: gcc
env:
- TARGET=x32
- compiler: gcc
env:
- TARGET=x86
- compiler: clang-3.8
env:
- TARGET=x86_64
- compiler: musl-gcc
env:
- TARGET=x86_64
- compiler: clang-3.8
env:
- TARGET=x86
- compiler: musl-gcc
env:
- TARGET=x86
- compiler: gcc-7
env:
- TARGET=x86_64
- compiler: gcc-7
env:
- TARGET=x32
- compiler: gcc-7
env:
- TARGET=x86
- compiler: gcc
env:
- TARGET=x86_64
- CHECK=coverage
- KHEADERS=torvalds/linux
- compiler: gcc
env:
- TARGET=x86_64
- STACKTRACE=libunwind
- compiler: gcc
env:
- TARGET=x32
- STACKTRACE=no
- compiler: gcc
env:
- TARGET=x86
- STACKTRACE=no
- compiler: clang
env:
- TARGET=x86_64
- STACKTRACE=libunwind
- compiler: musl-gcc
env:
- TARGET=x86_64
- STACKTRACE=no
- compiler: clang
env:
- TARGET=x86
- STACKTRACE=no
- compiler: musl-gcc
env:
- TARGET=x86
- STACKTRACE=no
- compiler: gcc-8
env:
- TARGET=x86_64
- STACKTRACE=libunwind
- compiler: gcc-8
env:
- TARGET=x32
- STACKTRACE=no
- compiler: gcc-8
env:
- TARGET=x86
- STACKTRACE=no
- compiler: gcc
env:
- TARGET=x86_64
- STACKTRACE=no

View File

@ -4,7 +4,7 @@ Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
Copyright (c) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
Copyright (c) 2001-2018 The strace developers.
Copyright (c) 2001-2017 The strace developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -8,9 +8,9 @@ These people have contributed to strace. Some have reported problems, others
have contributed improvements to the documentation, actual code, provided
information, provided resources, or helped to port strace to new systems.
Those contributions are described in the version control logs and ChangeLog-CVS
file. If your name has been left out, if you'd rather not be listed, or
if you'd prefer a different address be used, please send a note to the
strace-devel@lists.strace.io mailing list.
file. If your name has been left out, if you'd rather not be listed, or if
you'd prefer a different address be used, please send a note to the
strace-devel@lists.sourceforge.net mailing list.
##<
## There is no need to list here any name that appears as an Author in
@ -83,4 +83,4 @@ Tommi Rantala ext-tommi.1.rantala@nokia.com
Topi Miettinen Topi.Miettinen@nic.fi
Xiaoning Ding dingxn@gmail.com
Zach Brown zach.brown@oracle.com
Zhang Le robert.zhangle@gmail.com
Zhang Le zhilg@users.sourceforge.net

View File

@ -1,9 +1,8 @@
Build strace from git repository
================================
If you use a GIT version of strace source code, there will be some files missing
that are needed to build strace. Some of these files are generated by tools
from the GNU Autoconf and GNU Automake packages.
If you use the GIT version of strace there will be some files missing
that you need to build strace. These files are generated by tools from
the GNU Autoconf and Automake packages.
Note: rather than running `autoreconf` directly, please invoke `./bootstrap`
script and follow the instructions given in [INSTALL](INSTALL) file for further
building and installation.
Note: rather than running `autoreconf` directly, use the `./bootstrap` script
and follow the instructions given in [INSTALL](INSTALL) file for further installation.

View File

@ -4,7 +4,7 @@
# Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
# Copyright (c) 2002-2018 The strace developers.
# Copyright (c) 2002-2017 The strace developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -64,19 +64,15 @@ include xlat/Makemodule.am
strace_CPPFLAGS = $(AM_CPPFLAGS)
strace_CFLAGS = $(AM_CFLAGS)
strace_LDFLAGS =
strace_LDADD = libstrace.a $(clock_LIBS) $(timer_LIBS)
strace_LDADD = libstrace.a
noinst_LIBRARIES = libstrace.a
libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
libstrace_a_CFLAGS = $(strace_CFLAGS)
libstrace_a_SOURCES = \
fetch_indirect_syscall_args.c \
fstatfs.c \
fstatfs64.c \
getpagesize.c \
ipc.c \
mmap_cache.c \
mmap_cache.h \
sigreturn.c \
socketcall.c \
statfs.c \
@ -92,13 +88,12 @@ strace_SOURCES = \
affinity.c \
aio.c \
alpha.c \
arch_defs.h \
basic_actions.c \
basic_filters.c \
bind.c \
bjm.c \
block.c \
bpf.c \
bpf_attr.h \
bpf_filter.c \
bpf_filter.h \
bpf_fprog.h \
@ -115,8 +110,6 @@ strace_SOURCES = \
copy_file_range.c \
count.c \
defs.h \
delay.c \
delay.h \
desc.c \
dirent.c \
dirent64.c \
@ -127,10 +120,8 @@ strace_SOURCES = \
error_prints.c \
error_prints.h \
evdev.c \
evdev_mpers.c \
eventfd.c \
execve.c \
f_owner_ex.h \
fadvise.c \
fallocate.c \
fanotify.c \
@ -146,7 +137,11 @@ strace_SOURCES = \
fetch_struct_statfs.c \
file_handle.c \
file_ioctl.c \
filter_action.c \
filter_expression.c \
filter_parse.c \
filter_qualify.c \
filter.c \
filter.h \
flock.c \
flock.h \
@ -160,7 +155,6 @@ strace_SOURCES = \
hdio.c \
hostname.c \
inotify.c \
inotify_ioctl.c \
io.c \
ioctl.c \
ioperm.c \
@ -177,12 +171,10 @@ strace_SOURCES = \
kexec.c \
keyctl.c \
keyctl_kdf_params.h \
kvm.c \
largefile_wrappers.h \
kvm.c \
ldt.c \
link.c \
linux/asm_stat.h \
linux/linux/signal.h \
linux/x32/asm_stat.h \
linux/x86_64/asm_stat.h \
listen.c \
@ -194,8 +186,6 @@ strace_SOURCES = \
membarrier.c \
memfd_create.c \
mknod.c \
mmap_notify.c \
mmap_notify.h \
mmsghdr.c \
mount.c \
mpers_type.h \
@ -209,11 +199,8 @@ strace_SOURCES = \
netlink.c \
netlink.h \
netlink_crypto.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 \
netlink_route.c \
@ -236,17 +223,14 @@ strace_SOURCES = \
pathtrace.c \
perf.c \
perf_event_struct.h \
perf_ioctl.c \
personality.c \
pkeys.c \
poll.c \
prctl.c \
print_aio_sigset.c \
print_dev_t.c \
print_group_req.c \
print_fields.h \
print_ifindex.c \
print_mac.c \
print_mq_attr.c \
print_msgbuf.c \
print_sg_req_info.c \
@ -272,9 +256,6 @@ strace_SOURCES = \
regs.h \
renameat.c \
resource.c \
retval.c \
retval.h \
riscv.c \
rt_sigframe.c \
rt_sigreturn.c \
rtc.c \
@ -291,7 +272,6 @@ strace_SOURCES = \
rtnl_rule.c \
rtnl_tc.c \
rtnl_tc_action.c \
s390.c \
sched.c \
sched_attr.h \
scsi.c \
@ -307,19 +287,18 @@ strace_SOURCES = \
sock.c \
sockaddr.c \
socketutils.c \
sparc.c \
sram_alloc.c \
stat.c \
stat.h \
stat64.c \
statfs.c \
statfs.h \
static_assert.h \
statx.c \
statx.h \
strace.c \
string_to_uint.h \
string_to_uint.c \
supported_personalities.h \
swapon.c \
syscall.c \
sysctl.c \
@ -332,7 +311,6 @@ strace_SOURCES = \
term.c \
time.c \
times.c \
trace_event.h \
truncate.c \
ubi.c \
ucopy.c \
@ -353,33 +331,14 @@ strace_SOURCES = \
xlat.h \
xmalloc.c \
xmalloc.h \
xstring.h \
$(strace_SOURCES_check) \
# end of strace_SOURCES
strace_SOURCES_check = bpf_attr_check.c
if ENABLE_STACKTRACE
strace_SOURCES += unwind.c unwind.h
if USE_LIBDW
strace_SOURCES += unwind-libdw.c
strace_CPPFLAGS += $(libdw_CPPFLAGS)
strace_CFLAGS += $(libdw_CFLAGS)
strace_LDFLAGS += $(libdw_LDFLAGS)
strace_LDADD += $(libdw_LIBS)
endif
if USE_LIBUNWIND
strace_SOURCES += unwind-libunwind.c
strace_SOURCES += unwind.c
strace_CPPFLAGS += $(libunwind_CPPFLAGS)
strace_LDFLAGS += $(libunwind_LDFLAGS)
strace_LDADD += $(libunwind_LIBS)
endif
if USE_DEMANGLE
strace_CPPFLAGS += $(libiberty_CPPFLAGS)
strace_LDFLAGS += $(libiberty_LDFLAGS)
strace_LDADD += $(libiberty_LIBS)
endif
endif
@CODE_COVERAGE_RULES@
CODE_COVERAGE_BRANCH_COVERAGE = 1
@ -415,7 +374,6 @@ EXTRA_DIST = \
debian/strace64.install \
debian/strace64.manpages \
debian/watch \
gen_bpf_attr_check.sh \
generate_sen.sh \
ioctl_iocdef.c \
ioctlsort.c \
@ -426,26 +384,23 @@ EXTRA_DIST = \
linux/32/syscallent.h \
linux/64/ioctls_inc.h \
linux/64/syscallent.h \
linux/aarch64/arch_defs_.h \
linux/aarch64/arch_regs.c \
linux/aarch64/arch_regs.h \
linux/aarch64/arch_rt_sigframe.c \
linux/aarch64/arch_rt_sigframe.c\
linux/aarch64/arch_sigreturn.c \
linux/aarch64/errnoent1.h \
linux/aarch64/get_error.c \
linux/aarch64/get_scno.c \
linux/aarch64/get_syscall_args.c \
linux/aarch64/get_syscall_args.c\
linux/aarch64/ioctls_arch0.h \
linux/aarch64/ioctls_arch1.h \
linux/aarch64/ioctls_inc0.h \
linux/aarch64/ioctls_inc1.h \
linux/aarch64/nr_prefix.c \
linux/aarch64/raw_syscall.h \
linux/aarch64/set_error.c \
linux/aarch64/set_scno.c \
linux/aarch64/shuffle_scno.c \
linux/aarch64/signalent1.h \
linux/aarch64/syscallent.h \
linux/aarch64/syscallent1.h \
linux/alpha/arch_defs_.h \
linux/alpha/arch_getrval2.c \
linux/alpha/arch_regs.c \
linux/alpha/arch_regs.h \
@ -455,10 +410,9 @@ EXTRA_DIST = \
linux/alpha/get_error.c \
linux/alpha/get_scno.c \
linux/alpha/get_syscall_args.c \
linux/alpha/get_syscall_result.c \
linux/alpha/get_syscall_result.c\
linux/alpha/ioctls_arch0.h \
linux/alpha/ioctls_inc0.h \
linux/alpha/raw_syscall.h \
linux/alpha/set_error.c \
linux/alpha/set_scno.c \
linux/alpha/signalent.h \
@ -472,15 +426,12 @@ EXTRA_DIST = \
linux/arc/get_syscall_args.c \
linux/arc/ioctls_arch0.h \
linux/arc/ioctls_inc0.h \
linux/arc/raw_syscall.h \
linux/arc/set_error.c \
linux/arc/set_scno.c \
linux/arc/syscallent.h \
linux/arch_defs_.h \
linux/arch_kvm.c \
linux/arch_regs.h \
linux/arch_sigreturn.c \
linux/arm/arch_defs_.h \
linux/arm/arch_regs.c \
linux/arm/arch_regs.h \
linux/arm/arch_rt_sigframe.c \
@ -490,11 +441,8 @@ EXTRA_DIST = \
linux/arm/get_syscall_args.c \
linux/arm/ioctls_arch0.h \
linux/arm/ioctls_inc0.h \
linux/arm/nr_prefix.c \
linux/arm/raw_syscall.h \
linux/arm/set_error.c \
linux/arm/set_scno.c \
linux/arm/shuffle_scno.c \
linux/arm/syscallent.h \
linux/arm/userent.h \
linux/avr32/arch_regs.c \
@ -505,12 +453,10 @@ EXTRA_DIST = \
linux/avr32/get_syscall_args.c \
linux/avr32/ioctls_arch0.h \
linux/avr32/ioctls_inc0.h \
linux/avr32/raw_syscall.h \
linux/avr32/set_error.c \
linux/avr32/set_scno.c \
linux/avr32/syscallent.h \
linux/avr32/userent.h \
linux/bfin/arch_defs_.h \
linux/bfin/arch_regs.c \
linux/bfin/arch_rt_sigframe.c \
linux/bfin/get_error.c \
@ -519,16 +465,38 @@ EXTRA_DIST = \
linux/bfin/get_syscall_result.c \
linux/bfin/ioctls_arch0.h \
linux/bfin/ioctls_inc0.h \
linux/bfin/raw_syscall.h \
linux/bfin/rt_sigframe.h \
linux/bfin/set_error.c \
linux/bfin/set_scno.c \
linux/bfin/syscallent.h \
linux/bfin/userent.h \
linux/crisv10/arch_regs.c \
linux/crisv10/arch_rt_sigframe.c\
linux/crisv10/arch_sigreturn.c \
linux/crisv10/get_error.c \
linux/crisv10/get_scno.c \
linux/crisv10/get_syscall_args.c \
linux/crisv10/get_syscall_result.c \
linux/crisv10/rt_sigframe.h \
linux/crisv10/set_error.c \
linux/crisv10/set_scno.c \
linux/crisv10/syscallent.h \
linux/crisv10/userent.h \
linux/crisv32/arch_regs.c \
linux/crisv32/arch_rt_sigframe.c\
linux/crisv32/arch_sigreturn.c \
linux/crisv32/get_error.c \
linux/crisv32/get_scno.c \
linux/crisv32/get_syscall_args.c \
linux/crisv32/get_syscall_result.c \
linux/crisv32/rt_sigframe.h \
linux/crisv32/set_error.c \
linux/crisv32/set_scno.c \
linux/crisv32/syscallent.h \
linux/crisv32/userent.h \
linux/dummy.h \
linux/errnoent.h \
linux/getregs_old.h \
linux/hppa/arch_defs_.h \
linux/hppa/arch_regs.c \
linux/hppa/arch_regs.h \
linux/hppa/arch_rt_sigframe.c \
@ -539,14 +507,12 @@ EXTRA_DIST = \
linux/hppa/get_syscall_result.c \
linux/hppa/ioctls_arch0.h \
linux/hppa/ioctls_inc0.h \
linux/hppa/raw_syscall.h \
linux/hppa/rt_sigframe.h \
linux/hppa/set_error.c \
linux/hppa/set_scno.c \
linux/hppa/signalent.h \
linux/hppa/syscallent.h \
linux/i386/arch_kvm.c \
linux/i386/arch_defs_.h \
linux/i386/arch_regs.c \
linux/i386/arch_regs.h \
linux/i386/arch_rt_sigframe.c \
@ -556,14 +522,12 @@ EXTRA_DIST = \
linux/i386/get_syscall_args.c \
linux/i386/ioctls_arch0.h \
linux/i386/ioctls_inc0.h \
linux/i386/raw_syscall.h \
linux/i386/rt_sigframe.h \
linux/i386/set_error.c \
linux/i386/set_scno.c \
linux/i386/syscallent.h \
linux/i386/userent.h \
linux/i386/userent0.h \
linux/ia64/arch_defs_.h \
linux/ia64/arch_getrval2.c \
linux/ia64/arch_regs.c \
linux/ia64/arch_regs.h \
@ -573,14 +537,12 @@ EXTRA_DIST = \
linux/ia64/get_syscall_args.c \
linux/ia64/ioctls_arch0.h \
linux/ia64/ioctls_inc0.h \
linux/ia64/raw_syscall.h \
linux/ia64/rt_sigframe.h \
linux/ia64/set_error.c \
linux/ia64/set_scno.c \
linux/ia64/syscallent.h \
linux/ia64/userent.h \
linux/inet_diag.h \
linux/m68k/arch_defs_.h \
linux/m68k/arch_regs.c \
linux/m68k/arch_regs.h \
linux/m68k/arch_rt_sigframe.c \
@ -590,7 +552,6 @@ EXTRA_DIST = \
linux/m68k/get_syscall_args.c \
linux/m68k/ioctls_arch0.h \
linux/m68k/ioctls_inc0.h \
linux/m68k/raw_syscall.h \
linux/m68k/rt_sigframe.h \
linux/m68k/set_error.c \
linux/m68k/set_scno.c \
@ -604,13 +565,11 @@ EXTRA_DIST = \
linux/metag/get_syscall_args.c \
linux/metag/ioctls_arch0.h \
linux/metag/ioctls_inc0.h \
linux/metag/raw_syscall.h \
linux/metag/set_error.c \
linux/metag/set_scno.c \
linux/metag/syscallent.h \
linux/microblaze/arch_defs_.h \
linux/microblaze/arch_regs.c \
linux/microblaze/arch_rt_sigframe.c \
linux/microblaze/arch_rt_sigframe.c\
linux/microblaze/arch_sigreturn.c \
linux/microblaze/get_error.c \
linux/microblaze/get_scno.c \
@ -618,12 +577,10 @@ EXTRA_DIST = \
linux/microblaze/get_syscall_result.c \
linux/microblaze/ioctls_arch0.h \
linux/microblaze/ioctls_inc0.h \
linux/microblaze/raw_syscall.h \
linux/microblaze/set_error.c \
linux/microblaze/set_scno.c \
linux/microblaze/syscallent.h \
linux/microblaze/userent.h \
linux/mips/arch_defs_.h \
linux/mips/arch_getrval2.c \
linux/mips/arch_regs.c \
linux/mips/arch_regs.h \
@ -636,7 +593,6 @@ EXTRA_DIST = \
linux/mips/get_syscall_args.c \
linux/mips/ioctls_arch0.h \
linux/mips/ioctls_inc0.h \
linux/mips/raw_syscall.h \
linux/mips/rt_sigframe.h \
linux/mips/set_error.c \
linux/mips/set_scno.c \
@ -647,8 +603,8 @@ EXTRA_DIST = \
linux/mips/syscallent-o32.h \
linux/mips/syscallent.h \
linux/mips/userent.h \
linux/mtd-abi.h \
linux/netlink_diag.h \
linux/nios2/arch_defs_.h \
linux/nios2/arch_regs.c \
linux/nios2/arch_regs.h \
linux/nios2/arch_rt_sigframe.c \
@ -657,11 +613,9 @@ EXTRA_DIST = \
linux/nios2/get_syscall_args.c \
linux/nios2/ioctls_arch0.h \
linux/nios2/ioctls_inc0.h \
linux/nios2/raw_syscall.h \
linux/nios2/set_error.c \
linux/nios2/set_scno.c \
linux/nios2/syscallent.h \
linux/nr_prefix.c \
linux/or1k/arch_regs.c \
linux/or1k/arch_regs.h \
linux/or1k/arch_rt_sigframe.c \
@ -670,16 +624,15 @@ EXTRA_DIST = \
linux/or1k/get_syscall_args.c \
linux/or1k/ioctls_arch0.h \
linux/or1k/ioctls_inc0.h \
linux/or1k/raw_syscall.h \
linux/or1k/set_error.c \
linux/or1k/set_scno.c \
linux/or1k/syscallent.h \
linux/or1k/userent.h \
linux/packet_diag.h \
linux/powerpc/arch_defs_.h \
linux/personality.h \
linux/powerpc/arch_regs.c \
linux/powerpc/arch_regs.h \
linux/powerpc/arch_rt_sigframe.c \
linux/powerpc/arch_rt_sigframe.c\
linux/powerpc/arch_sigreturn.c \
linux/powerpc/errnoent.h \
linux/powerpc/get_error.c \
@ -689,17 +642,16 @@ EXTRA_DIST = \
linux/powerpc/getregs_old.h \
linux/powerpc/ioctls_arch0.h \
linux/powerpc/ioctls_inc0.h \
linux/powerpc/raw_syscall.h \
linux/powerpc/set_error.c \
linux/powerpc/set_scno.c \
linux/powerpc/syscallent.h \
linux/powerpc/userent.h \
linux/powerpc64/arch_defs_.h \
linux/powerpc64/arch_regs.c \
linux/powerpc64/arch_regs.h \
linux/powerpc64/arch_rt_sigframe.c \
linux/powerpc64/arch_rt_sigframe.c\
linux/powerpc64/arch_sigreturn.c \
linux/powerpc64/errnoent.h \
linux/powerpc64/errnoent1.h \
linux/powerpc64/get_error.c \
linux/powerpc64/get_scno.c \
linux/powerpc64/get_syscall_args.c \
@ -709,18 +661,18 @@ EXTRA_DIST = \
linux/powerpc64/ioctls_arch1.h \
linux/powerpc64/ioctls_inc0.h \
linux/powerpc64/ioctls_inc1.h \
linux/powerpc64/raw_syscall.h \
linux/powerpc64/rt_sigframe.h \
linux/powerpc64/set_error.c \
linux/powerpc64/set_scno.c \
linux/powerpc64/signalent1.h \
linux/powerpc64/syscallent.h \
linux/powerpc64/syscallent1.h \
linux/powerpc64/userent.h \
linux/raw_syscall.h \
linux/riscv/arch_defs_.h \
linux/ptp_clock.h \
linux/riscv/arch_regs.c \
linux/riscv/arch_regs.h \
linux/riscv/arch_rt_sigframe.c \
linux/riscv/errnoent1.h \
linux/riscv/get_error.c \
linux/riscv/get_scno.c \
linux/riscv/get_syscall_args.c \
@ -728,13 +680,12 @@ EXTRA_DIST = \
linux/riscv/ioctls_arch1.h \
linux/riscv/ioctls_inc0.h \
linux/riscv/ioctls_inc1.h \
linux/riscv/raw_syscall.h \
linux/riscv/set_error.c \
linux/riscv/set_scno.c \
linux/riscv/signalent1.h \
linux/riscv/syscallent.h \
linux/riscv/syscallent1.h \
linux/rt_sigframe.h \
linux/s390/arch_defs_.h \
linux/s390/arch_regs.c \
linux/s390/arch_regs.h \
linux/s390/arch_rt_sigframe.c \
@ -744,7 +695,6 @@ EXTRA_DIST = \
linux/s390/get_syscall_args.c \
linux/s390/ioctls_arch0.h \
linux/s390/ioctls_inc0.h \
linux/s390/raw_syscall.h \
linux/s390/rt_sigframe.h \
linux/s390/set_error.c \
linux/s390/set_scno.c \
@ -752,7 +702,6 @@ EXTRA_DIST = \
linux/s390/userent.h \
linux/s390/userent0.h \
linux/s390/userent1.h \
linux/s390x/arch_defs_.h \
linux/s390x/arch_regs.c \
linux/s390x/arch_regs.h \
linux/s390x/arch_rt_sigframe.c \
@ -761,17 +710,12 @@ EXTRA_DIST = \
linux/s390x/get_scno.c \
linux/s390x/get_syscall_args.c \
linux/s390x/ioctls_arch0.h \
linux/s390x/ioctls_arch1.h \
linux/s390x/ioctls_inc0.h \
linux/s390x/ioctls_inc1.h \
linux/s390x/raw_syscall.h \
linux/s390x/rt_sigframe.h \
linux/s390x/set_error.c \
linux/s390x/set_scno.c \
linux/s390x/syscallent.h \
linux/s390x/syscallent1.h \
linux/s390x/userent.h \
linux/sh/arch_defs_.h \
linux/sh/arch_getrval2.c \
linux/sh/arch_regs.c \
linux/sh/arch_rt_sigframe.c \
@ -781,13 +725,11 @@ EXTRA_DIST = \
linux/sh/get_syscall_result.c \
linux/sh/ioctls_arch0.h \
linux/sh/ioctls_inc0.h \
linux/sh/raw_syscall.h \
linux/sh/set_error.c \
linux/sh/set_scno.c \
linux/sh/syscallent.h \
linux/sh/userent.h \
linux/sh/userent0.h \
linux/sh64/arch_defs_.h \
linux/sh64/arch_regs.c \
linux/sh64/arch_regs.h \
linux/sh64/arch_rt_sigframe.c \
@ -797,64 +739,61 @@ EXTRA_DIST = \
linux/sh64/get_syscall_result.c \
linux/sh64/ioctls_arch0.h \
linux/sh64/ioctls_inc0.h \
linux/sh64/raw_syscall.h \
linux/sh64/rt_sigframe.h \
linux/sh64/set_error.c \
linux/sh64/set_scno.c \
linux/sh64/syscallent.h \
linux/sh64/userent.h \
linux/shuffle_scno.c \
linux/signalent.h \
linux/smc_diag.h \
linux/sock_diag.h \
linux/sparc/arch_defs_.h \
linux/sparc/arch_getrval2.c \
linux/sparc/arch_regs.c \
linux/sparc/arch_regs.h \
linux/sparc/arch_rt_sigframe.c \
linux/sparc/arch_sigreturn.c \
linux/sparc/errnoent.h \
linux/sparc/gen.pl \
linux/sparc/get_error.c \
linux/sparc/get_scno.c \
linux/sparc/get_syscall_args.c \
linux/sparc/ioctls_arch0.h \
linux/sparc/ioctls_inc0.h \
linux/sparc/raw_syscall.h \
linux/sparc/rt_sigframe.h \
linux/sparc/set_error.c \
linux/sparc/set_scno.c \
linux/sparc/signalent.h \
linux/sparc/syscallent.h \
linux/sparc/userent.h \
linux/sparc64/arch_defs_.h \
linux/sparc64/arch_getrval2.c \
linux/sparc64/arch_regs.c \
linux/sparc64/arch_regs.h \
linux/sparc64/arch_rt_sigframe.c \
linux/sparc64/arch_rt_sigframe.c\
linux/sparc64/arch_sigreturn.c \
linux/sparc64/errnoent.h \
linux/sparc64/errnoent1.h \
linux/sparc64/get_error.c \
linux/sparc64/get_scno.c \
linux/sparc64/get_syscall_args.c \
linux/sparc64/get_syscall_args.c\
linux/sparc64/ioctls_arch0.h \
linux/sparc64/ioctls_arch1.h \
linux/sparc64/ioctls_inc0.h \
linux/sparc64/ioctls_inc1.h \
linux/sparc64/raw_syscall.h \
linux/sparc64/rt_sigframe.h \
linux/sparc64/set_error.c \
linux/sparc64/set_scno.c \
linux/sparc64/signalent.h \
linux/sparc64/signalent1.h \
linux/sparc64/syscallent.h \
linux/sparc64/syscallent1.h \
linux/sparc64/userent.h \
linux/subcall.h \
linux/syscall.h \
linux/tile/arch_defs_.h \
linux/tile/arch_regs.c \
linux/tile/arch_regs.h \
linux/tile/arch_rt_sigframe.c \
linux/tile/arch_sigreturn.c \
linux/tile/errnoent1.h \
linux/tile/get_error.c \
linux/tile/get_scno.c \
linux/tile/get_syscall_args.c \
@ -862,22 +801,23 @@ EXTRA_DIST = \
linux/tile/ioctls_arch1.h \
linux/tile/ioctls_inc0.h \
linux/tile/ioctls_inc1.h \
linux/tile/raw_syscall.h \
linux/tile/rt_sigframe.h \
linux/tile/set_error.c \
linux/tile/set_scno.c \
linux/tile/signalent1.h \
linux/tile/syscallent.h \
linux/tile/syscallent1.h \
linux/tile/userent.h \
linux/ubi-user.h \
linux/unix_diag.h \
linux/userent.h \
linux/userent0.h \
linux/x32/arch_defs_.h \
linux/x32/arch_kvm.c \
linux/x32/arch_regs.c \
linux/x32/arch_regs.h \
linux/x32/arch_rt_sigframe.c \
linux/x32/arch_sigreturn.c \
linux/x32/errnoent1.h \
linux/x32/get_error.c \
linux/x32/get_scno.c \
linux/x32/get_syscall_args.c \
@ -885,20 +825,21 @@ EXTRA_DIST = \
linux/x32/ioctls_arch1.h \
linux/x32/ioctls_inc0.h \
linux/x32/ioctls_inc1.h \
linux/x32/raw_syscall.h \
linux/x32/rt_sigframe.h \
linux/x32/set_error.c \
linux/x32/set_scno.c \
linux/x32/shuffle_scno.c \
linux/x32/signalent1.h \
linux/x32/syscallent.h \
linux/x32/syscallent1.h \
linux/x32/userent.h \
linux/x86_64/arch_defs_.h \
linux/x86_64/arch_kvm.c \
linux/x86_64/arch_regs.c \
linux/x86_64/arch_regs.h \
linux/x86_64/arch_rt_sigframe.c \
linux/x86_64/arch_sigreturn.c \
linux/x86_64/errnoent1.h \
linux/x86_64/errnoent2.h \
linux/x86_64/gentab.pl \
linux/x86_64/get_error.c \
linux/x86_64/get_scno.c \
linux/x86_64/get_syscall_args.c \
@ -910,11 +851,11 @@ EXTRA_DIST = \
linux/x86_64/ioctls_inc0.h \
linux/x86_64/ioctls_inc1.h \
linux/x86_64/ioctls_inc2.h \
linux/x86_64/raw_syscall.h \
linux/x86_64/rt_sigframe.h \
linux/x86_64/set_error.c \
linux/x86_64/set_scno.c \
linux/x86_64/shuffle_scno.c \
linux/x86_64/signalent1.h \
linux/x86_64/signalent2.h \
linux/x86_64/syscallent.h \
linux/x86_64/syscallent1.h \
linux/x86_64/syscallent2.h \
@ -927,7 +868,6 @@ EXTRA_DIST = \
linux/xtensa/get_syscall_result.c \
linux/xtensa/ioctls_arch0.h \
linux/xtensa/ioctls_inc0.h \
linux/xtensa/raw_syscall.h \
linux/xtensa/set_error.c \
linux/xtensa/set_scno.c \
linux/xtensa/syscallent.h \
@ -943,7 +883,7 @@ EXTRA_DIST = \
$(XLAT_INPUT_FILES) \
$(XLAT_HEADER_FILES) \
xlat/gen.sh \
# end of EXTRA_DIST
xlate.el
.PHONY: check-valgrind-local
check-valgrind-local:
@ -955,15 +895,10 @@ srpm: dist-xz
$(srcdir)/.version:
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
bpf_attr_check.c: $(srcdir)/bpf_attr.h $(srcdir)/gen_bpf_attr_check.sh
$(srcdir)/gen_bpf_attr_check.sh $< > $@-t && mv $@-t $@
strace_SOURCES_c = \
$(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
sys_func_h_sources = $(filter-out $(strace_SOURCES_check),$(strace_SOURCES_c))
sys_func.h: $(patsubst %,$(srcdir)/%,$(sys_func_h_sources))
sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
for f in $^; do \
sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
done | sort -u > $@
@ -982,7 +917,7 @@ dist-hook:
${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
${AM_V_GEN}echo $(MANPAGE_DATE) > $(distdir)/.strace.1.in.date
today = $(shell LC_TIME=C date -u +%Y-%m-%d)
today = $(shell date +%Y-%m-%d)
version_regexp = $(subst .,\.,$(VERSION))
news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
@ -1036,12 +971,10 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioc
cat $^ > $@
BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
bpf_attr_check.c native_printer_decls.h native_printer_defs.h \
printers.h sen.h sys_func.h .version
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
ioctl_iocdef.h ioctl_iocdef.i \
bpf_attr_check.c native_printer_decls.h native_printer_defs.h \
printers.h sen.h sys_func.h
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
include scno.am
@ -1071,7 +1004,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
CPP="$(CPP)" \
CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
$(srcdir)/mpers.sh $(mpers_NAME) $(mpers_CC_FLAGS) $$f || exit; \
$(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
done
> $@
@ -1142,7 +1075,6 @@ BUILT_SOURCES += $(mpers_m32_targets)
CLEANFILES += $(mpers_m32_targets)
$(mpers_m32_targets): mpers_NAME = m32
$(mpers_m32_targets): mpers_CC_FLAGS = @cc_flags_m32@
endif # HAVE_M32_MPERS
@ -1159,7 +1091,6 @@ BUILT_SOURCES += $(mpers_mx32_targets)
CLEANFILES += $(mpers_mx32_targets)
$(mpers_mx32_targets): mpers_NAME = mx32
$(mpers_mx32_targets): mpers_CC_FLAGS = @cc_flags_mx32@
endif # HAVE_MX32_MPERS

167
NEWS
View File

@ -1,117 +1,9 @@
Noteworthy changes in release 4.23 (2018-06-14)
Noteworthy changes in release ?.?? (????-??-??)
===============================================
* Changes in behaviour
* On x32 personality, 64-bit syscalls (such as readv) are now shown with "#64"
suffix instead of "64:" prefix. Unlike the old names, these new names
can be used in syscall qualification expressions.
* Changed error number output format: error numbers are consistently
printed as "-1 ECONST (Error description)"
for known errors and as "-1 (errno 123)" for unknown errors,
regardless of -e raw qualification settings. One can specify
-X raw for displaying raw error numbers unconditionally.
* Unfetchable addresses inside arrays are now printed as comments.
* Obsolete IA-32 mode syscall names are no longer printed on ia64.
* Improvements
* Implemented libdw backend for -k option, configured at build time
using --with-libdw option.
Whether -k option is compiled is now configured at build time
using --enable-stacktrace option.
* Added -X option for configuring xlat output formatting (addresses
Debian bug #692915).
* Added support for personality designation ("64", "32", or "x32") to syscall
qualifications in -e trace expressions.
* Implemented injection of syscalls with no side effects as an alternative
to injection of an invalid syscall (-e inject=SET:syscall= expression).
* Improved support for reproducible builds (addresses Debian bug #896016).
* Implemented decoding of BPF_PROG_QUERY and BPF_RAW_TRACEPOINT_OPEN bpf
syscall commands.
* Implemented decoding of INOTIFY_IOC_SETNEXTWD and PERF_EVENT_IOC_* ioctl
commands.
* Implemented decoding of PR_GET_SPECULATION_CTRL and PR_SET_SPECULATION_CTRL
prctl syscall options.
* Enhanced decoding of bpf, getsockopt, setsockopt, and socket syscalls.
* Enhanced decoding of NETLINK_KOBJECT_UEVENT and NETLINK_ROUTE protocols.
* Enhanced decoding of *_DIAG_MEMINFO netlink attributes.
* Enhanced decoding of BTRFS_*, FS_IOC_*, SIOCGIFHWADDR, and SIOCSIFHWADDR
ioctl commands.
* Enhanced decoding of AF_BLUETOOTH socket addresses.
* Implemented decoding of io_pgetevent syscall.
* Wired up rseq syscall.
* Updated lists of ADJ_*, BPF_*, BPF_F_*, BPF_PROG_TYPE_*, ETH_P_*, FPE_*,
IFF_*, IPPROTO_*, MAP_*, MS_*, MSG_*, NETLINK_*, PACKET_*, PROT_*, SCTP_*,
SECCOMP_FILTER_FLAG_*, SEGV_*, SEM_*, SHM_*, SW_*, V4L2_CID_*,
V4L2_CTRL_CLASS_*, and V4L2_PIX_FMT_* constants.
* Updated lists of ioctl commands from Linux 4.17.
* Bug fixes
* Fixed decoding of msgtyp argument of msgrcv syscall.
* Fixed fallback definitions for F_*, MCL_*, MSG_ZEROCOPY, SI_*,
and SOL_SOCKET constants.
* Fixed -e trace=%pure expression on mips.
Noteworthy changes in release 4.22 (2018-04-05)
===============================================
* Changes in infrastructure
* The mailing list was moved to strace-devel@lists.strace.io.
* SourceForge git repository
(https://sourceforge.net/p/strace/code/ci/master/tree/) is no longer
maintained. Please use GitLab (https://gitlab.com/strace/strace/)
or GitHub (https://github.com/strace/strace/) repository instead.
* Changes in behaviour
* When printing string data, '8' and '9' following an octal escape sequence
no longer lead to unabbreviated octal escape sequence output, as they used
to do.
* Angle brackets are now printed as octal number escape sequences
in the output of paths associated with file descriptors.
* Data dump for write syscalls (-e write) is performed regardless
of successfulness of these syscall (addresses Debian bug #436284).
* -r and -t options are now affect output independently. Previously,
-r option led to ignoring of the -t option (addresses Debian bug #466195).
* Improvements
* Implemented delay injection (-e inject=SET:delay_enter= and
-e inject=SET:delay_exit= options).
* Added -A option for opening output files in append mode
(addresses Debian bug #528488).
* IPv6 addresses shown in socket information in -yy mode are now printed
in brackets.
* Enhanced decoding of bpf, prctl and ptrace syscalls.
* Enhanced decoding of BTRFS_IOC_INO_PATHS, BTRFS_IOC_LOGICAL_INO, and PTP_*
ioctl commands.
* Enhanced NETLINK_ROUTE protocol decoding.
* Updated lists of signal codes.
* Updated lists of BPF_*, BTN_*, ETH_P_*, INET_DIAG_BC_*, KEY_*, POLL*, RWF_*,
SCHED_FLAG_*, SCTP_* and error constants.
* Implemented block/character device number printing in -yy mode.
* Known pixel/SDR format names are printed as comments for pixelformat fields
in v4l2 structures.
* Enhanced decoding of kern_features syscall.
* Enhanced NETLINK_NETFILTER netlink protocol decoder.
* Optimized handling of large number of tracees.
* Improved wall clock time measurement in syscall count statistics
(-c -w option).
* Extended the range of allowed values in -e inject=...:retval= expression.
* Added i18n support.
* Updated lists of ioctl commands from Linux 4.16.
* Enhanced manual page.
* Bug fixes
* Fixed build on m68k.
* Fixed v4l2 pixelformat decoding on big-endian architectures.
* Fixed -O option.
Noteworthy changes in release 4.21 (2018-02-13)
===============================================
* Changes in behaviour
* Warning is now issued when -F option is used.
* Warning is now issued when a tracee with unsupported personality
is attached.
* Unknown syscall numbers are now printed in hexadecimal form.
* Changes in command line syntax
* New syntax for -e option for filter-based expressions.
Old syntax is still supported.
* Improvements
* Implemented decoding of netlink descriptor attributes as file descriptors.
@ -119,63 +11,14 @@ Noteworthy changes in release 4.21 (2018-02-13)
* Implemented decoding of BPF_PROG_TEST_RUN, BPF_PROG_GET_NEXT_ID,
BPF_MAP_GET_NEXT_ID, BPF_PROG_GET_FD_BY_ID, BPF_MAP_GET_FD_BY_ID,
and BPF_OBJ_GET_INFO_BY_FD commands of bpf syscall.
* Enhanced decoding of get_thread_area, memfd_create, modify_ldt,
perf_event_open, reboot, s390_guarded_storage, s390_pcio_mmio_read,
s390_pci_mmio_write, s390_runtime_instr, s390_sthyi, set_thread_area,
and shmget syscalls.
* Implemented decoding of KVM_* and DM_LIST_DEVICES ioctl commands.
* Implemented decoding of riscv_flush_icache syscall.
* Enhanced decoding of getsockopt and setsockopt syscalls for SOL_NETLINK
level.
* Enhanced decoding of BPF_MAP_CREATE command of bpf syscall.
* Print values returned by mq_open syscall and first arguments
of mq_getsetattr, mq_notify, mq_timedreceive, and mq_timedsend syscalls
as file descriptors.
* Added decoding of get_tls syscall on arm.
* Added -e trace=%pure option for tracing system calls with no arguments that
never fail.
* Updated lists of IPV6_*, MAP_*, MEMBARRIER_CMD_*, MSG_*, NT_*, PKEY_*,
SHM_*, and TCP_* constants.
* Updated lists of MSG_* and SHM_* constants.
* Added manual page for the strace-log-merge command.
* Updated lists of ioctl commands from Linux 4.15.
* Implemented biarch support for s390x.
* Implemented an optional support for symbol demangling in strace -k output
(activated by --with-libiberty configure option).
* Information about availability of demangling and reliable personality
decoding (on architectures with multiple personalities) is now available
in strace -V output.
* Added decoding of pkey_alloc, pkey_free, and pkey_mprotect syscalls on
powerpc and powerpc64.
* Enhanced manual page.
* Bug fixes
* Fixed multi-personality support in cross builds.
* Added mq_getsetattr, mq_notify, mq_open, mq_timedreceive, and mq_timedsend
syscalls to %desc tracing set.
* Fixed path tracing support for mmap syscalls with indirect arguments and
for old select syscall.
* Fixed decoding of arm-specific (__ARM_NR_*) syscalls.
* Fixed open mode flags decoding.
* Fixed corner cases in handling of strace -ff -ttt logs by strace-log-merge.
* Error counts that exceed one billion are now printed correctly in call
summary output.
* Fixed call summary header for x32 personality.
* Changes of tracee personalities are reported more reliably.
* Fixed the case when strace attaches to a tracee being inside exec and its
first syscall stop is syscall-exit-stop instead of syscall-enter-stop,
which messed up all the syscall state tracking.
* Fixed printing of higher 32 bits of the return value for x32 personality.
* Portability
* A C compiler that supports "for" loop initial declarations is now required.
* Inability to configure multiple personality support on architectures where
multiple personalities are supported leads to configuration failure during
build now. Use --enable-mpers=check to revert to the old behaviour.
* Build-time requirement for the mpers support has been lowered from gawk 4
to gawk 3.
* Removed incomplete and non-functional support for the CRIS architecture.
* Removed incomplete and unused support for IA-32 mode on the IA-64
architecture.
Noteworthy changes in release 4.20 (2017-11-13)
===============================================

View File

@ -1,11 +1,7 @@
This is strace - a diagnostic, debugging and instructional userspace utility
with a traditional command-line interface for Linux. It is used to monitor
and tamper with interactions between processes and the Linux kernel, which
include system calls, signal deliveries, and changes of process state.
The operation of strace is made possible by the kernel feature known as ptrace.
This is strace, a system call tracer for Linux.
strace is released under a Berkeley-style license at the request
of Paul Kranenburg; see the file COPYING for details.
of Paul Kranenburg.
See the file CREDITS for a list of authors and other contributors.
See the file INSTALL for compilation and installation instructions.
@ -15,14 +11,14 @@ The project's homepage is at
https://strace.io
strace has a mailing list:
strace-devel@lists.strace.io
strace-devel@lists.sourceforge.net.
System requirements:
* Linux kernel >= 2.6.18 is recommended. Older versions might still work
but they haven't been thoroughly tested with this release.
* Linux kernel >= 2.5.46 is required.
Older versions without a decent PTRACE_SETOPTIONS support will not work.
* On mips, Linux kernel >= 2.6.15 is required.
* On mips, linux kernel >= 2.6.15 is required.
Older versions without a decent PTRACE_GETREGS support will not work.
* On s390 and s390x, Linux kernel >= 2.6.27 is required.
* On s390 and s390x, linux kernel >= 2.6.27 is required.
Older versions without a decent PTRACE_GETREGSET support will not work.

View File

@ -1,7 +1,6 @@
Requirements
============
If you use a GIT version of strace source code, please refer to
INSTALL-git.md file for building and installation instructions.
If you use the GIT version of strace, please refer to INSTALL-git.md file.
No more ChangeLog file
@ -14,28 +13,13 @@ the top-level ChangeLog file from logs at "make dist" time. As such,
there are strict requirements on the form of the commit log messages.
Commit requirements
===================
Each commit message should always start with a one-line summary, the second
Commit log requirements
=======================
Each commit log should always start with a one-line summary, the second
line should be blank, and the remaining lines are usually ChangeLog-style
entries for all affected files, except the leading TABs which should
be omitted.
Changes must not introduce whitespace errors in git sense (trailing
whitespace, spaces before tabs, spaces for indentation, blank lines
at the end of file), this can be checked with the following command:
git -c core.whitespace=space-before-tab,trailing-space diff-index \
--check 4b825dc642cb6eb9a060e54bf8d69288fbee4904
It is also preferred (but not required) that commit patches pass
scripts/checkpatch.pl script from the Linux kernel[1], as currently established
coding style quite closely resembles the one used in Linux kernel[2], with some
exceptions.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
Documentation
=============

View File

@ -9,13 +9,6 @@ See the file [NEWS](NEWS) for information on what has changed in recent versions
Please read the file [INSTALL-git](INSTALL-git.md) for installation instructions.
The user discussion and development of strace take place on [the strace mailing list](https://lists.strace.io/mailman/listinfo/strace-devel) -- everyone is welcome to post bug reports, feature requests, comments and patches to strace-devel@lists.strace.io. The mailing list archives are available at https://lists.strace.io/pipermail/strace-devel/ and other archival sites.
The GIT repository of strace is available at [GitHub](https://github.com/strace/strace/) and [GitLab](https://gitlab.com/strace/strace/).
The latest binary strace packages are available in many repositories, including
[OBS](https://build.opensuse.org/package/show/home:ldv_alt/strace/),
[Fedora rawhide](https://apps.fedoraproject.org/packages/strace), and
[Sisyphus](https://packages.altlinux.org/en/Sisyphus/srpms/strace).
The user discussion and development of strace take place on [the strace mailing list](https://lists.sourceforge.net/lists/listinfo/strace-devel) -- everyone is welcome to post bug reports, feature requests, comments and patches to strace-devel@lists.sourceforge.net. The mailing list archives are available at https://sourceforge.net/p/strace/mailman/strace-devel/ and other archival sites.
[![Build Status](https://travis-ci.org/strace/strace.svg?branch=master)](https://travis-ci.org/strace/strace) [![Code Coverage](https://codecov.io/github/strace/strace/coverage.svg?branch=master)](https://codecov.io/github/strace/strace?branch=master)

25
aio.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-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -196,7 +196,7 @@ SYS_FUNC(io_submit)
printaddr(addr);
else
print_array(tcp, addr, nr, &iocbp, current_wordsize,
tfetch_mem, print_iocbp, 0);
umoven_or_printaddr, print_iocbp, 0);
return RVAL_DECODED;
}
@ -238,8 +238,7 @@ SYS_FUNC(io_cancel)
return 0;
}
static int
print_io_getevents(struct tcb *tcp, bool has_usig)
SYS_FUNC(io_getevents)
{
if (entering(tcp)) {
printaddr(tcp->u_arg[0]);
@ -249,30 +248,16 @@ print_io_getevents(struct tcb *tcp, bool has_usig)
} else {
struct io_event buf;
print_array(tcp, tcp->u_arg[3], tcp->u_rval, &buf, sizeof(buf),
tfetch_mem, print_io_event, 0);
umoven_or_printaddr, print_io_event, 0);
tprints(", ");
/*
* Since the timeout and usig parameters are read by the kernel
* Since the timeout parameter is read by the kernel
* on entering syscall, it has to be decoded the same way
* whether the syscall has failed or not.
*/
temporarily_clear_syserror(tcp);
print_timespec(tcp, tcp->u_arg[4]);
if (has_usig) {
tprints(", ");
print_aio_sigset(tcp, tcp->u_arg[5]);
}
restore_cleared_syserror(tcp);
}
return 0;
}
SYS_FUNC(io_getevents)
{
return print_io_getevents(tcp, false);
}
SYS_FUNC(io_pgetevents)
{
return print_io_getevents(tcp, true);
}

View File

@ -1,6 +1,5 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -30,8 +29,6 @@
#ifdef ALPHA
# include "xstring.h"
static int
decode_getxxid(struct tcb *tcp, const char *what)
{
@ -43,7 +40,7 @@ decode_getxxid(struct tcb *tcp, const char *what)
return 0;
static const char const fmt[] = "%s %ld";
static char outstr[sizeof(fmt) + 3 * sizeof(rval)];
xsprintf(outstr, fmt, what, rval);
snprintf(outstr, sizeof(outstr), fmt, what, rval);
tcp->auxstr = outstr;
return RVAL_STR;
}

View File

@ -1,8 +0,0 @@
/* Architecture-specific definitions. */
#ifndef STRACE_ARCH_DEFS_H
#define STRACE_ARCH_DEFS_H
#include "arch_defs_.h"
#include "linux/arch_defs_.h"
#endif /* !STRACE_ARCH_DEFS_H */

130
basic_actions.c Normal file
View File

@ -0,0 +1,130 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include "filter.h"
bool
is_traced(struct tcb *tcp)
{
return traced(tcp);
}
bool
not_injected(struct tcb *tcp)
{
return !inject(tcp);
}
void *
parse_null(const char *str)
{
return NULL;
}
void
apply_trace(struct tcb *tcp, void *priv_data)
{
tcp->qual_flg |= QUAL_TRACE;
}
void
apply_raw(struct tcb *tcp, void *priv_data)
{
tcp->qual_flg |= QUAL_RAW;
}
void
apply_abbrev(struct tcb *tcp, void *priv_data)
{
tcp->qual_flg |= QUAL_ABBREV;
}
void
apply_verbose(struct tcb *tcp, void *priv_data)
{
tcp->qual_flg |= QUAL_VERBOSE;
}
void
apply_inject(struct tcb *tcp, void *priv_data)
{
struct inject_opts *opts = priv_data;
tcp->qual_flg |= QUAL_INJECT;
if (!tcp->inject_vec[current_personality])
tcp->inject_vec[current_personality] =
xcalloc(nsyscalls, sizeof(struct inject_opts));
if (scno_in_range(tcp->scno)
&& !tcp->inject_vec[current_personality][tcp->scno].data.flags)
tcp->inject_vec[current_personality][tcp->scno] = *opts;
}
static void *
parse_inject_common(const char *str, bool fault_tokens_only,
const char *description)
{
struct inject_opts *opts = xmalloc(sizeof(struct inject_opts));
char *buf = xstrdup(str);
parse_inject_common_args(buf, opts, fault_tokens_only, false);
if (!opts->data.flags)
error_msg_and_die("invalid %s argument '%s'",
description, str ? str : "");
free(buf);
return opts;
}
void *
parse_inject(const char *str)
{
return parse_inject_common(str, false, "inject");
}
void
apply_fault(struct tcb *tcp, void *priv_data)
{
apply_inject(tcp, priv_data);
}
void *
parse_fault(const char *str)
{
return parse_inject_common(str, true, "fault");
}
void
apply_read(struct tcb *tcp, void *_priv_data)
{
tcp->qual_flg |= QUAL_READ;
}
void
apply_write(struct tcb *tcp, void *_priv_data)
{
tcp->qual_flg |= QUAL_WRITE;
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 The strace developers.
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -27,82 +27,28 @@
*/
#include "defs.h"
#include <regex.h>
#include "filter.h"
#include "number_set.h"
#include "xstring.h"
/**
* Checks whether a @-separated personality specification suffix is present.
* Personality suffix is a one of strings stored in personality_designators
* array.
*
* @param[in] s Specification string to check.
* @param[out] p Where to store personality number if it is found.
* @return If personality is found, the provided string is copied without
* suffix and returned as a result (callee should de-alllocate it
* with free() after use), and personality number is written to p.
* Otherwise, NULL is returned and p is untouched.
*/
static char *
qualify_syscall_separate_personality(const char *s, unsigned int *p)
{
char *pos = strchr(s, '@');
if (!pos)
return NULL;
for (unsigned int i = 0; i < SUPPORTED_PERSONALITIES; i++) {
if (!strcmp(pos + 1, personality_designators[i])) {
*p = i;
return xstrndup(s, pos - s);
}
}
error_msg_and_help("incorrect personality designator '%s'"
" in qualification '%s'", pos + 1, s);
}
static bool
qualify_syscall_number_personality(int n, unsigned int p,
struct number_set *set)
{
if ((unsigned int) n >= nsyscall_vec[p])
return false;
add_number_to_set_array(n, set, p);
return true;
}
#include "filter.h"
#include "syscall.h"
#include <regex.h>
static bool
qualify_syscall_number(const char *s, struct number_set *set)
{
unsigned int p;
char *num_str = qualify_syscall_separate_personality(s, &p);
int n;
if (num_str) {
n = string_to_uint(num_str);
free(num_str);
if (n < 0)
return false;
return qualify_syscall_number_personality(n, p, set);
}
n = string_to_uint(s);
int n = string_to_uint(s);
if (n < 0)
return false;
unsigned int p;
bool done = false;
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p)
done |= qualify_syscall_number_personality(n, p, set);
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
if ((unsigned) n >= nsyscall_vec[p]) {
continue;
}
add_number_to_set_array(n, set, p);
done = true;
}
return done;
}
@ -126,32 +72,20 @@ qualify_syscall_regex(const char *s, struct number_set *set)
if ((rc = regcomp(&preg, s, REG_EXTENDED | REG_NOSUB)) != 0)
regerror_msg_and_die(rc, &preg, "regcomp", s);
unsigned int p;
bool found = false;
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
unsigned int i;
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
for (unsigned int i = 0; i < nsyscall_vec[p]; ++i) {
for (i = 0; i < nsyscall_vec[p]; ++i) {
if (!sysent_vec[p][i].sys_name)
continue;
rc = regexec(&preg, sysent_vec[p][i].sys_name,
0, NULL, 0);
if (rc == REG_NOMATCH) {
char name_buf[128];
char *pos = stpcpy(name_buf,
sysent_vec[p][i].sys_name);
(void) xappendstr(name_buf, pos, "@%s",
personality_designators[p]);
rc = regexec(&preg, name_buf, 0, NULL, 0);
}
if (rc == REG_NOMATCH)
continue;
else if (rc)
regerror_msg_and_die(rc, &preg, "regexec", s);
add_number_to_set_array(i, set, p);
found = true;
}
@ -162,12 +96,19 @@ qualify_syscall_regex(const char *s, struct number_set *set)
}
static unsigned int
lookup_class(const char *s)
lookup_class(const char *s, bool qualify_mode)
{
static const struct {
const char *name;
unsigned int value;
} syscall_class[] = {
{ "desc", TRACE_DESC },
{ "file", TRACE_FILE },
{ "memory", TRACE_MEMORY },
{ "process", TRACE_PROCESS },
{ "signal", TRACE_SIGNAL },
{ "ipc", TRACE_IPC },
{ "network", TRACE_NETWORK },
{ "%desc", TRACE_DESC },
{ "%file", TRACE_FILE },
{ "%memory", TRACE_MEMORY },
@ -182,95 +123,67 @@ lookup_class(const char *s)
{ "%statfs", TRACE_STATFS },
{ "%fstatfs", TRACE_FSTATFS },
{ "%%statfs", TRACE_STATFS_LIKE },
{ "%pure", TRACE_PURE },
/* legacy class names */
{ "desc", TRACE_DESC },
{ "file", TRACE_FILE },
{ "memory", TRACE_MEMORY },
{ "process", TRACE_PROCESS },
{ "signal", TRACE_SIGNAL },
{ "ipc", TRACE_IPC },
{ "network", TRACE_NETWORK },
};
for (unsigned int i = 0; i < ARRAY_SIZE(syscall_class); ++i) {
if (strcmp(s, syscall_class[i].name) == 0)
unsigned int i;
for (i = 0; i < ARRAY_SIZE(syscall_class); ++i) {
if (!qualify_mode && *s != '%')
continue;
if (strcmp(s, syscall_class[i].name) == 0) {
return syscall_class[i].value;
}
}
return 0;
}
static bool
qualify_syscall_class(const char *s, struct number_set *set)
qualify_syscall_class(const char *s, struct number_set *set, bool qualify_mode)
{
const unsigned int n = lookup_class(s);
const unsigned int n = lookup_class(s, qualify_mode);
if (!n)
return false;
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
for (unsigned int i = 0; i < nsyscall_vec[p]; ++i) {
if (sysent_vec[p][i].sys_name &&
(sysent_vec[p][i].sys_flags & n) == n)
add_number_to_set_array(i, set, p);
unsigned int p;
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
unsigned int i;
for (i = 0; i < nsyscall_vec[p]; ++i) {
if (!sysent_vec[p][i].sys_name
|| (sysent_vec[p][i].sys_flags & n) != n) {
continue;
}
add_number_to_set_array(i, set, p);
}
}
return true;
}
kernel_long_t
scno_by_name(const char *s, unsigned int p, kernel_long_t start)
{
if (p >= SUPPORTED_PERSONALITIES)
return -1;
for (kernel_ulong_t i = start; i < nsyscall_vec[p]; ++i) {
if (sysent_vec[p][i].sys_name &&
strcmp(s, sysent_vec[p][i].sys_name) == 0)
return i;
}
return -1;
}
static bool
qualify_syscall_name_personality(const char *s, unsigned int p,
struct number_set *set)
{
bool found = false;
for (kernel_long_t scno = 0; (scno = scno_by_name(s, p, scno)) >= 0;
++scno) {
add_number_to_set_array(scno, set, p);
found = true;
}
return found;
}
static bool
qualify_syscall_name(const char *s, struct number_set *set)
{
unsigned int p;
char *name_str = qualify_syscall_separate_personality(s, &p);
bool found = false;
if (name_str) {
found = qualify_syscall_name_personality(name_str, p, set);
free(name_str);
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
unsigned int i;
return found;
for (i = 0; i < nsyscall_vec[p]; ++i) {
if (!sysent_vec[p][i].sys_name
|| strcmp(s, sysent_vec[p][i].sys_name)) {
continue;
}
add_number_to_set_array(i, set, p);
found = true;
}
}
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p)
found |= qualify_syscall_name_personality(s, p, set);
return found;
}
static bool
qualify_syscall(const char *token, struct number_set *set)
qualify_syscall(const char *token, struct number_set *set, bool qualify_mode)
{
bool ignore_fail = false;
@ -282,7 +195,7 @@ qualify_syscall(const char *token, struct number_set *set)
return qualify_syscall_number(token, set) || ignore_fail;
if (*token == '/')
return qualify_syscall_regex(token + 1, set) || ignore_fail;
return qualify_syscall_class(token, set)
return qualify_syscall_class(token, set, qualify_mode)
|| qualify_syscall_name(token, set)
|| ignore_fail;
}
@ -292,7 +205,8 @@ qualify_syscall(const char *token, struct number_set *set)
* according to STR specification.
*/
void
qualify_syscall_tokens(const char *const str, struct number_set *const set)
qualify_syscall_tokens(const char *const str, struct number_set *const set,
bool qualify_mode)
{
/* Clear all sets. */
clear_number_set_array(set, SUPPORTED_PERSONALITIES);
@ -302,9 +216,15 @@ qualify_syscall_tokens(const char *const str, struct number_set *const set)
* of the remaining specification.
*/
const char *s = str;
while (*s == '!') {
invert_number_set_array(set, SUPPORTED_PERSONALITIES);
++s;
if (qualify_mode) {
/*
* Each leading ! character means inversion
* of the remaining specification.
*/
while (*s == '!') {
invert_number_set_array(set, SUPPORTED_PERSONALITIES);
++s;
}
}
if (strcmp(s, "none") == 0) {
@ -315,7 +235,6 @@ qualify_syscall_tokens(const char *const str, struct number_set *const set)
*/
return;
} else if (strcmp(s, "all") == 0) {
/* "all" == "!none" */
invert_number_set_array(set, SUPPORTED_PERSONALITIES);
return;
}
@ -329,19 +248,48 @@ qualify_syscall_tokens(const char *const str, struct number_set *const set)
*/
char *copy = xstrdup(s);
char *saveptr = NULL;
const char *token;
bool done = false;
for (const char *token = strtok_r(copy, ",", &saveptr);
token; token = strtok_r(NULL, ",", &saveptr)) {
done = qualify_syscall(token, set);
if (!done)
for (token = strtok_r(copy, ",", &saveptr); token;
token = strtok_r(NULL, ",", &saveptr)) {
done = qualify_syscall(token, set, qualify_mode);
if (!done) {
error_msg_and_die("invalid system call '%s'", token);
}
}
free(copy);
if (!done)
if (!done) {
error_msg_and_die("invalid system call '%s'", str);
}
}
void *
parse_syscall_filter(const char *str, bool qualify_mode)
{
struct number_set *set;
set = alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(str, set, qualify_mode);
return set;
}
bool
run_syscall_filter(struct tcb *tcp, void *priv_data)
{
struct number_set *set = priv_data;
return is_number_in_set_array(tcp->scno, set, current_personality);
}
void
free_syscall_filter(void *priv_data)
{
struct number_set *set = priv_data;
free_number_set_array(set, SUPPORTED_PERSONALITIES);
}
/*
@ -349,7 +297,8 @@ qualify_syscall_tokens(const char *const str, struct number_set *const set)
*/
void
qualify_tokens(const char *const str, struct number_set *const set,
string_to_uint_func func, const char *const name)
string_to_uint_func func, const char *const name,
bool qualify_mode)
{
/* Clear the set. */
clear_number_set_array(set, 1);
@ -359,9 +308,15 @@ qualify_tokens(const char *const str, struct number_set *const set,
* of the remaining specification.
*/
const char *s = str;
while (*s == '!') {
invert_number_set_array(set, 1);
++s;
if (qualify_mode) {
/*
* Each leading ! character means inversion
* of the remaining specification.
*/
while (*s == '!') {
invert_number_set_array(set, 1);
++s;
}
}
if (strcmp(s, "none") == 0) {
@ -372,7 +327,6 @@ qualify_tokens(const char *const str, struct number_set *const set,
*/
return;
} else if (strcmp(s, "all") == 0) {
/* "all" == "!none" */
invert_number_set_array(set, 1);
return;
}
@ -386,19 +340,98 @@ qualify_tokens(const char *const str, struct number_set *const set,
*/
char *copy = xstrdup(s);
char *saveptr = NULL;
const char *token;
int number = -1;
for (const char *token = strtok_r(copy, ",", &saveptr);
token; token = strtok_r(NULL, ",", &saveptr)) {
for (token = strtok_r(copy, ",", &saveptr); token;
token = strtok_r(NULL, ",", &saveptr)) {
number = func(token);
if (number < 0)
if (number < 0) {
error_msg_and_die("invalid %s '%s'", name, token);
}
add_number_to_set(number, set);
}
free(copy);
if (number < 0)
if (number < 0) {
error_msg_and_die("invalid %s '%s'", name, str);
}
}
void *
parse_fd_filter(const char *str, bool qualify_mode)
{
struct number_set *set;
set = alloc_number_set_array(1);
qualify_tokens(str, set, string_to_uint, "descriptor", qualify_mode);
return set;
}
static bool
is_fd_in_set(struct tcb *tcp, int fd, void *data) {
struct number_set *set = data;
if (fd < 0)
return false;
return is_number_in_set(fd, set);
}
bool
run_fd_filter(struct tcb *tcp, void *priv_data)
{
struct number_set *set = priv_data;
/*
* mq_timedsend and mq_timedreceive are not marked as descriptor
* syscalls, but they can be dumped with -e read/write.
*/
switch (tcp->s_ent->sen) {
case SEN_mq_timedsend:
case SEN_mq_timedreceive:
return is_fd_in_set(tcp, tcp->u_arg[0], set);
}
return match_fd_common(tcp, &is_fd_in_set, set);
}
void
free_fd_filter(void *priv_data)
{
struct number_set *set = priv_data;
free_number_set_array(set, 1);
return;
}
void *
parse_path_filter(const char *path, bool qualify_mode)
{
struct path_set *set = xcalloc(1, sizeof(struct path_set));
pathtrace_select_set(path, set);
return set;
}
bool
run_path_filter(struct tcb *tcp, void *priv_data)
{
struct path_set *set = priv_data;
return pathtrace_match_set(tcp, set);
}
void
free_path_filter(void *priv_data)
{
struct path_set *set = priv_data;
unsigned int i;
for (i = 0; i < set->num_selected; ++i)
free((char *) set->paths_selected[i]);
free(set->paths_selected);
free(set);
return;
}

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) 2011-2018 The strace developers.
* Copyright (c) 2011-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -168,7 +168,7 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
case BLKALIGNOFF:
if (entering(tcp))
return 0;
ATTRIBUTE_FALLTHROUGH;
/* fall through */
/* take a signed int */
case BLKROSET:
case BLKBSZSET:

View File

@ -1,6 +1,5 @@
#!/bin/sh -eu
./m4/gen_bpf_attr_m4.sh
./generate_mpers_am.sh
./xlat/gen.sh
./tests/gen_pure_executables.sh
@ -11,12 +10,9 @@ for m in m32 mx32; do
rm -rf $tests
mkdir $tests
s='[[:space:]]*'
[ "$m" = m32 ] && k="s/^\\(SIZEOF_KERNEL_LONG_T$s=\\).*/\\1 4/;" || k=
sed "s/@arch@/@arch_$m@/;
s/^\\(SIZEOF_LONG$s=\\).*/\\1 4/; $k
s/^MPERS_NAME$s=.*/& $m/;
s/^MPERS_CC_FLAGS$s=.*/& @cc_flags_$m@/;
s/^ARCH_MFLAGS$s=.*/& -DMPERS_IS_\$(MPERS_NAME) \$(MPERS_CC_FLAGS)/" \
s/^ARCH_MFLAGS$s=.*/& -DMPERS_IS_\$(MPERS_NAME) -$m/" \
tests/Makefile.am > $tests/Makefile.am
for f in tests/*; do
case "${f##*/}" in
@ -26,8 +22,4 @@ for m in m32 mx32; do
done
done
for f in README; do
cp "dist/$f" .
done
autoreconf -f -i "$@"
exec autoreconf -f -i "$@"

793
bpf.c
View File

@ -1,7 +1,6 @@
/*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2017 Quentin Monnet <quentin.monnet@6wind.com>
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -33,12 +32,8 @@
#ifdef HAVE_LINUX_BPF_H
# include <linux/bpf.h>
#endif
#include <linux/filter.h>
#include "bpf_attr.h"
#include "xlat/bpf_commands.h"
#include "xlat/bpf_file_mode_flags.h"
#include "xlat/bpf_map_types.h"
#include "xlat/bpf_map_flags.h"
#include "xlat/bpf_prog_types.h"
@ -46,9 +41,6 @@
#include "xlat/bpf_map_update_elem_flags.h"
#include "xlat/bpf_attach_type.h"
#include "xlat/bpf_attach_flags.h"
#include "xlat/bpf_query_flags.h"
#include "xlat/ebpf_regs.h"
#include "xlat/numa_node.h"
#define DECL_BPF_CMD_DECODER(bpf_cmd_decoder) \
int \
@ -58,38 +50,14 @@ bpf_cmd_decoder(struct tcb *const tcp, \
void *const data) \
/* End of DECL_BPF_CMD_DECODER definition. */
#define BEGIN_BPF_CMD_DECODER(bpf_cmd) \
static DECL_BPF_CMD_DECODER(decode_ ## bpf_cmd) \
{ \
struct bpf_cmd ## _struct attr = {}; \
const size_t attr_size = bpf_cmd ## _struct_size; \
const unsigned int len = MIN(size, attr_size); \
memcpy(&attr, data, len); \
do { \
/* End of BEGIN_BPF_CMD_DECODER definition. */
#define END_BPF_CMD_DECODER(rval) \
decode_attr_extra_data(tcp, data, size, attr_size); \
} while (0); \
tprints("}"); \
return (rval); \
} \
/* End of END_BPF_CMD_DECODER definition. */
#define DEF_BPF_CMD_DECODER(bpf_cmd) \
static DECL_BPF_CMD_DECODER(decode_ ## bpf_cmd)
#define BPF_CMD_ENTRY(bpf_cmd) \
[bpf_cmd] = decode_ ## bpf_cmd
typedef DECL_BPF_CMD_DECODER((*bpf_cmd_decoder_t));
/*
* A note about bpf syscall decoder: it doesn't perform any size sanity checks,
* so even if it leads to partial copying of one of the fields, the command
* handler will still use the (partially-copied-from-userspace, partially
* zeroed) field value. That's why we stop decoding and check for known sizes
* that correspond to released versions of the structure used by the specific
* command - it looks like the most sensible way to parse this insanity.
*/
static int
decode_attr_extra_data(struct tcb *const tcp,
const char *data,
@ -106,14 +74,11 @@ decode_attr_extra_data(struct tcb *const tcp,
for (i = 0; i < size; ++i) {
if (data[i]) {
tprints(", ");
if (abbrev(tcp)) {
if (abbrev(tcp))
tprints("...");
} else {
tprintf("/* bytes %zu..%zu */ ",
attr_size, attr_size + size - 1);
else
print_quoted_string(data, size,
QUOTE_FORCE_HEX);
}
return RVAL_DECODED;
}
}
@ -121,591 +86,298 @@ decode_attr_extra_data(struct tcb *const tcp,
return 0;
}
struct ebpf_insn {
uint8_t code;
uint8_t dst_reg:4;
uint8_t src_reg:4;
int16_t off;
int32_t imm;
};
struct ebpf_insns_data {
unsigned int count;
};
static bool
print_ebpf_insn(struct tcb * const tcp, void * const elem_buf,
const size_t elem_size, void * const data)
DEF_BPF_CMD_DECODER(BPF_MAP_CREATE)
{
struct ebpf_insns_data *eid = data;
struct ebpf_insn *insn = elem_buf;
struct {
uint32_t map_type, key_size, value_size, max_entries,
map_flags, inner_map_fd, numa_node;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
if (eid->count++ >= BPF_MAXINSNS) {
tprints("...");
return false;
}
memcpy(&attr, data, len);
tprints("{code=");
print_bpf_filter_code(insn->code, true);
/* We can't use PRINT_FIELD_XVAL on bit fields */
tprints(", dst_reg=");
printxval_index(ebpf_regs, insn->dst_reg, "BPF_REG_???");
tprints(", src_reg=");
printxval_index(ebpf_regs, insn->src_reg, "BPF_REG_???");
PRINT_FIELD_D(", ", *insn, off);
PRINT_FIELD_X(", ", *insn, imm);
tprints("}");
return true;
}
static void
print_ebpf_prog(struct tcb *const tcp, const uint64_t addr, const uint32_t len)
{
print_big_u64_addr(addr);
if (abbrev(tcp)) {
printaddr(addr);
} else {
struct ebpf_insns_data eid = {};
struct ebpf_insn insn;
print_array(tcp, addr, len, &insn, sizeof(insn),
tfetch_mem, print_ebpf_insn, &eid);
}
}
BEGIN_BPF_CMD_DECODER(BPF_MAP_CREATE)
{
PRINT_FIELD_XVAL_INDEX("{", attr, map_type, bpf_map_types,
"BPF_MAP_TYPE_???");
PRINT_FIELD_XVAL("{", attr, map_type, bpf_map_types,
"BPF_MAP_TYPE_???");
PRINT_FIELD_U(", ", attr, key_size);
PRINT_FIELD_U(", ", attr, value_size);
PRINT_FIELD_U(", ", attr, max_entries);
/* map_flags field was added in Linux commit v4.6-rc1~91^2~108^2~6. */
if (len <= offsetof(struct BPF_MAP_CREATE_struct, map_flags))
break;
PRINT_FIELD_FLAGS(", ", attr, map_flags, bpf_map_flags, "BPF_F_???");
/*
* inner_map_fd field was added in Linux commit
* v4.12-rc1~64^3~373^2~2.
*/
if (len <= offsetof(struct BPF_MAP_CREATE_struct, inner_map_fd))
break;
PRINT_FIELD_FD(", ", attr, inner_map_fd, tcp);
if (attr.map_flags & BPF_F_NUMA_NODE)
PRINT_FIELD_U(", ", attr, numa_node);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
/* numa_node field was added in Linux commit v4.14-rc1~130^2~196^2~1. */
if (len <= offsetof(struct BPF_MAP_CREATE_struct, numa_node))
break;
if (attr.map_flags & BPF_F_NUMA_NODE) {
/*
* Kernel uses the value of -1 as a designation for "no NUMA
* node specified", and even uses NUMA_NO_NODE constant;
* however, the constant definition is not a part of UAPI
* headers, thus we can't simply print this named constant
* instead of the value. Let's force verbose xlat style instead
* in order to provide the information for the user while
* not hampering the availability to derive the actual value
* without the access to the kernel headers.
*/
tprints(", numa_node=");
printxvals_ex(attr.numa_node, NULL,
XLAT_STYLE_FMT_U | XLAT_STYLE_VERBOSE,
numa_node, NULL);
}
/* map_name field was added in Linux commit v4.15-rc1~84^2~605^2~3. */
if (len <= offsetof(struct BPF_MAP_CREATE_struct, map_name))
break;
PRINT_FIELD_CSTRING_SZ(", ", attr, map_name,
MIN(sizeof(attr.map_name),
len - offsetof(struct BPF_MAP_CREATE_struct,
map_name)));
/*
* map_ifindex field was added in Linux commit
* v4.16-rc1~123^2~145^2~5^2~8.
*/
if (len <= offsetof(struct BPF_MAP_CREATE_struct, map_ifindex))
break;
PRINT_FIELD_IFINDEX(", ", attr, map_ifindex);
return RVAL_DECODED | RVAL_FD;
}
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
BEGIN_BPF_CMD_DECODER(BPF_MAP_LOOKUP_ELEM)
DEF_BPF_CMD_DECODER(BPF_MAP_LOOKUP_ELEM)
{
struct bpf_io_elem_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key, value;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, map_fd, tcp);
PRINT_FIELD_ADDR64(", ", attr, key);
PRINT_FIELD_ADDR64(", ", attr, value);
}
END_BPF_CMD_DECODER(RVAL_DECODED)
PRINT_FIELD_X(", ", attr, key);
PRINT_FIELD_X(", ", attr, value);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_MAP_UPDATE_ELEM)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_MAP_UPDATE_ELEM)
{
struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
uint64_t ATTRIBUTE_ALIGNED(8) value;
uint64_t flags;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, map_fd, tcp);
PRINT_FIELD_ADDR64(", ", attr, key);
PRINT_FIELD_ADDR64(", ", attr, value);
PRINT_FIELD_XVAL_INDEX(", ", attr, flags, bpf_map_update_elem_flags,
"BPF_???");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
PRINT_FIELD_X(", ", attr, key);
PRINT_FIELD_X(", ", attr, value);
PRINT_FIELD_XVAL(", ", attr, flags, bpf_map_update_elem_flags,
"BPF_???");
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_MAP_DELETE_ELEM)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_MAP_DELETE_ELEM)
{
struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, map_fd, tcp);
PRINT_FIELD_ADDR64(", ", attr, key);
}
END_BPF_CMD_DECODER(RVAL_DECODED)
PRINT_FIELD_X(", ", attr, key);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_NEXT_KEY)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_MAP_GET_NEXT_KEY)
{
struct bpf_io_elem_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key, next_key;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, map_fd, tcp);
PRINT_FIELD_ADDR64(", ", attr, key);
PRINT_FIELD_ADDR64(", ", attr, next_key);
}
END_BPF_CMD_DECODER(RVAL_DECODED)
PRINT_FIELD_X(", ", attr, key);
PRINT_FIELD_X(", ", attr, next_key);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_PROG_LOAD)
{
PRINT_FIELD_XVAL_INDEX("{", attr, prog_type, bpf_prog_types,
"BPF_PROG_TYPE_???");
struct bpf_prog_load {
uint32_t prog_type, insn_cnt;
uint64_t ATTRIBUTE_ALIGNED(8) insns, license;
uint32_t log_level, log_size;
uint64_t ATTRIBUTE_ALIGNED(8) log_buf;
uint32_t kern_version, prog_flags;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_XVAL("{", attr, prog_type, bpf_prog_types,
"BPF_PROG_TYPE_???");
PRINT_FIELD_U(", ", attr, insn_cnt);
tprints(", insns=");
print_ebpf_prog(tcp, attr.insns, attr.insn_cnt);
tprintf(", license=");
print_big_u64_addr(attr.license);
printstr(tcp, attr.license);
/* log_* fields were added in Linux commit v3.18-rc1~52^2~1^2~4. */
if (len <= offsetof(struct BPF_PROG_LOAD_struct, log_level))
break;
PRINT_FIELD_X(", ", attr, insns);
PRINT_FIELD_STR(", ", attr, license, tcp);
PRINT_FIELD_U(", ", attr, log_level);
PRINT_FIELD_U(", ", attr, log_size);
tprintf(", log_buf=");
print_big_u64_addr(attr.log_buf);
printstr_ex(tcp, attr.log_buf, attr.log_size, QUOTE_0_TERMINATED);
/* kern_version field was added in Linux commit v4.1-rc1~84^2~50. */
if (len <= offsetof(struct BPF_PROG_LOAD_struct, kern_version))
break;
tprintf(", kern_version=KERNEL_VERSION(%u, %u, %u)",
attr.kern_version >> 16,
(attr.kern_version >> 8) & 0xFF,
attr.kern_version & 0xFF);
/* prog_flags field was added in Linux commit v4.12-rc2~34^2~29^2~2. */
if (len <= offsetof(struct BPF_PROG_LOAD_struct, prog_flags))
break;
PRINT_FIELD_X(", ", attr, log_buf);
PRINT_FIELD_U(", ", attr, kern_version);
PRINT_FIELD_FLAGS(", ", attr, prog_flags, bpf_prog_flags, "BPF_F_???");
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
/* prog_name field was added in Linux commit v4.15-rc1~84^2~605^2~4. */
if (len <= offsetof(struct BPF_PROG_LOAD_struct, prog_name))
break;
PRINT_FIELD_CSTRING_SZ(", ", attr, prog_name,
MIN(sizeof(attr.prog_name),
len - offsetof(struct BPF_PROG_LOAD_struct,
prog_name)));
/*
* prog_ifindex field was added as prog_target_ifindex in Linux commit
* v4.15-rc1~84^2~127^2~13 and renamed to its current name in
* v4.15-rc1~15^2~5^2~3^2~7.
*/
if (len <= offsetof(struct BPF_PROG_LOAD_struct, prog_ifindex))
break;
PRINT_FIELD_IFINDEX(", ", attr, prog_ifindex);
/*
* expected_attach_type was added in Linux commit
* v4.17-rc1~148^2~19^2^2~8.
*/
if (len <= offsetof(struct BPF_PROG_LOAD_struct, expected_attach_type))
break;
PRINT_FIELD_XVAL(", ", attr, expected_attach_type, bpf_attach_type,
"BPF_???");
return RVAL_DECODED | RVAL_FD;
}
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
BEGIN_BPF_CMD_DECODER(BPF_OBJ_PIN)
DEF_BPF_CMD_DECODER(BPF_OBJ_PIN)
{
tprintf("{pathname=");
print_big_u64_addr(attr.pathname);
printpath(tcp, attr.pathname);
struct bpf_obj {
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
uint32_t bpf_fd;
} attr = {};
const size_t attr_size =
offsetofend(struct bpf_obj, bpf_fd);
const unsigned int len = size < attr_size ? size : attr_size;
memcpy(&attr, data, len);
PRINT_FIELD_PATH("{", attr, pathname, tcp);
PRINT_FIELD_FD(", ", attr, bpf_fd, tcp);
decode_attr_extra_data(tcp, data, size, attr_size);
tprints("}");
/* file_flags field was added in Linux v4.15-rc1~84^2~384^2~4 */
if (len <= offsetof(struct BPF_OBJ_PIN_struct, file_flags))
break;
PRINT_FIELD_FLAGS(", ", attr, file_flags, bpf_file_mode_flags,
"BPF_F_???");
return RVAL_DECODED | RVAL_FD;
}
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
#define decode_BPF_OBJ_GET decode_BPF_OBJ_PIN
BEGIN_BPF_CMD_DECODER(BPF_PROG_ATTACH)
DEF_BPF_CMD_DECODER(BPF_PROG_ATTACH)
{
struct {
uint32_t target_fd, attach_bpf_fd, attach_type, attach_flags;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, target_fd, tcp);
PRINT_FIELD_FD(", ", attr, attach_bpf_fd, tcp);
PRINT_FIELD_XVAL_INDEX(", ", attr, attach_type, bpf_attach_type,
"BPF_???");
PRINT_FIELD_XVAL(", ", attr, attach_type, bpf_attach_type, "BPF_???");
PRINT_FIELD_FLAGS(", ", attr, attach_flags, bpf_attach_flags,
"BPF_F_???");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_PROG_DETACH)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_PROG_DETACH)
{
struct {
uint32_t target_fd, dummy, attach_type;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{", attr, target_fd, tcp);
PRINT_FIELD_XVAL_INDEX(", ", attr, attach_type, bpf_attach_type,
"BPF_???");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
PRINT_FIELD_XVAL(", ", attr, attach_type, bpf_attach_type, "BPF_???");
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_PROG_TEST_RUN)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_PROG_TEST_RUN)
{
struct {
uint32_t prog_fd, retval, data_size_in, data_size_out;
uint64_t ATTRIBUTE_ALIGNED(8) data_in, data_out;
uint32_t repeat, duration;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_FD("{test={", attr, prog_fd, tcp);
PRINT_FIELD_U(", ", attr, retval);
PRINT_FIELD_U(", ", attr, data_size_in);
PRINT_FIELD_U(", ", attr, data_size_out);
PRINT_FIELD_ADDR64(", ", attr, data_in);
PRINT_FIELD_ADDR64(", ", attr, data_out);
PRINT_FIELD_X(", ", attr, data_in);
PRINT_FIELD_X(", ", attr, data_out);
PRINT_FIELD_U(", ", attr, repeat);
PRINT_FIELD_U(", ", attr, duration);
tprints("}");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_NEXT_ID)
return RVAL_DECODED;
}
DEF_BPF_CMD_DECODER(BPF_PROG_GET_NEXT_ID)
{
struct {
uint32_t start_id, next_id;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_U("{", attr, start_id);
PRINT_FIELD_U(", ", attr, next_id);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
/* open_flags field has been added in Linux v4.15-rc1~84^2~384^2~4 */
if (len <= offsetof(struct BPF_PROG_GET_NEXT_ID_struct, open_flags))
break;
PRINT_FIELD_FLAGS(", ", attr, open_flags, bpf_file_mode_flags,
"BPF_F_???");
return RVAL_DECODED;
}
END_BPF_CMD_DECODER(RVAL_DECODED)
#define decode_BPF_MAP_GET_NEXT_ID decode_BPF_PROG_GET_NEXT_ID
BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_FD_BY_ID)
DEF_BPF_CMD_DECODER(BPF_PROG_GET_FD_BY_ID)
{
struct {
uint32_t prog_id, next_id;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_U("{", attr, prog_id);
PRINT_FIELD_U(", ", attr, next_id);
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
/* open_flags field has been added in Linux v4.15-rc1~84^2~384^2~4 */
if (len <= offsetof(struct BPF_PROG_GET_FD_BY_ID_struct, open_flags))
break;
PRINT_FIELD_FLAGS(", ", attr, open_flags, bpf_file_mode_flags,
"BPF_F_???");
return RVAL_DECODED;
}
END_BPF_CMD_DECODER(RVAL_DECODED)
BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID)
DEF_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID)
{
struct {
uint32_t map_id, next_id;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&attr, data, len);
PRINT_FIELD_U("{", attr, map_id);
PRINT_FIELD_U(", ", attr, next_id);
/* open_flags field has been added in Linux v4.15-rc1~84^2~384^2~4 */
if (len <= offsetof(struct BPF_MAP_GET_FD_BY_ID_struct, open_flags))
break;
PRINT_FIELD_FLAGS(", ", attr, open_flags, bpf_file_mode_flags,
"BPF_F_???");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
struct obj_get_info_saved;
typedef void (*print_bpf_obj_info_fn)(struct tcb *,
uint32_t bpf_fd,
const char *info_buf,
uint32_t size,
struct obj_get_info_saved *saved);
struct obj_get_info_saved {
print_bpf_obj_info_fn print_fn;
uint32_t info_len;
uint32_t jited_prog_len;
uint32_t xlated_prog_len;
uint32_t nr_map_ids;
};
static void
print_bpf_map_info(struct tcb * const tcp, uint32_t bpf_fd,
const char *info_buf, uint32_t size,
struct obj_get_info_saved *saved)
{
if (entering(tcp))
return;
struct bpf_map_info_struct info = { 0 };
const unsigned int len = MIN(size, bpf_map_info_struct_size);
memcpy(&info, info_buf, len);
PRINT_FIELD_XVAL("{", info, type, bpf_map_types, "BPF_MAP_TYPE_???");
PRINT_FIELD_U(", ", info, id);
PRINT_FIELD_U(", ", info, key_size);
PRINT_FIELD_U(", ", info, value_size);
PRINT_FIELD_U(", ", info, max_entries);
PRINT_FIELD_FLAGS(", ", info, map_flags, bpf_map_flags, "BPF_F_???");
/*
* "name" field was introduced by Linux commit v4.15-rc1~84^2~605^2~3.
*/
if (len <= offsetof(struct bpf_map_info_struct, name))
goto print_bpf_map_info_end;
PRINT_FIELD_CSTRING(", ", info, name);
/*
* ifindex, netns_dev, and netns_ino fields were introduced
* by Linux commit v4.16-rc1~123^2~109^2~5^2~4.
*/
if (len <= offsetof(struct bpf_map_info_struct, ifindex))
goto print_bpf_map_info_end;
PRINT_FIELD_IFINDEX(", ", info, ifindex);
PRINT_FIELD_DEV(", ", info, netns_dev);
PRINT_FIELD_U(", ", info, netns_ino);
decode_attr_extra_data(tcp, info_buf, size, bpf_map_info_struct_size);
print_bpf_map_info_end:
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
return RVAL_DECODED;
}
static void
print_bpf_prog_info(struct tcb * const tcp, uint32_t bpf_fd,
const char *info_buf, uint32_t size,
struct obj_get_info_saved *saved)
DEF_BPF_CMD_DECODER(BPF_OBJ_GET_INFO_BY_FD)
{
struct bpf_prog_info_struct info = { 0 };
const unsigned int len = MIN(size, bpf_prog_info_struct_size);
uint64_t map_id_buf;
struct {
uint32_t bpf_fd, info_len;
uint64_t ATTRIBUTE_ALIGNED(8) info;
} attr = {};
const unsigned int len = size < sizeof(attr) ? size : sizeof(attr);
memcpy(&info, info_buf, len);
memcpy(&attr, data, len);
if (entering(tcp)) {
saved->jited_prog_len = info.jited_prog_len;
saved->xlated_prog_len = info.xlated_prog_len;
saved->nr_map_ids = info.nr_map_ids;
return;
}
PRINT_FIELD_XVAL("{", info, type, bpf_prog_types, "BPF_PROG_TYPE_???");
PRINT_FIELD_U(", ", info, id);
PRINT_FIELD_HEX_ARRAY(", ", info, tag);
tprints(", jited_prog_len=");
if (saved->jited_prog_len != info.jited_prog_len)
tprintf("%" PRIu32 " => ", saved->jited_prog_len);
tprintf("%" PRIu32, info.jited_prog_len);
tprints(", jited_prog_insns=");
print_big_u64_addr(info.jited_prog_insns);
printstr_ex(tcp, info.jited_prog_insns, info.jited_prog_len,
QUOTE_FORCE_HEX);
tprints(", xlated_prog_len=");
if (saved->xlated_prog_len != info.xlated_prog_len)
tprintf("%" PRIu32 " => ", saved->xlated_prog_len);
tprintf("%" PRIu32, info.xlated_prog_len);
tprints(", xlated_prog_insns=");
print_ebpf_prog(tcp, info.xlated_prog_insns,
MIN(saved->xlated_prog_len, info.xlated_prog_len) / 8);
/*
* load_time, created_by_uid, nr_map_ids, map_ids, and name fields
* were introduced by Linux commit v4.15-rc1~84^2~605^2~4.
*/
if (len <= offsetof(struct bpf_prog_info_struct, load_time))
goto print_bpf_prog_info_end;
PRINT_FIELD_U(", ", info, load_time);
PRINT_FIELD_UID(", ", info, created_by_uid);
tprints(", nr_map_ids=");
if (saved->nr_map_ids != info.nr_map_ids)
tprintf("%" PRIu32 " => ", saved->nr_map_ids);
tprintf("%" PRIu32, info.nr_map_ids);
tprints(", map_ids=");
print_big_u64_addr(info.map_ids);
print_array(tcp, info.map_ids, MIN(saved->nr_map_ids, info.nr_map_ids),
&map_id_buf, sizeof(map_id_buf),
tfetch_mem, print_uint32_array_member, 0);
PRINT_FIELD_CSTRING(", ", info, name);
/*
* ifindex, netns_dev, and netns_ino fields were introduced
* by Linux commit v4.16-rc1~123^2~227^2~5^2~2.
*/
if (len <= offsetof(struct bpf_prog_info_struct, ifindex))
goto print_bpf_prog_info_end;
PRINT_FIELD_IFINDEX(", ", info, ifindex);
PRINT_FIELD_DEV(", ", info, netns_dev);
PRINT_FIELD_U(", ", info, netns_ino);
decode_attr_extra_data(tcp, info_buf, size, bpf_prog_info_struct_size);
print_bpf_prog_info_end:
PRINT_FIELD_FD("{info={", attr, bpf_fd, tcp);
PRINT_FIELD_U(", ", attr, info_len);
PRINT_FIELD_X(", ", attr, info);
tprints("}");
}
static const char *
fetch_bpf_obj_info(struct tcb * const tcp, uint64_t info, uint32_t size)
{
static char *info_buf;
if (!info_buf)
info_buf = xmalloc(get_pagesize());
memset(info_buf, 0, get_pagesize());
if (size > 0 && size <= get_pagesize()
&& !umoven(tcp, info, size, info_buf))
return info_buf;
return NULL;
}
static void
print_bpf_obj_info_addr(struct tcb * const tcp, uint64_t addr)
{
if (exiting(tcp))
printaddr64(addr);
}
static void
print_bpf_obj_info(struct tcb * const tcp, uint32_t bpf_fd, uint64_t info,
uint32_t size, struct obj_get_info_saved *saved)
{
if (abbrev(tcp)) {
print_bpf_obj_info_addr(tcp, info);
return;
}
static struct {
const char *id;
print_bpf_obj_info_fn print_fn;
} obj_printers[] = {
{ "anon_inode:bpf-map", print_bpf_map_info },
{ "anon_inode:bpf-prog", print_bpf_prog_info }
};
if (entering(tcp)) {
char path[PATH_MAX + 1];
if (getfdpath(tcp, bpf_fd, path, sizeof(path)) > 0) {
for (size_t i = 0; i < ARRAY_SIZE(obj_printers); ++i) {
if (!strcmp(path, obj_printers[i].id)) {
saved->print_fn =
obj_printers[i].print_fn;
break;
}
}
}
}
if (!saved || !saved->print_fn) {
print_bpf_obj_info_addr(tcp, info);
return;
}
const char *info_buf = fetch_bpf_obj_info(tcp, info, size);
if (info_buf)
saved->print_fn(tcp, bpf_fd, info_buf, size, saved);
else
print_bpf_obj_info_addr(tcp, info);
}
BEGIN_BPF_CMD_DECODER(BPF_OBJ_GET_INFO_BY_FD)
{
struct obj_get_info_saved *saved;
if (entering(tcp)) {
saved = xcalloc(1, sizeof(*saved));
saved->info_len = attr.info_len;
set_tcb_priv_data(tcp, saved, free);
PRINT_FIELD_FD("{info={", attr, bpf_fd, tcp);
PRINT_FIELD_U(", ", attr, info_len);
} else {
saved = get_tcb_priv_data(tcp);
if (saved && (saved->info_len != attr.info_len))
tprintf(" => %u", attr.info_len);
tprintf(", info=");
}
print_bpf_obj_info(tcp, attr.bpf_fd, attr.info, attr.info_len, saved);
if (entering(tcp))
return 0;
decode_attr_extra_data(tcp, data, size, sizeof(attr));
tprints("}");
return RVAL_DECODED | RVAL_FD;
}
END_BPF_CMD_DECODER(RVAL_DECODED)
BEGIN_BPF_CMD_DECODER(BPF_PROG_QUERY)
{
uint32_t prog_id_buf;
if (entering(tcp)) {
PRINT_FIELD_FD("{query={", attr, target_fd, tcp);
PRINT_FIELD_XVAL_INDEX(", ", attr, attach_type, bpf_attach_type,
"BPF_???");
PRINT_FIELD_FLAGS(", ", attr, query_flags, bpf_query_flags,
"BPF_F_QUERY_???");
PRINT_FIELD_FLAGS(", ", attr, attach_flags, bpf_attach_flags,
"BPF_F_???");
tprints(", prog_ids=");
set_tcb_priv_ulong(tcp, attr.prog_cnt);
return 0;
}
print_big_u64_addr(attr.prog_ids);
print_array(tcp, attr.prog_ids, attr.prog_cnt, &prog_id_buf,
sizeof(prog_id_buf), tfetch_mem,
print_uint32_array_member, 0);
tprints(", prog_cnt=");
const uint32_t prog_cnt_entering = get_tcb_priv_ulong(tcp);
if (prog_cnt_entering != attr.prog_cnt)
tprintf("%" PRIu32 " => ", prog_cnt_entering);
tprintf("%" PRIu32, attr.prog_cnt);
tprints("}");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
BEGIN_BPF_CMD_DECODER(BPF_RAW_TRACEPOINT_OPEN)
{
enum { TP_NAME_SIZE = 128 };
tprintf("{raw_tracepoint={name=");
print_big_u64_addr(attr.name);
printstr_ex(tcp, attr.name, TP_NAME_SIZE, QUOTE_0_TERMINATED);
PRINT_FIELD_FD(", ", attr, prog_fd, tcp);
tprints("}");
}
END_BPF_CMD_DECODER(RVAL_DECODED)
SYS_FUNC(bpf)
{
@ -726,36 +398,41 @@ SYS_FUNC(bpf)
BPF_CMD_ENTRY(BPF_PROG_GET_FD_BY_ID),
BPF_CMD_ENTRY(BPF_MAP_GET_FD_BY_ID),
BPF_CMD_ENTRY(BPF_OBJ_GET_INFO_BY_FD),
BPF_CMD_ENTRY(BPF_PROG_QUERY),
BPF_CMD_ENTRY(BPF_RAW_TRACEPOINT_OPEN),
};
const unsigned int cmd = tcp->u_arg[0];
const kernel_ulong_t addr = tcp->u_arg[1];
const unsigned int size = tcp->u_arg[2];
int rc = RVAL_DECODED;
int rc;
if (entering(tcp)) {
printxval_index(bpf_commands, cmd, "BPF_???");
tprints(", ");
}
if (size > 0
&& size <= get_pagesize()
&& cmd < ARRAY_SIZE(bpf_cmd_decoders)
&& bpf_cmd_decoders[cmd]) {
static size_t page_size;
static char *buf;
if (!buf)
buf = xmalloc(get_pagesize());
if (!buf) {
page_size = get_pagesize();
buf = xmalloc(page_size);
}
if (!umoven_or_printaddr_ignore_syserror(tcp, addr, size, buf))
rc = bpf_cmd_decoders[cmd](tcp, addr, size, buf);
printxval(bpf_commands, cmd, "BPF_???");
tprints(", ");
if (size > 0
&& size <= get_pagesize()
&& cmd < ARRAY_SIZE(bpf_cmd_decoders)
&& bpf_cmd_decoders[cmd]) {
rc = umoven_or_printaddr(tcp, addr, size, buf)
? RVAL_DECODED
: bpf_cmd_decoders[cmd](tcp, addr, size, buf);
} else {
printaddr(addr);
rc = RVAL_DECODED;
}
} else {
printaddr(addr);
rc = bpf_cmd_decoders[cmd](tcp, addr, size, NULL) | RVAL_DECODED;
}
if (exiting(tcp) || (rc & RVAL_DECODED))
if (rc & RVAL_DECODED)
tprintf(", %u", size);
return rc;

View File

@ -1,294 +0,0 @@
/*
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STRACE_BPF_ATTR_H
#define STRACE_BPF_ATTR_H
/*
* The policy is that all fields of type uint64_t in this header file
* must have ATTRIBUTE_ALIGNED(8).
*
* This should not cause any contradictions with <linux/bpf.h>
* unless the latter is buggy.
*
* By word "buggy" I mean containing such changes as Linux kernel commit
* 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"
# endif
#endif
#ifndef BPF_TAG_SIZE
# define BPF_TAG_SIZE 8
#else
# if BPF_TAG_SIZE != 8
# error "Unexpected value of BPF_TAG_SIZE"
# endif
#endif
struct BPF_MAP_CREATE_struct {
uint32_t map_type;
uint32_t key_size;
uint32_t value_size;
uint32_t max_entries;
uint32_t map_flags;
uint32_t inner_map_fd;
uint32_t numa_node;
char map_name[BPF_OBJ_NAME_LEN];
uint32_t map_ifindex;
};
#define BPF_MAP_CREATE_struct_size \
sizeof(struct BPF_MAP_CREATE_struct)
#define expected_BPF_MAP_CREATE_struct_size 48
struct BPF_MAP_LOOKUP_ELEM_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
uint64_t ATTRIBUTE_ALIGNED(8) value;
};
#define BPF_MAP_LOOKUP_ELEM_struct_size \
sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
struct BPF_MAP_UPDATE_ELEM_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
uint64_t ATTRIBUTE_ALIGNED(8) value;
uint64_t ATTRIBUTE_ALIGNED(8) flags;
};
#define BPF_MAP_UPDATE_ELEM_struct_size \
sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
#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 \
sizeof(struct BPF_MAP_DELETE_ELEM_struct)
#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
struct BPF_MAP_GET_NEXT_KEY_struct {
uint32_t map_fd;
uint64_t ATTRIBUTE_ALIGNED(8) key;
uint64_t ATTRIBUTE_ALIGNED(8) next_key;
};
#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
struct BPF_PROG_LOAD_struct {
uint32_t prog_type;
uint32_t insn_cnt;
uint64_t ATTRIBUTE_ALIGNED(8) insns;
uint64_t ATTRIBUTE_ALIGNED(8) license;
uint32_t log_level;
uint32_t log_size;
uint64_t ATTRIBUTE_ALIGNED(8) log_buf;
uint32_t kern_version;
uint32_t prog_flags;
char prog_name[BPF_OBJ_NAME_LEN];
uint32_t prog_ifindex;
uint32_t expected_attach_type;
};
#define BPF_PROG_LOAD_struct_size \
offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
#define expected_BPF_PROG_LOAD_struct_size 72
struct BPF_OBJ_PIN_struct {
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
uint32_t bpf_fd;
uint32_t file_flags;
};
#define BPF_OBJ_PIN_struct_size \
sizeof(struct BPF_OBJ_PIN_struct)
#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
struct BPF_PROG_ATTACH_struct {
uint32_t target_fd;
uint32_t attach_bpf_fd;
uint32_t attach_type;
uint32_t attach_flags;
};
#define BPF_PROG_ATTACH_struct_size \
sizeof(struct BPF_PROG_ATTACH_struct)
#define expected_BPF_PROG_ATTACH_struct_size 16
struct BPF_PROG_DETACH_struct {
uint32_t target_fd;
uint32_t dummy;
uint32_t attach_type;
};
#define BPF_PROG_DETACH_struct_size \
sizeof(struct BPF_PROG_DETACH_struct)
#define expected_BPF_PROG_DETACH_struct_size 12
struct BPF_PROG_TEST_RUN_struct /* test */ {
uint32_t prog_fd;
uint32_t retval;
uint32_t data_size_in;
uint32_t data_size_out;
uint64_t ATTRIBUTE_ALIGNED(8) data_in;
uint64_t ATTRIBUTE_ALIGNED(8) data_out;
uint32_t repeat;
uint32_t duration;
};
#define BPF_PROG_TEST_RUN_struct_size \
sizeof(struct BPF_PROG_TEST_RUN_struct)
#define expected_BPF_PROG_TEST_RUN_struct_size 40
struct BPF_PROG_GET_NEXT_ID_struct {
uint32_t start_id;
uint32_t next_id;
uint32_t open_flags;
};
#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 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;
uint32_t next_id;
uint32_t open_flags;
};
#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
struct BPF_MAP_GET_FD_BY_ID_struct {
uint32_t map_id;
uint32_t next_id;
uint32_t open_flags;
};
#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
struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
uint32_t bpf_fd;
uint32_t info_len;
uint64_t ATTRIBUTE_ALIGNED(8) info;
};
#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
struct BPF_PROG_QUERY_struct /* query */ {
uint32_t target_fd;
uint32_t attach_type;
uint32_t query_flags;
uint32_t attach_flags;
uint64_t ATTRIBUTE_ALIGNED(8) prog_ids;
uint32_t prog_cnt;
};
#define BPF_PROG_QUERY_struct_size \
offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
#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 \
offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
struct bpf_map_info_struct {
uint32_t type;
uint32_t id;
uint32_t key_size;
uint32_t value_size;
uint32_t max_entries;
uint32_t map_flags;
char name[BPF_OBJ_NAME_LEN];
uint32_t ifindex;
/*
* The kernel UAPI is broken by Linux commit
* v4.16-rc1~123^2~109^2~5^2~4 .
*/
uint64_t ATTRIBUTE_ALIGNED(8) netns_dev; /* skip check */
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
};
#define bpf_map_info_struct_size \
sizeof(struct bpf_map_info_struct)
#define expected_bpf_map_info_struct_size 64
struct bpf_prog_info_struct {
uint32_t type;
uint32_t id;
uint8_t tag[BPF_TAG_SIZE];
uint32_t jited_prog_len;
uint32_t xlated_prog_len;
uint64_t ATTRIBUTE_ALIGNED(8) jited_prog_insns;
uint64_t ATTRIBUTE_ALIGNED(8) xlated_prog_insns;
uint64_t ATTRIBUTE_ALIGNED(8) load_time;
uint32_t created_by_uid;
uint32_t nr_map_ids;
uint64_t ATTRIBUTE_ALIGNED(8) map_ids;
char name[BPF_OBJ_NAME_LEN];
uint32_t ifindex;
/*
* The kernel UAPI is broken by Linux commit
* v4.16-rc1~123^2~227^2~5^2~2 .
*/
uint64_t ATTRIBUTE_ALIGNED(8) netns_dev; /* skip check */
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
};
#define bpf_prog_info_struct_size \
sizeof(struct bpf_prog_info_struct)
#define expected_bpf_prog_info_struct_size 104
#endif /* !STRACE_BPF_ATTR_H */

View File

@ -2,7 +2,6 @@
* Decoder of classic BPF programs.
*
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2017-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -34,7 +33,6 @@
#include "bpf_fprog.h"
#include <linux/filter.h>
#include "xlat/bpf_class.h"
#include "xlat/bpf_miscop.h"
#include "xlat/bpf_mode.h"
@ -44,45 +42,49 @@
#include "xlat/bpf_size.h"
#include "xlat/bpf_src.h"
#include "xlat/ebpf_class.h"
#include "xlat/ebpf_mode.h"
#include "xlat/ebpf_op_alu.h"
#include "xlat/ebpf_op_jmp.h"
#include "xlat/ebpf_size.h"
void
print_bpf_filter_code(const uint16_t code, bool extended)
static void
print_bpf_filter_code(const uint16_t code)
{
const struct xlat *mode = extended ? ebpf_mode : bpf_mode;
uint16_t i = code & ~BPF_CLASS(code);
if (extended)
printxval_index(ebpf_class, BPF_CLASS(code), "BPF_???");
else
printxval_index(bpf_class, BPF_CLASS(code), "BPF_???");
printxval(bpf_class, BPF_CLASS(code), "BPF_???");
switch (BPF_CLASS(code)) {
case BPF_ST:
case BPF_STX:
if (!extended) {
case BPF_LD:
case BPF_LDX:
tprints("|");
printxval(bpf_size, BPF_SIZE(code), "BPF_???");
tprints("|");
printxval(bpf_mode, BPF_MODE(code), "BPF_???");
break;
case BPF_ST:
case BPF_STX:
if (i) {
tprintf("|%#x", i);
tprints_comment("BPF_???");
}
break;
}
ATTRIBUTE_FALLTHROUGH; /* extended == true */
case BPF_LD:
case BPF_LDX:
tprints("|");
printxvals(BPF_SIZE(code), "BPF_???",
bpf_size, extended ? ebpf_size : NULL, NULL);
tprints("|");
printxval(mode, BPF_MODE(code), "BPF_???");
break;
case BPF_MISC: /* BPF_ALU64 in eBPF */
if (!extended) {
case BPF_ALU:
tprints("|");
printxval(bpf_src, BPF_SRC(code), "BPF_???");
tprints("|");
printxval(bpf_op_alu, BPF_OP(code), "BPF_???");
break;
case BPF_JMP:
tprints("|");
printxval(bpf_src, BPF_SRC(code), "BPF_???");
tprints("|");
printxval(bpf_op_jmp, BPF_OP(code), "BPF_???");
break;
case BPF_RET:
tprints("|");
printxval(bpf_rval, BPF_RVAL(code), "BPF_???");
i &= ~BPF_RVAL(code);
if (i) {
tprintf("|%#x", i);
tprints_comment("BPF_???");
}
break;
case BPF_MISC:
tprints("|");
printxval(bpf_miscop, BPF_MISCOP(code), "BPF_???");
i &= ~BPF_MISCOP(code);
@ -91,39 +93,6 @@ print_bpf_filter_code(const uint16_t code, bool extended)
tprints_comment("BPF_???");
}
break;
}
ATTRIBUTE_FALLTHROUGH; /* extended == true */
case BPF_ALU:
tprints("|");
printxval(bpf_src, BPF_SRC(code), "BPF_???");
tprints("|");
printxvals(BPF_OP(code), "BPF_???",
bpf_op_alu,
extended ? ebpf_op_alu : NULL, NULL);
break;
case BPF_JMP:
tprints("|");
printxval(bpf_src, BPF_SRC(code), "BPF_???");
tprints("|");
printxvals(BPF_OP(code), "BPF_???",
bpf_op_jmp, extended ? ebpf_op_jmp : NULL, NULL);
break;
case BPF_RET: /* Reserved in eBPF */
if (!extended) {
tprints("|");
printxval(bpf_rval, BPF_RVAL(code), "BPF_???");
i &= ~BPF_RVAL(code);
}
if (i) {
tprintf("|%#x", i);
tprints_comment("BPF_???");
}
break;
}
}
@ -132,7 +101,7 @@ print_bpf_filter_stmt(const struct bpf_filter_block *const filter,
const print_bpf_filter_fn print_k)
{
tprints("BPF_STMT(");
print_bpf_filter_code(filter->code, false);
print_bpf_filter_code(filter->code);
tprints(", ");
if (!print_k || !print_k(filter))
tprintf("%#x", filter->k);
@ -143,7 +112,7 @@ static void
print_bpf_filter_jump(const struct bpf_filter_block *const filter)
{
tprints("BPF_JUMP(");
print_bpf_filter_code(filter->code, false);
print_bpf_filter_code(filter->code);
tprintf(", %#x, %#x, %#x)", filter->k, filter->jt, filter->jf);
}
@ -183,7 +152,7 @@ print_bpf_fprog(struct tcb *const tcp, const kernel_ulong_t addr,
struct bpf_filter_block filter;
print_array(tcp, addr, len, &filter, sizeof(filter),
tfetch_mem, print_bpf_filter_block, &fbd);
umoven_or_printaddr, print_bpf_filter_block, &fbd);
}
}

View File

@ -2,7 +2,6 @@
* Decoder of socket filter programs.
*
* Copyright (c) 2017 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2017-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -34,25 +33,23 @@
#include <linux/filter.h>
#include "xlat/skf_ad.h"
#include "xlat/skf_off.h"
static bool
print_sock_filter_k(const struct bpf_filter_block *const fp)
{
if (BPF_CLASS(fp->code) == BPF_LD && BPF_MODE(fp->code) == BPF_ABS) {
if (fp->k >= (unsigned int) SKF_AD_OFF) {
print_xlat32(SKF_AD_OFF);
tprints("+");
tprints("SKF_AD_OFF+");
printxval(skf_ad, fp->k - (unsigned int) SKF_AD_OFF,
"SKF_AD_???");
return true;
} else if (fp->k >= (unsigned int) SKF_NET_OFF) {
print_xlat32(SKF_NET_OFF);
tprintf("+%u", fp->k - (unsigned int) SKF_NET_OFF);
tprintf("%s+%u", "SKF_NET_OFF",
fp->k - (unsigned int) SKF_NET_OFF);
return true;
} else if (fp->k >= (unsigned int) SKF_LL_OFF) {
print_xlat32(SKF_LL_OFF);
tprintf("+%u", fp->k - (unsigned int) SKF_LL_OFF);
tprintf("%s+%u", "SKF_LL_OFF",
fp->k - (unsigned int) SKF_LL_OFF);
return true;
}
}

603
btrfs.c
View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016 Jeff Mahoney <jeffm@suse.com>
* Copyright (c) 2016-2018 The strace developers.
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -84,6 +84,10 @@ struct btrfs_ioctl_defrag_range_args {
# define BTRFS_LABEL_SIZE 256
#endif
#ifndef BTRFS_FIRST_FREE_OBJECTID
# define BTRFS_FIRST_FREE_OBJECTID 256ULL
#endif
#ifndef BTRFS_IOC_QUOTA_RESCAN
struct btrfs_ioctl_quota_rescan_args {
uint64_t flags, progress, reserved[6];
@ -124,7 +128,6 @@ struct btrfs_ioctl_search_args_v2 {
#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"
@ -135,7 +138,6 @@ struct btrfs_ioctl_search_args_v2 {
#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"
@ -175,21 +177,31 @@ btrfs_unparse_uuid(unsigned char *uuid, char *out)
return ret;
}
static void
print_u64(const char *name, uint64_t value)
{
tprintf(", %s=%" PRIu64, name, value);
if (value == UINT64_MAX)
tprints_comment("UINT64_MAX");
}
#define print_member_u64(obj, name) print_u64(#name, obj->name)
static void
btrfs_print_balance_args(const char *name, const struct btrfs_balance_args *bba)
{
tprintf(", %s=", name);
PRINT_FIELD_FLAGS("{", *bba, profiles, btrfs_space_info_flags,
"BTRFS_BLOCK_GROUP_???");
PRINT_FIELD_U64(", ", *bba, usage);
PRINT_FIELD_DEV(", ", *bba, devid);
PRINT_FIELD_U64(", ", *bba, pstart);
PRINT_FIELD_U64(", ", *bba, pend);
PRINT_FIELD_U64(", ", *bba, vstart);
PRINT_FIELD_U64(", ", *bba, vend);
PRINT_FIELD_U64(", ", *bba, target);
PRINT_FIELD_FLAGS(", ", *bba, flags, btrfs_balance_args,
"BTRFS_BALANCE_ARGS_???");
tprintf(", %s={profiles=", name);
printflags64(btrfs_space_info_flags, bba->profiles,
"BTRFS_BLOCK_GROUP_???");
print_member_u64(bba, usage);
print_member_u64(bba, devid);
print_member_u64(bba, pstart);
print_member_u64(bba, pend);
print_member_u64(bba, vstart);
print_member_u64(bba, vend);
print_member_u64(bba, target);
tprints(", flags=");
printflags64(btrfs_balance_args, bba->flags, "BTRFS_BALANCE_ARGS_???");
tprints("}");
}
@ -201,12 +213,14 @@ btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out)
if (umove_or_printaddr(tcp, arg, &balance_args))
return;
PRINT_FIELD_FLAGS("{", balance_args, flags, btrfs_balance_flags,
"BTRFS_BALANCE_???");
if (out)
PRINT_FIELD_FLAGS(", ", balance_args, state,
btrfs_balance_state,
"BTRFS_BALANCE_STATE_???");
tprints("{flags=");
printflags64(btrfs_balance_flags, balance_args.flags,
"BTRFS_BALANCE_???");
if (out) {
tprints(", state=");
printflags64(btrfs_balance_state, balance_args.state,
"BTRFS_BALANCE_STATE_???");
}
if (balance_args.flags & BTRFS_BALANCE_DATA)
btrfs_print_balance_args("data", &balance_args.data);
@ -220,41 +234,53 @@ btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out)
static void
btrfs_print_features(const struct btrfs_ioctl_feature_flags *flags)
{
PRINT_FIELD_FLAGS("{", *flags, compat_flags, btrfs_features_compat,
"BTRFS_FEATURE_COMPAT_???");
PRINT_FIELD_FLAGS(", ", *flags, compat_ro_flags,
btrfs_features_compat_ro,
"BTRFS_FEATURE_COMPAT_RO_???");
PRINT_FIELD_FLAGS(", ", *flags, incompat_flags, btrfs_features_incompat,
"BTRFS_FEATURE_INCOMPAT_???");
tprints("{compat_flags=");
printflags64(btrfs_features_compat, flags->compat_flags,
"BTRFS_FEATURE_COMPAT_???");
tprints(", compat_ro_flags=");
printflags64(btrfs_features_compat_ro, flags->compat_ro_flags,
"BTRFS_FEATURE_COMPAT_RO_???");
tprints(", incompat_flags=");
printflags64(btrfs_features_incompat, flags->incompat_flags,
"BTRFS_FEATURE_INCOMPAT_???");
tprints("}");
}
static void
btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
{
PRINT_FIELD_FLAGS(", lim={", *lim, flags, btrfs_qgroup_limit_flags,
"BTRFS_QGROUP_LIMIT_???");
PRINT_FIELD_U(", ", *lim, max_rfer);
PRINT_FIELD_U(", ", *lim, max_excl);
PRINT_FIELD_U(", ", *lim, rsv_rfer);
PRINT_FIELD_U(", ", *lim, rsv_excl);
tprints("}");
tprints("{flags=");
printflags64(btrfs_qgroup_limit_flags, lim->flags,
"BTRFS_QGROUP_LIMIT_???");
tprintf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64
", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 "}",
lim->max_rfer, lim->max_excl,
lim->rsv_rfer, lim->rsv_excl);
}
#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_) \
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
NULL)
static void
btrfs_print_key_type(uint32_t type)
{
tprintf("%u", type);
tprints_comment(xlookup(btrfs_key_types, type));
}
static void
btrfs_print_objectid(uint64_t objectid)
{
tprintf("%" PRIu64, objectid);
tprints_comment(xlookup(btrfs_tree_objectids, objectid));
}
static void
btrfs_print_data_container_header(const struct btrfs_data_container *container)
{
PRINT_FIELD_U("{", *container, bytes_left);
PRINT_FIELD_U(", ", *container, bytes_missing);
PRINT_FIELD_U(", ", *container, elem_cnt);
PRINT_FIELD_U(", ", *container, elem_missed);
tprintf("{bytes_left=%u, bytes_missing=%u"
", elem_cnt=%u, elem_missed=%u, val=",
container->bytes_left, container->bytes_missing,
container->elem_cnt, container->elem_missed);
}
static void
@ -267,16 +293,10 @@ static bool
print_btrfs_data_container_logical_ino(struct tcb *tcp, void *elem_buf,
size_t elem_size, void *data)
{
const struct {
uint64_t inum;
uint64_t offset;
uint64_t root;
} *const record = elem_buf;
const uint64_t *const record = elem_buf;
PRINT_FIELD_U("{", *record, inum);
PRINT_FIELD_U(", ", *record, offset);
PRINT_FIELD_U(", ", *record, root);
tprints("}");
tprintf("{inum=%" PRIu64 ", offset=%" PRIu64 ", root=%" PRIu64 "}",
record[0], record[1], record[2]);
return true;
}
@ -293,15 +313,14 @@ btrfs_print_logical_ino_container(struct tcb *tcp,
btrfs_print_data_container_header(&container);
if (abbrev(tcp)) {
tprints(", ...");
tprints("...");
} else {
const uint64_t val_addr =
inodes_addr + offsetof(typeof(container), val);
uint64_t record[3];
tprints(", val=");
print_array(tcp, val_addr, container.elem_cnt / 3,
record, sizeof(record),
tfetch_mem,
umoven_or_printaddr,
print_btrfs_data_container_logical_ino, 0);
}
@ -332,21 +351,28 @@ btrfs_print_ino_path_container(struct tcb *tcp,
btrfs_print_data_container_header(&container);
if (abbrev(tcp)) {
tprints(", ...");
tprints("...");
} else {
uint64_t val_addr =
fspath_addr + offsetof(typeof(container), val);
uint64_t offset;
tprints(", val=");
print_array(tcp, val_addr, container.elem_cnt,
&offset, sizeof(offset),
tfetch_mem,
umoven_or_printaddr,
print_btrfs_data_container_ino_path, &val_addr);
}
btrfs_print_data_container_footer();
}
static bool
print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
{
tprintf("%" PRIu64, *(uint64_t *) elem_buf);
return true;
}
static void
btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
{
@ -355,84 +381,101 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
if (umove_or_printaddr(tcp, qgi_addr, &inherit))
return;
PRINT_FIELD_FLAGS("{", inherit, flags, btrfs_qgroup_inherit_flags,
"BTRFS_QGROUP_INHERIT_???");
PRINT_FIELD_U(", ", inherit, num_qgroups);
PRINT_FIELD_U(", ", inherit, num_ref_copies);
PRINT_FIELD_U(", ", inherit, num_excl_copies);
tprints("{flags=");
printflags64(btrfs_qgroup_inherit_flags, inherit.flags,
"BTRFS_QGROUP_INHERIT_???");
tprintf(", num_qgroups=%" PRI__u64 ", num_ref_copies=%" PRI__u64
", num_excl_copies=%" PRI__u64 ", lim=",
inherit.num_qgroups, inherit.num_ref_copies,
inherit.num_excl_copies);
btrfs_print_qgroup_limit(&inherit.lim);
tprints(", qgroups=");
if (abbrev(tcp)) {
tprints(", ...");
tprints("...");
} else {
uint64_t record;
tprints(", qgroups=");
print_array(tcp, qgi_addr + offsetof(typeof(inherit), qgroups),
inherit.num_qgroups, &record, sizeof(record),
tfetch_mem, print_uint64_array_member, 0);
umoven_or_printaddr, print_uint64, 0);
}
tprints("}");
}
static void
print_key_value_internal(struct tcb *tcp, const char *name, uint64_t value)
{
if (value) {
tprintf(", %s=%" PRIu64, name, value);
if (value == UINT64_MAX)
tprints_comment("UINT64_MAX");
}
}
#define print_key_value(tcp, key, name) \
print_key_value_internal((tcp), #name, (key)->name)
static void
btrfs_print_tree_search(struct tcb *tcp, struct btrfs_ioctl_search_key *key,
uint64_t buf_addr, uint64_t buf_size, bool print_size)
{
if (entering(tcp)) {
btrfs_print_objectid("{key={", *key, tree_id);
tprints("{key={tree_id=");
btrfs_print_objectid(key->tree_id);
if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID ||
!abbrev(tcp))
btrfs_print_objectid(", ", *key, min_objectid);
!abbrev(tcp)) {
tprints(", min_objectid=");
btrfs_print_objectid(key->min_objectid);
}
if (key->max_objectid != BTRFS_LAST_FREE_OBJECTID ||
!abbrev(tcp))
btrfs_print_objectid(", ", *key, max_objectid);
!abbrev(tcp)) {
tprints(", max_objectid=");
btrfs_print_objectid(key->max_objectid);
}
PRINT_FIELD_U64(", ", *key, min_offset);
PRINT_FIELD_U64(", ", *key, max_offset);
PRINT_FIELD_U64(", ", *key, min_transid);
PRINT_FIELD_U64(", ", *key, max_transid);
print_key_value(tcp, key, min_offset);
print_key_value(tcp, key, max_offset);
print_key_value(tcp, key, min_transid);
print_key_value(tcp, key, max_transid);
btrfs_print_key_type(", ", *key, min_type);
btrfs_print_key_type(", ", *key, max_type);
PRINT_FIELD_U(", ", *key, nr_items);
tprints("}");
tprints(", min_type=");
btrfs_print_key_type(key->min_type);
tprints(", max_type=");
btrfs_print_key_type(key->max_type);
tprintf(", nr_items=%u}", key->nr_items);
if (print_size)
tprintf(", buf_size=%" PRIu64, buf_size);
tprints("}");
} else {
PRINT_FIELD_U("{key={", *key, nr_items);
tprints("}");
tprintf("{key={nr_items=%u}", key->nr_items);
if (print_size)
tprintf(", buf_size=%" PRIu64, buf_size);
if (abbrev(tcp)) {
tprints(", ...");
} else {
tprints(", buf=");
if (abbrev(tcp))
tprints("...");
else {
uint64_t i;
uint64_t off = 0;
tprints(", buf=[");
tprints("[");
for (i = 0; i < key->nr_items; i++) {
struct btrfs_ioctl_search_header sh;
uint64_t addr = buf_addr + off;
if (i)
tprints(", ");
if (i > max_strlen) {
if (i > max_strlen ||
umove(tcp, addr, &sh)) {
tprints("...");
break;
}
if (umove(tcp, addr, &sh)) {
tprints("...");
printaddr_comment(addr);
break;
}
PRINT_FIELD_U("{", sh, transid);
btrfs_print_objectid(", ", sh, objectid);
PRINT_FIELD_U(", ", sh, offset);
btrfs_print_key_type(", ", sh, type);
PRINT_FIELD_U(", ", sh, len);
tprints("}");
tprintf("{transid=%" PRI__u64 ", objectid=",
sh.transid);
btrfs_print_objectid(sh.objectid);
tprintf(", offset=%" PRI__u64 ", type=", sh.offset);
btrfs_print_key_type(sh.type);
tprintf(", len=%u}", sh.len);
off += sizeof(sh) + sh.len;
}
@ -446,8 +489,7 @@ static bool
print_objectid_callback(struct tcb *tcp, void *elem_buf,
size_t elem_size, void *data)
{
printxvals_ex(*(uint64_t *) elem_buf, NULL, XLAT_STYLE_FMT_U,
btrfs_tree_objectids, NULL);
btrfs_print_objectid(*(uint64_t *) elem_buf);
return true;
}
@ -458,22 +500,15 @@ print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf,
{
const struct btrfs_ioctl_space_info *info = elem_buf;
PRINT_FIELD_FLAGS("{", *info, flags, btrfs_space_info_flags,
"BTRFS_SPACE_INFO_???");
PRINT_FIELD_U(", ", *info, total_bytes);
PRINT_FIELD_U(", ", *info, used_bytes);
tprints("}");
tprints("{flags=");
printflags64(btrfs_space_info_flags, info->flags,
"BTRFS_SPACE_INFO_???");
tprintf(", total_bytes=%" PRI__u64 ", used_bytes=%" PRI__u64 "}",
info->total_bytes, info->used_bytes);
return true;
}
static void
print_btrfs_timespec(const char *prefix, uint64_t sec, uint32_t nsec)
{
tprintf("%s{sec=%" PRIu64 ", nsec=%u}", prefix, sec, nsec);
tprints_comment(sprinttime_nsec(sec, nsec));
}
MPERS_PRINTER_DECL(int, btrfs_ioctl,
struct tcb *const tcp, const unsigned int code,
const kernel_ulong_t arg)
@ -503,7 +538,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
case BTRFS_IOC_START_SYNC: /* R */
if (entering(tcp))
return 0;
ATTRIBUTE_FALLTHROUGH;
/* fall through */
/* takes a u64 */
case BTRFS_IOC_DEFAULT_SUBVOL: /* W */
case BTRFS_IOC_WAIT_SYNC: /* W */
@ -569,14 +604,19 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, start);
PRINT_FIELD_U64(", ", args, len);
tprintf("{start=%" PRIu64 ", len=", (uint64_t)args.start);
PRINT_FIELD_FLAGS(", ", args, flags, btrfs_defrag_flags,
"BTRFS_DEFRAG_RANGE_???");
PRINT_FIELD_U(", ", args, extent_thresh);
PRINT_FIELD_XVAL(", ", args, compress_type,
btrfs_compress_types, "BTRFS_COMPRESS_???");
tprintf("%" PRIu64, (uint64_t) args.len);
if (args.len == UINT64_MAX)
tprints_comment("UINT64_MAX");
tprints(", flags=");
printflags64(btrfs_defrag_flags, args.flags,
"BTRFS_DEFRAG_RANGE_???");
tprintf(", extent_thresh=%u, compress_type=",
args.extent_thresh);
printxval(btrfs_compress_types, args.compress_type,
"BTRFS_COMPRESS_???");
tprints("}");
break;
}
@ -594,25 +634,23 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
tprints(" => ");
if (umove_or_printaddr(tcp, arg, &args))
break;
tprints("{");
valid = btrfs_unparse_uuid(args.uuid, uuid);
if (entering(tcp)) {
PRINT_FIELD_DEV("{", args, devid);
tprintf("devid=%" PRI__u64, args.devid);
if (valid)
tprintf(", uuid=%s", uuid);
tprints("}");
return 0;
}
tprints("{");
if (valid)
tprintf("uuid=%s, ", uuid);
PRINT_FIELD_U("", args, bytes_used);
PRINT_FIELD_U(", ", args, total_bytes);
tprintf("bytes_used=%" PRI__u64
", total_bytes=%" PRI__u64,
args.bytes_used, args.total_bytes);
PRINT_FIELD_CSTRING(", ", args, path);
tprints("}");
break;
}
@ -630,20 +668,24 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
break;
if (entering(tcp)) {
PRINT_FIELD_XVAL("{", args, cmd, btrfs_dev_replace_cmds,
"BTRFS_IOCTL_DEV_REPLACE_CMD_???");
tprints("{cmd=");
printxval64(btrfs_dev_replace_cmds, args.cmd,
"BTRFS_IOCTL_DEV_REPLACE_CMD_???");
if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_START) {
PRINT_FIELD_DEV(", start={", args.start,
srcdevid);
PRINT_FIELD_XVAL(", ", args.start,
cont_reading_from_srcdev_mode,
btrfs_cont_reading_from_srcdev_mode,
"BTRFS_IOCTL_DEV_REPLACE_CONT_READING"
"_FROM_SRCDEV_MODE_???");
PRINT_FIELD_CSTRING(", ", args.start,
srcdev_name);
PRINT_FIELD_CSTRING(", ", args.start,
tgtdev_name);
const char *str;
tprintf(", start={srcdevid=%" PRIu64
", cont_reading_from_srcdev_mode=%" PRIu64
", srcdev_name=",
(uint64_t) args.start.srcdevid,
(uint64_t) args.start.cont_reading_from_srcdev_mode);
str = (const char *) args.start.srcdev_name;
print_quoted_cstring(str,
sizeof(args.start.srcdev_name));
tprints(", tgtdev_name=");
str = (const char *) args.start.tgtdev_name;
print_quoted_cstring(str,
sizeof(args.start.tgtdev_name));
tprints("}");
}
@ -651,28 +693,34 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
return 0;
}
PRINT_FIELD_XVAL("{", args, result, btrfs_dev_replace_results,
"BTRFS_IOCTL_DEV_REPLACE_RESULT_???");
tprints("{result=");
printxval64(btrfs_dev_replace_results, args.result,
"BTRFS_IOCTL_DEV_REPLACE_RESULT_???");
if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) {
PRINT_FIELD_XVAL(", status={", args.status,
replace_state, btrfs_dev_replace_state,
"BTRFS_IOCTL_DEV_REPLACE_STATE_???");
tprints(", ");
printxval64(btrfs_dev_replace_state,
args.status.replace_state,
"BTRFS_IOCTL_DEV_REPLACE_STATE_???");
tprintf(", progress_1000=%" PRIu64,
(uint64_t) args.status.progress_1000);
PRINT_FIELD_U(", ", args.status, progress_1000);
if (args.status.progress_1000 <= 1000)
tprintf_comment("%u.%u%%",
(unsigned) args.status.progress_1000 / 10,
(unsigned) args.status.progress_1000 % 10);
PRINT_FIELD_U(", ", args.status, time_started);
tprintf(", time_started=%" PRIu64,
(uint64_t) args.status.time_started);
tprints_comment(sprinttime(args.status.time_started));
PRINT_FIELD_U(", ", args.status, time_stopped);
tprintf(", time_stopped=%" PRIu64,
(uint64_t) args.status.time_stopped);
tprints_comment(sprinttime(args.status.time_stopped));
PRINT_FIELD_U(", ", args.status, num_write_errors);
PRINT_FIELD_U(", ", args.status,
num_uncorrectable_read_errors);
tprintf(", num_write_errors=%" PRIu64
", num_uncorrectable_read_errors=%" PRIu64,
(uint64_t) args.status.num_write_errors,
(uint64_t) args.status.num_uncorrectable_read_errors);
}
tprints("}");
break;
@ -739,7 +787,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
char uuid[UUID_STRING_SIZE+1];
uint32_t nodesize, sectorsize, clone_alignment;
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
uint32_t *reserved32;
__u32 *reserved32;
#endif
if (entering(tcp))
@ -754,18 +802,19 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
sectorsize = args.sectorsize,
clone_alignment = args.clone_alignment;
#else
reserved32 = (void *) args.reserved;
reserved32 = (__u32 *) (void *) args.reserved;
nodesize = reserved32[0];
sectorsize = reserved32[1];
clone_alignment = reserved32[2];
#endif
btrfs_unparse_uuid(args.fsid, uuid);
PRINT_FIELD_U("{", args, max_id);
PRINT_FIELD_U(", ", args, num_devices);
tprintf(", fsid=%s, nodesize=%u, sectorsize=%u"
tprints("{");
tprintf("max_id=%" PRI__u64 ", num_devices=%" PRI__u64
", fsid=%s, nodesize=%u, sectorsize=%u"
", clone_alignment=%u",
uuid, nodesize, sectorsize, clone_alignment);
args.max_id, args.num_devices, uuid,
nodesize, sectorsize, clone_alignment);
tprints("}");
break;
}
@ -785,14 +834,12 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
tprints("{");
if (entering(tcp)) {
PRINT_FIELD_DEV("", args, devid);
tprints(", ");
}
if (entering(tcp))
tprintf("devid=%" PRI__u64 ", ", args.devid);
PRINT_FIELD_U("", args, nr_items);
PRINT_FIELD_FLAGS(", ", args, flags, btrfs_dev_stats_flags,
"BTRFS_DEV_STATS_???");
tprintf("nr_items=%" PRI__u64 ", flags=", args.nr_items);
printflags64(btrfs_dev_stats_flags, args.flags,
"BTRFS_DEV_STATS_???");
if (entering(tcp)) {
tprints("}");
@ -812,10 +859,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
tprints("...");
break;
}
tprints("[");
printxval_u(btrfs_dev_stats_values, i, NULL);
tprintf("] = %" PRI__u64, args.values[i]);
tprintf("%" PRI__u64, args.values[i]);
tprints_comment(xlookup(btrfs_dev_stats_values, i));
}
tprints("]}");
break;
@ -839,15 +884,18 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (args.treeid == 0)
set_tcb_priv_ulong(tcp, 1);
btrfs_print_objectid("{", args, treeid);
btrfs_print_objectid(", ", args, objectid);
tprints("{treeid=");
btrfs_print_objectid(args.treeid);
tprints(", objectid=");
btrfs_print_objectid(args.objectid);
tprints("}");
return 0;
}
tprints("{");
if (get_tcb_priv_ulong(tcp)) {
btrfs_print_objectid("", args, treeid);
tprints("treeid=");
btrfs_print_objectid(args.treeid);
tprints(", ");
}
@ -869,15 +917,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
tprints("{");
if (entering(tcp)) {
PRINT_FIELD_U("{", args, inum);
PRINT_FIELD_U(", ", args, size);
PRINT_FIELD_ADDR64(", ", args, fspath);
tprints("}");
tprintf("inum=%" PRI__u64 ", size=%" PRI__u64,
args.inum, args.size);
tprintf(", fspath=0x%" PRI__x64 "}", args.fspath);
return 0;
}
tprints("{fspath=");
tprints("fspath=");
btrfs_print_ino_path_container(tcp, args.fspath);
tprints("}");
@ -897,33 +946,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
tprints("{");
if (entering(tcp)) {
PRINT_FIELD_U("{", args, logical);
PRINT_FIELD_U(", ", args, size);
if (!IS_ARRAY_ZERO(args.reserved)) {
tprints(", reserved=[");
for (size_t i = 0; i < 3; ++i)
tprintf("%s%#" PRI__x64,
i ? ", " : "",
args.reserved[i]);
tprints("]");
}
tprintf(", flags=");
printflags64(btrfs_logical_ino_args_flags,
#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
args.flags
#else
args.reserved[3]
#endif
, "BTRFS_LOGICAL_INO_ARGS_???");
PRINT_FIELD_ADDR64(", ", args, inodes);
tprints("}");
tprintf("logical=%" PRI__u64 ", size=%" PRI__u64,
args.logical, args.size);
tprintf(", inodes=0x%" PRI__x64 "}", args.inodes);
return 0;
}
tprints("{inodes=");
tprints("inodes=");
btrfs_print_logical_ino_container(tcp, args.inodes);
tprints("}");
@ -937,10 +969,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, assign);
PRINT_FIELD_U(", ", args, src);
PRINT_FIELD_U(", ", args, dst);
tprints("}");
tprintf("{assign=%" PRI__u64 ", src=%" PRI__u64
", dst=%" PRI__u64 "}",
args.assign, args.src, args.dst);
break;
}
@ -951,9 +982,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, create);
PRINT_FIELD_U(", ", args, qgroupid);
tprints("}");
tprintf("{create=%" PRI__u64 ", qgroupid=%" PRI__u64 "}",
args.create, args.qgroupid);
break;
}
@ -967,7 +997,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, qgroupid);
tprintf("{qgroupid=%" PRI__u64 ", lim=", args.qgroupid);
btrfs_print_qgroup_limit(&args.lim);
tprints("}");
break;
@ -980,8 +1010,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_XVAL("{", args, cmd, btrfs_qgroup_ctl_cmds,
"BTRFS_QUOTA_CTL_???");
printxval64(btrfs_qgroup_ctl_cmds, args.cmd,
"BTRFS_QUOTA_CTL_???");
tprints("}");
break;
@ -994,8 +1024,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, flags);
tprints("}");
tprintf("{flags=%" PRIu64 "}", (uint64_t) args.flags);
break;
}
@ -1009,8 +1038,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_U("{", args, flags);
btrfs_print_objectid(", ", args, progress);
tprintf("{flags=%" PRIu64 ", progress=", (uint64_t) args.flags);
btrfs_print_objectid(args.progress);
tprints("}");
break;
}
@ -1031,18 +1060,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (entering(tcp)) {
btrfs_unparse_uuid((unsigned char *)args.uuid, uuid);
tprintf("{uuid=%s", uuid);
PRINT_FIELD_U(", ", args, stransid);
print_btrfs_timespec(", stime=",
args.stime.sec, args.stime.nsec);
PRINT_FIELD_U(", ", args, flags);
tprints("}");
tprintf("{uuid=%s, stransid=%" PRIu64
", stime=%" PRIu64 ".%u, flags=%" PRIu64
"}", uuid, (uint64_t) args.stransid,
(uint64_t) args.stime.sec, args.stime.nsec,
(uint64_t) args.flags);
return 0;
}
PRINT_FIELD_U("{", args, rtransid);
print_btrfs_timespec(", rtime=",
args.rtime.sec, args.rtime.nsec);
tprints("}");
tprintf("{rtransid=%" PRIu64 ", rtime=%" PRIu64 ".%u}",
(uint64_t) args.rtransid, (uint64_t) args.rtime.sec,
args.rtime.nsec);
break;
}
@ -1061,34 +1088,50 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
break;
if (entering(tcp)) {
PRINT_FIELD_DEV("{", args, devid);
tprintf("{devid=%" PRI__u64, args.devid);
if (code == BTRFS_IOC_SCRUB) {
PRINT_FIELD_U(", ", args, start);
PRINT_FIELD_U64(", ", args, end);
PRINT_FIELD_FLAGS(", ", args, flags,
btrfs_scrub_flags,
"BTRFS_SCRUB_???");
tprintf(", start=%" PRI__u64 ", end=",
args.start);
tprintf("%" PRI__u64, args.end);
if (args.end == UINT64_MAX)
tprints_comment("UINT64_MAX");
tprints(", flags=");
printflags64(btrfs_scrub_flags, args.flags,
"BTRFS_SCRUB_???");
}
tprints("}");
return 0;
}
PRINT_FIELD_U("{progress={", args.progress,
data_extents_scrubbed);
PRINT_FIELD_U(", ", args.progress, tree_extents_scrubbed);
PRINT_FIELD_U(", ", args.progress, data_bytes_scrubbed);
PRINT_FIELD_U(", ", args.progress, tree_bytes_scrubbed);
PRINT_FIELD_U(", ", args.progress, read_errors);
PRINT_FIELD_U(", ", args.progress, csum_errors);
PRINT_FIELD_U(", ", args.progress, verify_errors);
PRINT_FIELD_U(", ", args.progress, no_csum);
PRINT_FIELD_U(", ", args.progress, csum_discards);
PRINT_FIELD_U(", ", args.progress, super_errors);
PRINT_FIELD_U(", ", args.progress, malloc_errors);
PRINT_FIELD_U(", ", args.progress, uncorrectable_errors);
PRINT_FIELD_U(", ", args.progress, corrected_errors);
PRINT_FIELD_U(", ", args.progress, last_physical);
PRINT_FIELD_U(", ", args.progress, unverified_errors);
tprints("}}");
tprintf("{data_extents_scrubbed=%" PRI__u64
", tree_extents_scrubbed=%" PRI__u64
", data_bytes_scrubbed=%" PRI__u64
", tree_bytes_scrubbed=%" PRI__u64
", read_errors=%" PRI__u64
", csum_errors=%" PRI__u64
", verify_errors=%" PRI__u64
", no_csum=%" PRI__u64
", csum_discards=%" PRI__u64
", super_errors=%" PRI__u64
", malloc_errors=%" PRI__u64
", uncorrectable_errors=%" PRI__u64
", corrected_errors=%" PRI__u64
", last_physical=%" PRI__u64
", unverified_errors=%" PRI__u64 "}",
args.progress.data_extents_scrubbed,
args.progress.tree_extents_scrubbed,
args.progress.data_bytes_scrubbed,
args.progress.tree_bytes_scrubbed,
args.progress.read_errors,
args.progress.csum_errors,
args.progress.verify_errors,
args.progress.no_csum,
args.progress.csum_discards,
args.progress.super_errors,
args.progress.malloc_errors,
args.progress.uncorrectable_errors,
args.progress.corrected_errors,
args.progress.last_physical,
args.progress.unverified_errors);
break;
}
@ -1123,11 +1166,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
else if (syserror(tcp)) {
if (tcp->u_error == EOVERFLOW) {
tprints(" => ");
if (!umove_or_printaddr_ignore_syserror(tcp,
arg, &args)) {
PRINT_FIELD_U("{", args, buf_size);
tprints("}");
}
tcp->u_error = 0;
if (!umove_or_printaddr(tcp, arg, &args))
tprintf("{buf_size=%" PRIu64 "}",
(uint64_t)args.buf_size);
tcp->u_error = EOVERFLOW;
}
break;
} else
@ -1151,23 +1194,26 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_FD("{", args, send_fd, tcp);
PRINT_FIELD_U(", ", args, clone_sources_count);
tprints("{send_fd=");
printfd(tcp, args.send_fd);
tprintf(", clone_sources_count=%" PRIu64 ", clone_sources=",
(uint64_t) args.clone_sources_count);
tprints(", clone_sources=");
if (abbrev(tcp))
printaddr((uintptr_t) args.clone_sources);
tprints("...");
else {
uint64_t record;
print_array(tcp, ptr_to_kulong(args.clone_sources),
args.clone_sources_count,
&record, sizeof(record),
tfetch_mem,
umoven_or_printaddr,
print_objectid_callback, 0);
}
btrfs_print_objectid(", ", args, parent_root);
PRINT_FIELD_FLAGS(", ", args, flags, btrfs_send_flags,
"BTRFS_SEND_FLAGS_???");
tprints(", parent_root=");
btrfs_print_objectid(args.parent_root);
tprints(", flags=");
printflags64(btrfs_send_flags, args.flags,
"BTRFS_SEND_FLAGS_???");
tprints("}");
break;
}
@ -1185,27 +1231,28 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
tprints("{");
if (entering(tcp)) {
PRINT_FIELD_U("{", args, space_slots);
tprints("}");
tprintf("space_slots=%" PRI__u64 "}", args.space_slots);
return 0;
}
PRINT_FIELD_U("{", args, total_spaces);
tprintf("total_spaces=%" PRI__u64, args.total_spaces);
if (args.space_slots == 0 && args.total_spaces) {
tprints("}");
break;
}
if (abbrev(tcp)) {
tprints(", ...");
} else {
tprints(", spaces=");
if (abbrev(tcp))
tprints("...");
else {
struct btrfs_ioctl_space_info info;
tprints(", spaces=");
print_array(tcp, arg + offsetof(typeof(args), spaces),
args.total_spaces,
&info, sizeof(info), tfetch_mem,
&info, sizeof(info), umoven_or_printaddr,
print_btrfs_ioctl_space_info, 0);
}
tprints("}");
@ -1226,7 +1273,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
if (umove_or_printaddr(tcp, arg, &args))
break;
PRINT_FIELD_FD("{", args, fd, tcp);
tprints("{fd=");
printfd(tcp, args.fd);
PRINT_FIELD_CSTRING(", ", args, name);
tprints("}");
break;
@ -1247,13 +1295,15 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
break;
if (entering(tcp)) {
PRINT_FIELD_FD("{", args, fd, tcp);
PRINT_FIELD_FLAGS(", ", args, flags,
btrfs_snap_flags_v2,
"BTRFS_SUBVOL_???");
tprints("{fd=");
printfd(tcp, args.fd);
tprints(", flags=");
printflags64(btrfs_snap_flags_v2, args.flags,
"BTRFS_SUBVOL_???");
if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
PRINT_FIELD_U(", ", args, size);
tprints(", qgroup_inherit=");
tprintf(", size=%" PRIu64 ", qgroup_inherit=",
(uint64_t) args.size);
btrfs_print_qgroup_inherit(tcp,
ptr_to_kulong(args.qgroup_inherit));
}
@ -1261,15 +1311,14 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
tprints("}");
return 0;
}
PRINT_FIELD_U("{", args, transid);
tprints("}");
tprintf("{transid=%" PRIu64 "}", (uint64_t) args.transid);
break;
}
case BTRFS_IOC_GET_FSLABEL: /* R */
if (entering(tcp))
return 0;
ATTRIBUTE_FALLTHROUGH;
/* fall through */
case BTRFS_IOC_SET_FSLABEL: { /* W */
char label[BTRFS_LABEL_SIZE];

View File

@ -4,7 +4,7 @@
* Copyright (c) 2008 Jan Kratochvil <jan.kratochvil@redhat.com>
* Copyright (c) 2009-2013 Denys Vlasenko <dvlasenk@redhat.com>
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -49,7 +49,7 @@
# define ARG_PTID (tcp->scno == __NR_clone2 ? 3 : 2)
# define ARG_CTID (tcp->scno == __NR_clone2 ? 4 : 3)
# define ARG_TLS (tcp->scno == __NR_clone2 ? 5 : 4)
#elif defined S390 || defined S390X
#elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32
# define ARG_STACK 0
# define ARG_FLAGS 1
# define ARG_PTID 2
@ -84,7 +84,7 @@ print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr)
if (current_personality == 1)
# endif
{
print_user_desc(tcp, tcp->u_arg[ARG_TLS], USER_DESC_BOTH);
print_user_desc(tcp, tcp->u_arg[ARG_TLS]);
}
# if SUPPORTED_PERSONALITIES > 1
else
@ -161,5 +161,5 @@ SYS_FUNC(unshare)
SYS_FUNC(fork)
{
return RVAL_DECODED;
return RVAL_DECODED | RVAL_UDECIMAL;
}

View File

@ -5,7 +5,7 @@
# Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
# Copyright (c) 2002-2018 The strace developers.
# Copyright (c) 2002-2017 The strace developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -33,7 +33,7 @@
AC_PREREQ(2.57)
AC_INIT([strace],
m4_esyscmd([./git-version-gen .tarball-version]),
[strace-devel@lists.strace.io],
[strace-devel@lists.sourceforge.net],
[strace],
[https://strace.io])
m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year]))
@ -46,13 +46,12 @@ AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
RPM_CHANGELOGTIME="$(LC_TIME=C date -u '+%a %b %d %Y')"
RPM_CHANGELOGTIME="$(LC_TIME=C date '+%a %b %d %Y')"
AC_SUBST(RPM_CHANGELOGTIME)
DEB_CHANGELOGTIME="$(LC_TIME=C date -u -R)"
DEB_CHANGELOGTIME="$(LC_TIME=C date -R)"
AC_SUBST(DEB_CHANGELOGTIME)
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP
st_WARN_CFLAGS
AX_PROG_CC_FOR_BUILD
@ -71,38 +70,11 @@ AC_SUBST([MANPAGE_DATE], [manpage_date])
AC_MSG_CHECKING([for supported architecture])
arch_m32=
arch_mx32=
cc_flags_m32=-m32
cc_flags_mx32=-mx32
case "$host_cpu" in
aarch64*)
arch=aarch64
arch_m32=arm
AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
;;
alpha*)
arch=alpha
AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.])
;;
arc*)
arch=arc
AC_DEFINE([ARC], 1, [Define for the ARC architecture.])
;;
arm*)
arch=arm
AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
;;
avr32*)
arch=avr32
AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
;;
bfin)
arch=bfin
AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.])
;;
hppa*|parisc*)
arch=hppa
AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.])
;;
i[[3456]]86|pentium)
arch=i386
AC_DEFINE([I386], 1, [Define for the i386 architecture.])
@ -115,25 +87,26 @@ m68k)
arch=m68k
AC_DEFINE([M68K], 1, [Define for the m68k architecture.])
;;
sparc64*)
arch=sparc64
arch_m32=sparc
AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.])
;;
sparc*)
arch=sparc
AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.])
;;
metag*)
arch=metag
AC_DEFINE([METAG], 1, [Define for the Meta architecture.])
;;
microblaze*)
arch=microblaze
AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.])
;;
mips*)
arch=mips
AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.])
;;
nios2*)
arch=nios2
AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.])
;;
or1k*)
arch=or1k
AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.])
alpha*)
arch=alpha
AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.])
;;
powerpc*)
AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.])
@ -146,9 +119,22 @@ powerpc*)
AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.])
fi
;;
riscv*)
arch=riscv
AC_DEFINE([RISCV], 1, [Define for the RISC-V architecture])
arm*)
arch=arm
AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
;;
aarch64*)
arch=aarch64
arch_m32=arm
AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
;;
avr32*)
arch=avr32
AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
;;
arc*)
arch=arc
AC_DEFINE([ARC], 1, [Define for the ARC architecture.])
;;
s390)
arch=s390
@ -156,10 +142,12 @@ s390)
;;
s390x)
arch=s390x
arch_m32=s390
cc_flags_m32=-m31
AC_DEFINE([S390X], 1, [Define for the S390x architecture.])
;;
hppa*|parisc*)
arch=hppa
AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.])
;;
sh64*)
arch=sh64
AC_DEFINE([SH64], 1, [Define for the SH64 architecture.])
@ -168,19 +156,6 @@ sh*)
arch=sh
AC_DEFINE([SH], 1, [Define for the SH architecture.])
;;
sparc64*)
arch=sparc64
arch_m32=sparc
AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.])
;;
sparc*)
arch=sparc
AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.])
;;
tile*)
arch=tile
AC_DEFINE([TILE], 1, [Define for the Tile architecture])
;;
x86?64*)
arch_m32=i386
AC_TRY_COMPILE(
@ -194,10 +169,42 @@ x86?64*)
AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.])
fi
;;
cris|crisv10)
arch=crisv10
AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.])
;;
crisv32)
arch=crisv32
AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.])
;;
tile*)
arch=tile
AC_DEFINE([TILE], 1, [Define for the Tile architecture])
;;
microblaze*)
arch=microblaze
AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.])
;;
nios2*)
arch=nios2
AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.])
;;
or1k*)
arch=or1k
AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.])
;;
xtensa*)
arch=xtensa
AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture])
;;
riscv*)
arch=riscv
AC_DEFINE([RISCV], 1, [Define for the RISC-V architecture])
;;
*)
AC_MSG_RESULT([NO!])
AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
@ -205,8 +212,6 @@ xtensa*)
esac
AC_MSG_RESULT($arch)
arch_native=$arch
test -n "$arch_m32" ||
arch_m32=$arch
test -n "$arch_mx32" ||
@ -214,15 +219,12 @@ test -n "$arch_mx32" ||
AC_SUBST(arch)
AC_SUBST(arch_m32)
AC_SUBST(arch_mx32)
AC_SUBST(cc_flags_m32)
AC_SUBST(cc_flags_mx32)
AC_SUBST(arch_native)
MIPS_ABI=
if test "$arch" = mips; then
AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
[AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], ,
[AC_MSG_FAILURE([_MIPS_SIM cannot be determined])])])
[AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
# requires GCC >= 3.4
AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
@ -275,7 +277,6 @@ AC_CHECK_FUNCS(m4_normalize([
fstatat
ftruncate
futimens
iconv_open
if_indextoname
open64
prctl
@ -303,10 +304,7 @@ AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,,
[#include <sys/types.h>
#include <asm/stat.h>])
AC_CHECK_TYPES([struct user_desc],
[AC_CHECK_MEMBERS([struct user_desc.lm],,,
[#include <asm/ldt.h>])],,
[#include <asm/ldt.h>])
AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,,
[#include <sys/types.h>
@ -322,9 +320,7 @@ AC_CHECK_TYPES(m4_normalize([
struct flock,
struct flock64,
struct __kernel_flock,
struct __kernel_flock64,
struct f_owner_ex,
struct __kernel_f_owner_ex
struct __kernel_flock64
]),,,
[#include <sys/types.h>
#include <linux/fcntl.h>])
@ -368,7 +364,6 @@ AC_CHECK_MEMBERS(m4_normalize([
struct perf_event_attr.use_clockid,
struct perf_event_attr.context_switch,
struct perf_event_attr.write_backward,
struct perf_event_attr.namespaces,
struct perf_event_attr.bp_type,
struct perf_event_attr.config1,
struct perf_event_attr.config2,
@ -382,10 +377,9 @@ AC_CHECK_MEMBERS(m4_normalize([
AC_CHECK_HEADERS(m4_normalize([
asm/cachectl.h
asm/guarded_storage.h
asm/sysmips.h
bluetooth/bluetooth.h
elf.h
iconv.h
inttypes.h
linux/bsg.h
linux/cryptouser.h
@ -428,7 +422,6 @@ AC_CHECK_HEADERS(m4_normalize([
mqueue.h
netinet/sctp.h
netipx/ipx.h
paths.h
scsi/sg.h
stropts.h
sys/conf.h
@ -437,6 +430,7 @@ AC_CHECK_HEADERS(m4_normalize([
sys/ipc.h
sys/msg.h
sys/quota.h
sys/reg.h
sys/sem.h
sys/shm.h
sys/signalfd.h
@ -466,18 +460,16 @@ AC_CHECK_HEADERS([linux/input.h], [
])
AC_CHECK_HEADERS([linux/bpf.h], [
AC_CHECK_TYPES(m4_normalize([
struct bpf_insn,
struct bpf_map_info,
struct bpf_prog_info
AC_CHECK_MEMBERS(m4_normalize([
union bpf_attr.attach_flags,
union bpf_attr.bpf_fd,
union bpf_attr.flags,
union bpf_attr.info.info,
union bpf_attr.next_id,
union bpf_attr.numa_node,
union bpf_attr.prog_flags,
union bpf_attr.test.duration
]),,, [#include <linux/bpf.h>])
st_BPF_ATTR
])
AC_CHECK_HEADERS([bluetooth/bluetooth.h], [
AC_CHECK_MEMBERS([struct sockaddr_l2.l2_bdaddr_type],,,
[#include <bluetooth/bluetooth.h>
#include <bluetooth/l2cap.h>])
])
AC_CHECK_TYPES(m4_normalize([
@ -496,8 +488,7 @@ AC_CHECK_TYPES([struct netconfmsg],,, [#include <linux/netconf.h>])
AC_CHECK_TYPES(m4_normalize([
struct rta_mfc_stats,
struct rtvia
]),,, [#include <sys/socket.h>
#include <linux/rtnetlink.h>])
]),,, [#include <linux/rtnetlink.h>])
AC_CHECK_MEMBERS([struct ndt_stats.ndts_table_fulls],,, [#include <linux/neighbour.h>])
AC_CHECK_TYPES(m4_normalize([
@ -507,23 +498,13 @@ AC_CHECK_TYPES(m4_normalize([
AC_CHECK_TYPES(m4_normalize([
struct ifla_bridge_id,
struct ifla_cacheinfo,
struct ifla_port_vsi,
struct rtnl_link_stats64
]),,, [#include <sys/socket.h>
#include <linux/rtnetlink.h>])
]),,, [#include <linux/if_link.h>])
AC_CHECK_MEMBERS(m4_normalize([
struct rtnl_link_stats.rx_nohandler,
struct rtnl_link_stats64.rx_nohandler
]),,, [#include <sys/socket.h>
#include <linux/rtnetlink.h>])
AC_CHECK_DECLS(m4_normalize([
IFLA_PORT_SELF,
IFLA_PROTINFO,
IFLA_AF_SPEC,
IFLA_XDP
]),,, [#include <sys/socket.h>
#include <linux/rtnetlink.h>])
]),,, [#include <linux/if_link.h>])
AC_CHECK_TYPES(m4_normalize([
struct gnet_stats_basic,
@ -532,15 +513,9 @@ AC_CHECK_TYPES(m4_normalize([
struct gnet_stats_rate_est64
]),,, [#include <linux/gen_stats.h>])
AC_CHECK_TYPES([struct tc_sizespec],,, [#include <linux/types.h>
#include <linux/pkt_sched.h>])
AC_CHECK_DECLS([TCA_STAB_DATA],,, [#include <linux/types.h>
#include <linux/pkt_sched.h>])
AC_CHECK_TYPES([struct tc_sizespec],,, [#include <linux/pkt_sched.h>])
AC_CHECK_TYPES(m4_normalize([
struct fib_rule_uid_range,
struct fib_rule_port_range
]),,, [#include <linux/fib_rules.h>])
AC_CHECK_TYPES([struct fib_rule_uid_range],,, [#include <linux/fib_rules.h>])
AC_CHECK_TYPES([struct statfs], [
AC_CHECK_MEMBERS(m4_normalize([
@ -566,32 +541,18 @@ AC_CHECK_TYPES([struct statfs64], [
AC_CHECK_TYPES([struct blk_user_trace_setup],,, [#include <linux/blktrace_api.h>])
AC_CHECK_TYPES([struct mtd_write_req],,, [#include <mtd/mtd-abi.h>])
AC_CHECK_MEMBERS([struct ubi_attach_req.max_beb_per1024],,, [#include <mtd/ubi-user.h>])
AC_CHECK_TYPES(m4_normalize([
struct ptp_sys_offset
]),,, [#include <linux/ptp_clock.h>])
AC_CHECK_TYPES(m4_normalize([
struct kvm_regs,
struct kvm_sregs,
struct kvm_userspace_memory_region
]),,, [#include <linux/kvm.h>])
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$srcdir/linux"
AC_CHECK_TYPES([struct __aio_sigset],,, [#include <linux/aio_abi.h>])
CPPFLAGS="$saved_CPPFLAGS"
AC_CHECK_HEADERS([linux/btrfs.h], [
AC_CHECK_MEMBERS(m4_normalize([
struct btrfs_ioctl_feature_flags.compat_flags,
struct btrfs_ioctl_fs_info_args.nodesize,
struct btrfs_ioctl_defrag_range_args.start,
struct btrfs_ioctl_search_args_v2.buf_size,
struct btrfs_ioctl_logical_ino_args.flags
struct btrfs_ioctl_search_args_v2.buf_size
]),,, [ #include <stdio.h>
#include <linux/btrfs.h>])
AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
@ -780,16 +741,11 @@ AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
fi)
AC_CHECK_SIZEOF([long])
SIZEOF_LONG="$ac_cv_sizeof_long"
AC_SUBST(SIZEOF_LONG)
AC_CHECK_SIZEOF([long long])
AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>])
AC_CHECK_SIZEOF([kernel_long_t],,[#include "$srcdir/kernel_types.h"])
SIZEOF_KERNEL_LONG_T="$ac_cv_sizeof_kernel_long_t"
AC_SUBST(SIZEOF_KERNEL_LONG_T)
AC_CHECK_SIZEOF([struct i64_i32],,[struct i64_i32 {long long i64; int i32;};])
AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN],
[[st_cv_SIGRTMIN="$(echo SIGRTMIN |
$CPP $CPPFLAGS -P -imacros asm/signal.h - |
@ -828,99 +784,115 @@ if test "x$st_cv_have_program_invocation_name" = xyes; then
[Define to 1 if the system provides program_invocation_name variable])
fi
AC_CACHE_CHECK([for static_assert], [st_cv_have_static_assert],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]],
[[static_assert(1,"")]]
)
],
[st_cv_have_static_assert=yes],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
[[_Static_assert(1,"")]]
)
],
[st_cv_have_static_assert=_Static_assert],
[st_cv_have_static_assert=no]
)
]
)
]
)
case "x$st_cv_have_static_assert" in
xyes)
AC_DEFINE([HAVE_STATIC_ASSERT], [1],
[Define to 1 if the system provides static_assert])
;;
x_Static_assert)
AC_DEFINE([HAVE__STATIC_ASSERT], [1],
[Define to 1 if the system provides _Static_assert])
;;
esac
AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=])
if test "x$ac_cv_lib_dl_dladdr" = xyes; then
AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if the system provides dladdr])
fi
AC_SUBST(dl_LIBS)
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([timer_create], [rt])
LIBS="$saved_LIBS"
case "$ac_cv_search_timer_create" in
no) AC_MSG_FAILURE([failed to find timer_create]) ;;
-l*) timer_LIBS="$ac_cv_search_timer_create" ;;
*) timer_LIBS= ;;
esac
AC_SUBST(timer_LIBS)
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt])
LIBS="$saved_LIBS"
case "$ac_cv_search_clock_gettime" in
no) AC_MSG_FAILURE([failed to find clock_gettime]) ;;
-l*) clock_LIBS="$ac_cv_search_clock_gettime" ;;
*) clock_LIBS= ;;
esac
AC_SUBST(clock_LIBS)
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([mq_open], [rt])
LIBS="$saved_LIBS"
case "$ac_cv_search_mq_open" in
-l*) mq_LIBS="$ac_cv_search_mq_open" ;;
*) mq_LIBS= ;;
esac
AC_SUBST(mq_LIBS)
AC_PATH_PROG([PERL], [perl])
AC_CHECK_TOOL([READELF], [readelf])
st_STACKTRACE
dnl stack trace with libunwind
libunwind_CPPFLAGS=
libunwind_LDFLAGS=
libunwind_LIBS=
AC_ARG_WITH([libunwind],
[AS_HELP_STRING([--with-libunwind],
[use libunwind to implement stack tracing support])],
[case "${withval}" in
yes|no|check) ;;
*) with_libunwind=yes
libunwind_CPPFLAGS="-I${withval}/include"
libunwind_LDFLAGS="-L${withval}/lib" ;;
esac],
[with_libunwind=check]
)
use_libunwind=no
AS_IF([test "x$with_libunwind" != xno],
[saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS"
AC_CHECK_HEADERS([libunwind-ptrace.h],
[saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
AC_CHECK_LIB([unwind], [backtrace],
[libunwind_LIBS="-lunwind $libunwind_LIBS"
AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
saved_LIBS="$LIBS"
LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
[[return !unw_create_addr_space(0, 0)]])
],
[AC_MSG_RESULT([yes])
libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
[libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
use_libunwind=yes
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
fi
],
[$libunwind_LIBS]
)
],
[AC_MSG_RESULT([no])
if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
fi
]
)
LIBS="$saved_LIBS"
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find libunwind])
fi
],
[$libunwind_LIBS]
)
LDFLAGS="$saved_LDFLAGS"
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
fi
]
)
CPPFLAGS="$saved_CPPFLAGS"
]
)
dnl enable libunwind
AC_MSG_CHECKING([whether to enable stack tracing support using libunwind])
if test "x$use_libunwind" = xyes; then
AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality])
AC_SUBST(libunwind_LIBS)
AC_SUBST(libunwind_LDFLAGS)
AC_SUBST(libunwind_CPPFLAGS)
fi
AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes])
AC_MSG_RESULT([$use_libunwind])
if test "$arch" = mips && test "$no_create" != yes; then
mkdir -p linux/mips
if $srcdir/linux/mips/genstub.sh linux/mips; then
AC_MSG_RESULT([Generated MIPS syscallent stubs])
else
AC_MSG_ERROR([Failed to generate syscallent stubs])
AC_MSG_FAILURE([Failed to generate syscallent stubs])
fi
fi
AC_ARG_ENABLE([mpers],
[AS_HELP_STRING([--enable-mpers=yes|no|check|m32|mx32],
[whether to enable multiple personalities support required
for proper decoding of structures used by tracees with
personalities that differ from the personality of strace,
default is yes.])],
[case "$enableval" in
yes|no|check|m32|mx32) enable_mpers="$enableval" ;;
*) AC_MSG_ERROR([bad value $enableval for enable-mpers option.
Valid options are: yes, no, check, m32, mx32.])
;;
esac],
[enable_mpers=yes])
st_MPERS([m32], [aarch64|powerpc64|riscv|s390x|sparc64|tile|x32|x86_64])
st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64])
st_MPERS([mx32], [x86_64])
AX_VALGRIND_DFLT([sgcheck], [off])

View File

@ -2,7 +2,6 @@
: ${YEAR_FILE:=$1}
: ${DEFAULT_YEAR:=$2}
LC_TIME=C; export LC_TIME
year=
@ -14,17 +13,11 @@ year=
[ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")"
[ -n "${year}" ] ||
year="$(date -u +%Y -d "$(git show --format=format:%cD --no-patch)")"
year="$(date +%Y -d "$(git show --format=format:%cD --no-patch)")"
[ -n "${year}" ] ||
year="${DEFAULT_YEAR}"
[ -n "${year}" ] || year="${DEFAULT_YEAR}"
[ -n "${year}" ] ||
[ -z "${SOURCE_DATE_EPOCH-}" ] ||
year="$(date -u +%Y -d "@${SOURCE_DATE_EPOCH}")"
[ -n "${year}" ] ||
year="$(date -u +%Y)"
[ -n "${year}" ] || year="$(date "+%Y")"
[ -n "${year}" ] || {
echo >&2 'Undefined year.'

130
count.c
View File

@ -8,7 +8,7 @@
* <barrow_dj@mail.yahoo.com,djbarrow@de.ibm.com>
* Copyright (c) 2004 Roland McGrath <roland@redhat.com>
* Copyright (c) 2006 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2006-2018 The strace developers.
* Copyright (c) 2006-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -39,45 +39,73 @@
/* Per-syscall stats structure */
struct call_counts {
/* time may be total latency or system time */
struct timespec time;
unsigned int calls, errors;
struct timeval time;
int calls, errors;
};
static struct call_counts *countv[SUPPORTED_PERSONALITIES];
#define counts (countv[current_personality])
static struct timespec overhead;
static struct timeval shortest = { 1000000, 0 };
void
count_syscall(struct tcb *tcp, const struct timespec *syscall_exiting_ts)
count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv)
{
struct timeval wtv;
struct timeval *tv = &wtv;
struct call_counts *cc;
if (!scno_in_range(tcp->scno))
return;
if (!counts)
counts = xcalloc(nsyscalls, sizeof(*counts));
struct call_counts *cc = &counts[tcp->scno];
cc = &counts[tcp->scno];
cc->calls++;
if (syserror(tcp))
cc->errors++;
if (count_wallclock) {
/* wall clock time spent while in syscall */
struct timespec wts;
ts_sub(&wts, syscall_exiting_ts, &tcp->etime);
/* tv = wall clock time spent while in syscall */
tv_sub(tv, syscall_exiting_tv, &tcp->etime);
ts_add(&cc->time, &cc->time, &wts);
} else {
/* system CPU time spent while in syscall */
ts_add(&cc->time, &cc->time, &tcp->dtime);
/* Spent more wall clock time than spent system time? (usually yes) */
if (tv_cmp(tv, &tcp->dtime) > 0) {
static struct timeval one_tick = { -1, 0 };
if (one_tick.tv_sec == -1) {
/* Initialize it. */
struct itimerval it;
memset(&it, 0, sizeof(it));
it.it_interval.tv_usec = 1;
setitimer(ITIMER_REAL, &it, NULL);
getitimer(ITIMER_REAL, &it);
one_tick = it.it_interval;
//FIXME: this hack doesn't work (tested on linux-3.6.11): one_tick = 0.000000
//tprintf(" one_tick.tv_usec:%u\n", (unsigned)one_tick.tv_usec);
}
if (tv_nz(&tcp->dtime))
/* tv = system time spent, if it isn't 0 */
tv = &tcp->dtime;
else if (tv_cmp(tv, &one_tick) > 0) {
/* tv = smallest "sane" time interval */
if (tv_cmp(&shortest, &one_tick) < 0)
tv = &shortest;
else
tv = &one_tick;
}
}
if (tv_cmp(tv, &shortest) < 0)
shortest = *tv;
tv_add(&cc->time, &cc->time, count_wallclock ? &wtv : tv);
}
static int
time_cmp(void *a, void *b)
{
return -ts_cmp(&counts[*((int *) a)].time,
return -tv_cmp(&counts[*((int *) a)].time,
&counts[*((int *) b)].time);
}
@ -99,6 +127,7 @@ count_cmp(void *a, void *b)
}
static int (*sortfun)();
static struct timeval overhead = { -1, -1 };
void
set_sortby(const char *sortby)
@ -119,72 +148,79 @@ set_sortby(const char *sortby)
void set_overhead(int n)
{
overhead.tv_sec = n / 1000000;
overhead.tv_nsec = n % 1000000 * 1000;
overhead.tv_usec = n % 1000000;
}
static void
call_summary_pers(FILE *outf)
{
static const char dashes[] = "----------------";
static const char header[] = "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n";
static const char data[] = "%6.2f %11.6f %11lu %9u %9.u %s\n";
static const char summary[] = "%6.6s %11.6f %11.11s %9u %9.u %s\n";
unsigned int i;
unsigned int call_cum, error_cum;
struct timespec tv_cum, dtv;
int call_cum, error_cum;
struct timeval tv_cum, dtv;
double float_tv_cum;
double percent;
unsigned int *sorted_count;
const char *dashes = "----------------";
char error_str[sizeof(int)*3];
int *sorted_count;
fprintf(outf, header,
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
"% time", "seconds", "usecs/call",
"calls", "errors", "syscall");
fprintf(outf, header, dashes, dashes, dashes, dashes, dashes, dashes);
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
dashes, dashes, dashes, dashes, dashes, dashes);
sorted_count = xcalloc(sizeof(sorted_count[0]), nsyscalls);
call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_nsec = 0;
sorted_count = xcalloc(sizeof(int), nsyscalls);
call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_usec = 0;
if (overhead.tv_sec == -1) {
tv_mul(&overhead, &shortest, 8);
tv_div(&overhead, &overhead, 10);
}
for (i = 0; i < nsyscalls; i++) {
sorted_count[i] = i;
if (counts == NULL || counts[i].calls == 0)
continue;
ts_mul(&dtv, &overhead, counts[i].calls);
ts_sub(&counts[i].time, &counts[i].time, &dtv);
if (counts[i].time.tv_sec < 0 || counts[i].time.tv_nsec < 0)
counts[i].time.tv_sec = counts[i].time.tv_nsec = 0;
tv_mul(&dtv, &overhead, counts[i].calls);
tv_sub(&counts[i].time, &counts[i].time, &dtv);
call_cum += counts[i].calls;
error_cum += counts[i].errors;
ts_add(&tv_cum, &tv_cum, &counts[i].time);
tv_add(&tv_cum, &tv_cum, &counts[i].time);
}
float_tv_cum = ts_float(&tv_cum);
float_tv_cum = tv_float(&tv_cum);
if (counts) {
if (sortfun)
qsort((void *) sorted_count, nsyscalls,
sizeof(sorted_count[0]), sortfun);
qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun);
for (i = 0; i < nsyscalls; i++) {
double float_syscall_time;
unsigned int idx = sorted_count[i];
int idx = sorted_count[i];
struct call_counts *cc = &counts[idx];
if (cc->calls == 0)
continue;
ts_div(&dtv, &cc->time, cc->calls);
float_syscall_time = ts_float(&cc->time);
tv_div(&dtv, &cc->time, cc->calls);
error_str[0] = '\0';
if (cc->errors)
sprintf(error_str, "%u", cc->errors);
float_syscall_time = tv_float(&cc->time);
percent = (100.0 * float_syscall_time);
if (percent != 0.0)
percent /= float_tv_cum;
/* else: float_tv_cum can be 0.0 too and we get 0/0 = NAN */
fprintf(outf, data,
fprintf(outf, "%6.2f %11.6f %11lu %9u %9.9s %s\n",
percent, float_syscall_time,
(long) (1000000 * dtv.tv_sec + dtv.tv_nsec / 1000),
cc->calls, cc->errors, sysent[idx].sys_name);
(long) (1000000 * dtv.tv_sec + dtv.tv_usec),
cc->calls,
error_str, sysent[idx].sys_name);
}
}
free(sorted_count);
fprintf(outf, header, dashes, dashes, dashes, dashes, dashes, dashes);
fprintf(outf, summary,
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
dashes, dashes, dashes, dashes, dashes, dashes);
error_str[0] = '\0';
if (error_cum)
sprintf(error_str, "%u", error_cum);
fprintf(outf, "%6.6s %11.6f %11.11s %9u %9.9s %s\n",
"100.00", float_tv_cum, "",
call_cum, error_cum, "total");
call_cum, error_str, "total");
}
void
@ -200,8 +236,8 @@ call_summary(FILE *outf)
set_personality(i);
if (i)
fprintf(outf,
"System call usage summary for %s mode:\n",
personality_names[i]);
"System call usage summary for %d bit mode:\n",
current_wordsize * 8);
call_summary_pers(outf);
}

21
debian/changelog.in vendored
View File

@ -4,18 +4,6 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
strace (4.22-1) unstable; urgency=medium
* New upstream version.
-- Dmitry V. Levin <ldv@altlinux.org> Thu, 05 Apr 2018 04:05:06 +0000
strace (4.21-1) unstable; urgency=medium
* New upstream version.
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 13 Feb 2018 23:24:25 +0000
strace (4.20-1) unstable; urgency=medium
* New upstream version.
@ -941,24 +929,23 @@ strace (3.1-4) unstable; urgency=low
* Fixed changestemplate
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Thu, 12 Sep 1996 14:59:44 +0200
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>, Thu Sep 12 14:59:44 MET DST 1996
strace (3.1-3) unstable; urgency=low
* Revamped debian files
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Thu, 11 Jul 1996 20:19:11 +0200
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>, Thu Jul 11 20:19:11 MET DST 1996
strace (3.1-2) unstable; urgency=low
* Added some #ifdef's around IPX stuff to make it compilable on non-Linux
systems.
* changed debian.control and debian.rules to conform to new debian naming
schemes
* added architecture-option to debian.rules and debian.control
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Thu, 1 Jul 1996 00:00:00 +0000
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>
strace (3.1-1) unstable; urgency=low
@ -971,4 +958,4 @@ strace (3.1-1) unstable; urgency=low
* added IP, IPX and TCP support to get-/setsockopt()
* added IPX support
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Thu, 1 Jun 1996 00:00:00 +0000
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>

16
debian/control vendored
View File

@ -2,14 +2,14 @@ Source: strace
Maintainer: Steve McIntyre <93sam@debian.org>
Section: utils
Priority: optional
Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [amd64 i386 powerpc ppc64 ppc64el s390 s390x sparc sparc64 x32], debhelper (>= 7.0.0), gawk, libdw-dev, libiberty-dev, libbluetooth-dev
Standards-Version: 4.1.3
Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [amd64 i386 powerpc ppc64 s390 sparc sparc64 x32], debhelper (>= 7.0.0), gawk
Standards-Version: 3.9.8
Homepage: https://strace.io
Vcs-Git: https://salsa.debian.org/debian/strace.git
Vcs-Browser: https://salsa.debian.org/debian/strace
Vcs-Git: https://anonscm.debian.org/git/collab-maint/strace.git
Vcs-Browser: https://anonscm.debian.org/git/collab-maint/strace.git
Package: strace
Architecture: linux-any
Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: System call tracer
strace is a system call tracer, i.e. a debugging tool which prints out
@ -23,7 +23,7 @@ Description: System call tracer
Package: strace64
Architecture: i386 powerpc s390 sparc
Priority: optional
Priority: extra
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: System call tracer for 64bit binaries
strace is a system call tracer, i.e. a debugging tool which prints out
@ -41,8 +41,8 @@ Description: System call tracer for 64bit binaries
Package: strace-udeb
Section: debian-installer
XC-Package-Type: udeb
Priority: optional
Architecture: linux-any
Priority: extra
Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 sh4 sparc sparc64 x32
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: System call tracer
strace is a system call tracer, i.e. a debugging tool which prints out

8
debian/copyright vendored
View File

@ -1,7 +1,7 @@
This is the Debian packaged version of strace. For a complete list of
changes from the upstream version please see the changelog.
The upstream sources can be found at https://github.com/strace/strace/
The upstream sources can be found at http://sourceforge.net/projects/strace/
This is the copyright as found in the upstream sources:
@ -10,8 +10,10 @@ Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
Copyright (c) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
Copyright (c) 2001-2018 The strace developers.
Copyright (c) 1998-2003 Wichert Akkerman <wakkerma@deephackmode.org>
Copyright (c) 2002-2008 Roland McGrath <roland@redhat.com>
Copyright (c) 2003-2008 Dmitry V. Levin <ldv@altlinux.org>
Copyright (c) 2007-2008 Jan Kratochvil <jan.kratochvil@redhat.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

26
debian/rules vendored
View File

@ -5,7 +5,6 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
CFLAGS += -Wall -g
@ -20,7 +19,9 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
extra_build_targets += build-udeb-stamp
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
@ -43,34 +44,25 @@ build: build-arch build-indep
build-arch: build-stamp $(extra_build_targets)
build-indep: build-stamp $(extra_build_targets)
configure:
./bootstrap
%-stamp: %/Makefile
$(MAKE) -C $*
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
$*/strace -V
$(MAKE) -C $* check VERBOSE=1
endif
touch $@
build/Makefile: configure
build/Makefile:
mkdir -p $(@D)
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr $(CONFIG_OPTS)
cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS)
build-udeb/Makefile: configure
build64/Makefile:
mkdir -p $(@D)
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr \
--without-stacktrace --without-libiberty $(CONFIG_OPTS)
build64/Makefile: configure
mkdir -p $(@D)
cd $(@D); CC="$(CC64)" sh ../configure --enable-mpers=check --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
clean:
dh_testdir
dh_testroot
rm -rf build build-udeb build64 strace64.1 debian/strace64.substvars
rm -rf build build64 strace64.1 debian/strace64.substvars
dh_clean
binary: binary-indep binary-arch
@ -82,7 +74,7 @@ binary-arch: build
# prepare 64bit executable and manpage, if it has been built
test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
mv build64/strace.1 build64/strace64.1 ) || true
cp strace.1 strace64.1 ) || true
dh_testdir -a
dh_testroot -a

View File

@ -1 +1 @@
build-udeb/strace usr/bin
build/strace usr/bin

View File

@ -1,2 +1,2 @@
build/strace.1
build/strace-log-merge.1
strace.1
strace-log-merge.1

View File

@ -1 +1 @@
build64/strace64.1
strace64.1

727
defs.h

File diff suppressed because it is too large Load Diff

154
delay.c
View File

@ -1,154 +0,0 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
struct inject_delay_data {
struct timespec ts_enter;
struct timespec ts_exit;
};
static struct inject_delay_data *delay_data_vec;
static size_t delay_data_vec_capacity; /* size of the arena */
static size_t delay_data_vec_size; /* size of the used arena */
static timer_t delay_timer = (timer_t) -1;
static bool delay_timer_is_armed;
static void
expand_delay_data_vec(void)
{
const size_t old_capacity = delay_data_vec_capacity;
delay_data_vec = xgrowarray(delay_data_vec, &delay_data_vec_capacity,
sizeof(*delay_data_vec));
memset(delay_data_vec + old_capacity, 0,
(delay_data_vec_capacity - old_capacity)
* sizeof(*delay_data_vec));
}
uint16_t
alloc_delay_data(void)
{
const uint16_t rval = delay_data_vec_size;
if (rval < delay_data_vec_size)
error_func_msg_and_die("delay index overflow");
if (delay_data_vec_size == delay_data_vec_capacity)
expand_delay_data_vec();
++delay_data_vec_size;
return rval;
}
void
fill_delay_data(uint16_t delay_idx, int intval, bool isenter)
{
if (delay_idx >= delay_data_vec_size)
error_func_msg_and_die("delay_idx >= delay_data_vec_size");
struct timespec *ts;
if (isenter)
ts = &(delay_data_vec[delay_idx].ts_enter);
else
ts = &(delay_data_vec[delay_idx].ts_exit);
ts->tv_sec = intval / 1000000;
ts->tv_nsec = intval % 1000000 * 1000;
}
static bool
is_delay_timer_created(void)
{
return delay_timer != (timer_t) -1;
}
bool
is_delay_timer_armed(void)
{
return delay_timer_is_armed;
}
void
delay_timer_expired(void)
{
delay_timer_is_armed = false;
}
void
arm_delay_timer(const struct tcb *const tcp)
{
const struct itimerspec its = {
.it_value = tcp->delay_expiration_time
};
if (timer_settime(delay_timer, TIMER_ABSTIME, &its, NULL))
perror_msg_and_die("timer_settime");
delay_timer_is_armed = true;
debug_func_msg("timer set to %lld.%09ld for pid %d",
(long long) tcp->delay_expiration_time.tv_sec,
(long) tcp->delay_expiration_time.tv_nsec,
tcp->pid);
}
void
delay_tcb(struct tcb *tcp, uint16_t delay_idx, bool isenter)
{
if (delay_idx >= delay_data_vec_size)
error_func_msg_and_die("delay_idx >= delay_data_vec_size");
debug_func_msg("delaying pid %d on %s",
tcp->pid, isenter ? "enter" : "exit");
tcp->flags |= TCB_DELAYED;
struct timespec *ts_diff;
if (isenter)
ts_diff = &(delay_data_vec[delay_idx].ts_enter);
else
ts_diff = &(delay_data_vec[delay_idx].ts_exit);
struct timespec ts_now;
clock_gettime(CLOCK_MONOTONIC, &ts_now);
ts_add(&tcp->delay_expiration_time, &ts_now, ts_diff);
if (is_delay_timer_created()) {
struct itimerspec its;
if (timer_gettime(delay_timer, &its))
perror_msg_and_die("timer_gettime");
const struct timespec *const ts_old = &its.it_value;
if (ts_nz(ts_old) && ts_cmp(ts_diff, ts_old) > 0)
return;
} else {
if (timer_create(CLOCK_MONOTONIC, NULL, &delay_timer))
perror_msg_and_die("timer_create");
}
arm_delay_timer(tcp);
}

40
desc.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-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -30,7 +30,6 @@
*/
#include "defs.h"
#include "xstring.h"
SYS_FUNC(close)
{
@ -158,9 +157,7 @@ decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
/* +2 chars needed at the end: ']',NUL */
if (outptr < end_outstr - (sizeof(", except [") + sizeof(int)*3 + 2)) {
if (first) {
outptr = xappendstr(outstr,
outptr,
"%s%s [%u",
outptr += sprintf(outptr, "%s%s [%u",
sep,
i == 0 ? "in" : i == 1 ? "out" : "except",
j
@ -168,9 +165,7 @@ decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
first = 0;
sep = ", ";
} else {
outptr = xappendstr(outstr,
outptr,
" %u", j);
outptr += sprintf(outptr, " %u", j);
}
}
if (--ready_fds == 0)
@ -184,8 +179,7 @@ decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
if (args[4]) {
const char *str = sprint_tv_ts(tcp, args[4]);
if (outptr + sizeof("left ") + strlen(sep) + strlen(str) < end_outstr) {
outptr = xappendstr(outstr, outptr,
"%sleft %s", sep, str);
outptr += sprintf(outptr, "%sleft %s", sep, str);
}
}
*outptr = '\0';
@ -196,21 +190,29 @@ decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
return 0;
}
#if HAVE_ARCH_OLD_SELECT
SYS_FUNC(oldselect)
{
kernel_ulong_t *args =
fetch_indirect_syscall_args(tcp, tcp->u_arg[0], 5);
kernel_ulong_t select_args[5];
unsigned int oldselect_args[5];
if (args) {
return decode_select(tcp, args, print_timeval, sprint_timeval);
if (sizeof(*select_args) == sizeof(*oldselect_args)) {
if (umove_or_printaddr(tcp, tcp->u_arg[0], &select_args)) {
return 0;
}
} else {
if (entering(tcp))
printaddr(tcp->u_arg[0]);
return RVAL_DECODED;
unsigned int i;
if (umove_or_printaddr(tcp, tcp->u_arg[0], &oldselect_args)) {
return 0;
}
for (i = 0; i < 5; ++i) {
select_args[i] = oldselect_args[i];
}
}
return decode_select(tcp, select_args, print_timeval, sprint_timeval);
}
#endif /* HAVE_ARCH_OLD_SELECT */
#ifdef ALPHA
SYS_FUNC(osf_select)

39
dm.c
View File

@ -5,7 +5,7 @@
* Copyright (c) 2016 Masatake Yamato <yamato@redhat.com>
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016 Eugene Syromyatnikov <evgsyr@gmail.com>
* Copyright (c) 2016-2018 The strace developers.
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -91,7 +91,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
case DM_DEV_SUSPEND:
if (ioc->flags & DM_SUSPEND_FLAG)
break;
ATTRIBUTE_FALLTHROUGH;
/* Fall through */
case DM_DEV_RENAME:
case DM_DEV_REMOVE:
case DM_DEV_WAIT:
@ -237,7 +237,7 @@ dm_decode_dm_target_deps(struct tcb *const tcp, const kernel_ulong_t addr,
tprints(", deps=");
print_array(tcp, addr + offset_end, s.count, &dev_buf, sizeof(dev_buf),
tfetch_mem, dm_print_dev, NULL);
umoven_or_printaddr, dm_print_dev, NULL);
tprints("}");
@ -258,7 +258,6 @@ dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ulong_t addr,
uint32_t offset = ioc->data_start;
uint32_t offset_end = 0;
uint32_t count;
int rc;
if (ioc->data_start == ioc->data_size)
return;
@ -289,36 +288,8 @@ dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ulong_t addr,
PRINT_FIELD_DEV("{", s, dev);
tprints(", name=");
rc = printstr_ex(tcp, addr + offset_end,
ioc->data_size - offset_end,
QUOTE_0_TERMINATED);
/*
* In Linux v4.13-rc1~137^2~13 it has been decided to cram in
* one more undocumented field after the device name, as if the
* format decoding was not twisted enough already. So, we have
* to check "next" now, and if it _looks like_ that there is
* a space for one additional integer, let's print it. As if the
* perversity with "name string going further than pointer to
* the next one" wasn't enough. Moreover, the calculation was
* broken for m32 on 64-bit kernels until v4.14-rc4~20^2~3, and
* we have no ability to detect kernel bit-ness (on x86, at
* least), so refrain from printing it for the DM versions below
* 4.37 (the original version was also aligned differently than
* now even on 64 bit).
*/
if ((rc > 0) && ioc->version[1] >= 37) {
kernel_ulong_t event_addr =
(addr + offset_end + rc + 7) & ~7;
uint32_t event_nr;
if ((event_addr + sizeof(event_nr)) <=
(addr + offset + s.next) &&
!umove(tcp, event_addr, &event_nr))
tprintf(", event_nr=%" PRIu32, event_nr);
}
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
QUOTE_0_TERMINATED);
tprints("}");
if (!s.next)

View File

@ -2,7 +2,7 @@
* Copyright (c) 2004-2007 Ulrich Drepper <drepper@redhat.com>
* Copyright (c) 2004 Roland McGrath <roland@redhat.com>
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -94,7 +94,7 @@ epoll_wait_common(struct tcb *tcp)
} else {
struct epoll_event ev;
print_array(tcp, tcp->u_arg[1], tcp->u_rval, &ev, sizeof(ev),
tfetch_mem, print_epoll_event, 0);
umoven_or_printaddr, print_epoll_event, 0);
tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -90,7 +90,6 @@ error_msg_and_die(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(0, fmt, p);
va_end(p);
die();
}
@ -101,7 +100,6 @@ error_msg_and_help(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(0, fmt, p);
va_end(p);
}
fprintf(stderr, "Try '%s -h' for more information.\n",
program_invocation_name);
@ -123,6 +121,5 @@ perror_msg_and_die(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(errno, fmt, p);
va_end(p);
die();
}

181
evdev.c
View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2015 Etienne Gemsa <etienne.gemsa@lse.epita.fr>
* Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -29,13 +29,21 @@
#include "defs.h"
#include "xlat/evdev_abs.h"
#ifdef HAVE_LINUX_INPUT_H
#include DEF_MPERS_TYPE(struct_ff_effect)
# include <linux/ioctl.h>
# include <linux/input.h>
typedef struct ff_effect struct_ff_effect;
#endif /* HAVE_LINUX_INPUT_H */
#include MPERS_DEFS
#ifdef HAVE_LINUX_INPUT_H
# include "xlat/evdev_autorepeat.h"
# include "xlat/evdev_ff_status.h"
# include "xlat/evdev_ff_types.h"
@ -53,7 +61,98 @@
# define SYN_MAX 0xf
# endif
const size_t evdev_abs_size = ARRAY_SIZE(evdev_abs) - 1;
static void
decode_envelope(void *const data)
{
const struct ff_envelope *const envelope = data;
tprintf(", envelope={attack_length=%" PRIu16
", attack_level=%" PRIu16
", fade_length=%" PRIu16
", fade_level=%#x}",
envelope->attack_length,
envelope->attack_level,
envelope->fade_length,
envelope->fade_level);
}
static int
ff_effect_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
struct_ff_effect ffe;
if (umove_or_printaddr(tcp, arg, &ffe))
return RVAL_IOCTL_DECODED;
tprints("{type=");
printxval(evdev_ff_types, ffe.type, "FF_???");
tprintf(", id=%" PRIu16
", direction=%" PRIu16 ", ",
ffe.id,
ffe.direction);
if (abbrev(tcp)) {
tprints("...}");
return RVAL_IOCTL_DECODED;
}
tprintf("trigger={button=%" PRIu16
", interval=%" PRIu16 "}"
", replay={length=%" PRIu16
", delay=%" PRIu16 "}",
ffe.trigger.button,
ffe.trigger.interval,
ffe.replay.length,
ffe.replay.delay);
switch (ffe.type) {
case FF_CONSTANT:
tprintf(", constant={level=%" PRId16,
ffe.u.constant.level);
decode_envelope(&ffe.u.constant.envelope);
tprints("}");
break;
case FF_RAMP:
tprintf(", ramp={start_level=%" PRId16
", end_level=%" PRId16,
ffe.u.ramp.start_level,
ffe.u.ramp.end_level);
decode_envelope(&ffe.u.ramp.envelope);
tprints("}");
break;
case FF_PERIODIC:
tprintf(", periodic={waveform=%" PRIu16
", period=%" PRIu16
", magnitude=%" PRId16
", offset=%" PRId16
", phase=%" PRIu16,
ffe.u.periodic.waveform,
ffe.u.periodic.period,
ffe.u.periodic.magnitude,
ffe.u.periodic.offset,
ffe.u.periodic.phase);
decode_envelope(&ffe.u.periodic.envelope);
tprintf(", custom_len=%u, custom_data=",
ffe.u.periodic.custom_len);
printaddr(ptr_to_kulong(ffe.u.periodic.custom_data));
tprints("}");
break;
case FF_RUMBLE:
tprintf(", rumble={strong_magnitude=%" PRIu16
", weak_magnitude=%" PRIu16 "}",
ffe.u.rumble.strong_magnitude,
ffe.u.rumble.weak_magnitude);
break;
default:
break;
}
tprints("}");
return RVAL_IOCTL_DECODED;
}
static int
abs_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
@ -98,7 +197,7 @@ keycode_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
if (!umove_or_printaddr(tcp, arg, &keycode)) {
tprintf("[%u, ", keycode[0]);
printxval_index(evdev_keycode, keycode[1], "KEY_???");
printxval(evdev_keycode, keycode[1], "KEY_???");
tprints("]");
}
@ -125,7 +224,7 @@ keycode_V2_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
unsigned int i;
tprintf("index=%" PRIu16 ", keycode=", ike.index);
printxval_index(evdev_keycode, ike.keycode, "KEY_???");
printxval(evdev_keycode, ike.keycode, "KEY_???");
tprints(", scancode=[");
for (i = 0; i < ARRAY_SIZE(ike.scancode); i++) {
if (i > 0)
@ -164,9 +263,9 @@ getid_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
}
static int
decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
const struct xlat decode_nr[], const unsigned int max_nr,
const char *const dflt, size_t decode_nr_size, enum xlat_type xt)
decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
const struct xlat decode_nr[], const unsigned int max_nr,
const char *const dflt)
{
tprints(", ");
@ -187,7 +286,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
if (i < 0) {
tprints(" 0 ");
} else {
printxval_dispatch(decode_nr, decode_nr_size, i, dflt, xt);
printxval(decode_nr, i, dflt);
while ((i = next_set_bit(decoded_arg, i + 1, size)) > 0) {
if (abbrev(tcp) && bit_displayed >= 3) {
@ -195,8 +294,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
break;
}
tprints(", ");
printxval_dispatch(decode_nr, decode_nr_size, i, dflt,
xt);
printxval(decode_nr, i, dflt);
bit_displayed++;
}
}
@ -206,10 +304,6 @@ 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_) \
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
(dflt_), ARRAY_SIZE(decode_nr_), (xt_))
# ifdef EVIOCGMTSLOTS
static int
mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
@ -260,42 +354,43 @@ bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,
switch (ev_nr) {
case EV_SYN:
return decode_bitset(tcp, arg, evdev_sync,
SYN_MAX, "SYN_???", XT_INDEXED);
SYN_MAX, "SYN_???");
case EV_KEY:
return decode_bitset(tcp, arg, evdev_keycode,
KEY_MAX, "KEY_???", XT_INDEXED);
KEY_MAX, "KEY_???");
case EV_REL:
return decode_bitset(tcp, arg, evdev_relative_axes,
REL_MAX, "REL_???", XT_INDEXED);
REL_MAX, "REL_???");
case EV_ABS:
return decode_bitset(tcp, arg, evdev_abs,
ABS_MAX, "ABS_???", XT_INDEXED);
ABS_MAX, "ABS_???");
case EV_MSC:
return decode_bitset(tcp, arg, evdev_misc,
MSC_MAX, "MSC_???", XT_INDEXED);
MSC_MAX, "MSC_???");
# ifdef EV_SW
case EV_SW:
return decode_bitset(tcp, arg, evdev_switch,
SW_MAX, "SW_???", XT_INDEXED);
SW_MAX, "SW_???");
# endif
case EV_LED:
return decode_bitset(tcp, arg, evdev_leds,
LED_MAX, "LED_???", XT_INDEXED);
LED_MAX, "LED_???");
case EV_SND:
return decode_bitset(tcp, arg, evdev_snd,
SND_MAX, "SND_???", XT_INDEXED);
SND_MAX, "SND_???");
case EV_REP:
return decode_bitset(tcp, arg, evdev_autorepeat,
REP_MAX, "REP_???", XT_INDEXED);
REP_MAX, "REP_???");
case EV_FF:
return decode_bitset(tcp, arg, evdev_ff_types,
FF_MAX, "FF_???", XT_SORTED);
FF_MAX, "FF_???");
case EV_PWR:
tprints(", ");
printnum_int(tcp, arg, "%d");
return RVAL_IOCTL_DECODED;
case EV_FF_STATUS:
return decode_bitset(tcp, arg, evdev_ff_status,
FF_STATUS_MAX, "FF_STATUS_???",
XT_INDEXED);
FF_STATUS_MAX, "FF_STATUS_???");
default:
tprints(", ");
printaddr(arg);
@ -349,23 +444,22 @@ evdev_read_ioctl(struct tcb *const tcp, const unsigned int code,
# ifdef EVIOCGPROP
case _IOC_NR(EVIOCGPROP(0)):
return decode_bitset(tcp, arg, evdev_prop,
INPUT_PROP_MAX, "PROP_???",
XT_INDEXED);
INPUT_PROP_MAX, "PROP_???");
# endif
case _IOC_NR(EVIOCGSND(0)):
return decode_bitset(tcp, arg, evdev_snd,
SND_MAX, "SND_???", XT_INDEXED);
SND_MAX, "SND_???");
# ifdef EVIOCGSW
case _IOC_NR(EVIOCGSW(0)):
return decode_bitset(tcp, arg, evdev_switch,
SW_MAX, "SW_???", XT_INDEXED);
SW_MAX, "SW_???");
# endif
case _IOC_NR(EVIOCGKEY(0)):
return decode_bitset(tcp, arg, evdev_keycode,
KEY_MAX, "KEY_???", XT_INDEXED);
KEY_MAX, "KEY_???");
case _IOC_NR(EVIOCGLED(0)):
return decode_bitset(tcp, arg, evdev_leds,
LED_MAX, "LED_???", XT_INDEXED);
LED_MAX, "LED_???");
}
/* multi-number fixed-length commands */
@ -395,6 +489,8 @@ evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
case EVIOCSKEYCODE_V2:
return keycode_V2_ioctl(tcp, arg);
# endif
case EVIOCSFF:
return ff_effect_ioctl(tcp, arg);
case EVIOCRMFF:
tprintf(", %d", (int) arg);
return RVAL_IOCTL_DECODED;
@ -410,12 +506,6 @@ evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
printnum_int(tcp, arg, "%u");
return RVAL_IOCTL_DECODED;
# endif
default: {
int rc = evdev_write_ioctl_mpers(tcp, code, arg);
if (rc != RVAL_DECODED)
return rc;
}
}
/* multi-number fixed-length commands */
@ -425,15 +515,8 @@ evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
return 0;
}
void
print_evdev_ff_type(const kernel_ulong_t val)
{
printxval(evdev_ff_types, val, "FF_???");
}
int
evdev_ioctl(struct tcb *const tcp,
const unsigned int code, const kernel_ulong_t arg)
MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp,
const unsigned int code, const kernel_ulong_t arg)
{
switch (_IOC_DIR(code)) {
case _IOC_READ:

View File

@ -1,151 +0,0 @@
/*
* Copyright (c) 2015 Etienne Gemsa <etienne.gemsa@lse.epita.fr>
* Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#ifdef HAVE_LINUX_INPUT_H
#include DEF_MPERS_TYPE(struct_ff_effect)
# include <linux/ioctl.h>
# include <linux/input.h>
typedef struct ff_effect struct_ff_effect;
#endif /* HAVE_LINUX_INPUT_H */
#include MPERS_DEFS
#ifdef HAVE_LINUX_INPUT_H
static void
decode_envelope(void *const data)
{
const struct ff_envelope *const envelope = data;
tprintf(", envelope={attack_length=%" PRIu16
", attack_level=%" PRIu16
", fade_length=%" PRIu16
", fade_level=%#x}",
envelope->attack_length,
envelope->attack_level,
envelope->fade_length,
envelope->fade_level);
}
static int
ff_effect_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
{
tprints(", ");
struct_ff_effect ffe;
if (umove_or_printaddr(tcp, arg, &ffe))
return RVAL_IOCTL_DECODED;
tprints("{type=");
print_evdev_ff_type(ffe.type);
tprintf(", id=%" PRIu16
", direction=%" PRIu16 ", ",
ffe.id,
ffe.direction);
if (abbrev(tcp)) {
tprints("...}");
return RVAL_IOCTL_DECODED;
}
tprintf("trigger={button=%" PRIu16
", interval=%" PRIu16 "}"
", replay={length=%" PRIu16
", delay=%" PRIu16 "}",
ffe.trigger.button,
ffe.trigger.interval,
ffe.replay.length,
ffe.replay.delay);
switch (ffe.type) {
case FF_CONSTANT:
tprintf(", constant={level=%" PRId16,
ffe.u.constant.level);
decode_envelope(&ffe.u.constant.envelope);
tprints("}");
break;
case FF_RAMP:
tprintf(", ramp={start_level=%" PRId16
", end_level=%" PRId16,
ffe.u.ramp.start_level,
ffe.u.ramp.end_level);
decode_envelope(&ffe.u.ramp.envelope);
tprints("}");
break;
case FF_PERIODIC:
tprintf(", periodic={waveform=%" PRIu16
", period=%" PRIu16
", magnitude=%" PRId16
", offset=%" PRId16
", phase=%" PRIu16,
ffe.u.periodic.waveform,
ffe.u.periodic.period,
ffe.u.periodic.magnitude,
ffe.u.periodic.offset,
ffe.u.periodic.phase);
decode_envelope(&ffe.u.periodic.envelope);
tprintf(", custom_len=%u, custom_data=",
ffe.u.periodic.custom_len);
printaddr(ptr_to_kulong(ffe.u.periodic.custom_data));
tprints("}");
break;
case FF_RUMBLE:
tprintf(", rumble={strong_magnitude=%" PRIu16
", weak_magnitude=%" PRIu16 "}",
ffe.u.rumble.strong_magnitude,
ffe.u.rumble.weak_magnitude);
break;
default:
break;
}
tprints("}");
return RVAL_IOCTL_DECODED;
}
MPERS_PRINTER_DECL(int, evdev_write_ioctl_mpers, struct tcb *const tcp,
const unsigned int code, const kernel_ulong_t arg)
{
switch (code) {
case EVIOCSFF:
return ff_effect_ioctl(tcp, arg);
default:
return RVAL_DECODED;
}
}
#endif /* HAVE_LINUX_INPUT_H */

View File

@ -6,7 +6,7 @@
* Copyright (c) 2007 Roland McGrath <roland@redhat.com>
* Copyright (c) 2011-2012 Denys Vlasenko <vda.linux@googlemail.com>
* Copyright (c) 2010-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -57,11 +57,8 @@ printargv(struct tcb *const tcp, kernel_ulong_t addr)
if (umoven(tcp, addr, wordsize, cp.data)) {
if (sep == start_sep)
printaddr(addr);
else {
tprints(", ...");
printaddr_comment(addr);
tprints("]");
}
else
tprints(", ???]");
return;
}
if (!(wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64)) {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -75,12 +75,10 @@ SYS_FUNC(fanotify_mark)
#endif
printflags64(fan_event_flags, mask, "FAN_???");
tprints(", ");
if ((int) tcp->u_arg[argn] == FAN_NOFD) {
print_xlat_d(FAN_NOFD);
tprints(", ");
} else {
if ((int) tcp->u_arg[argn] == FAN_NOFD)
tprints("FAN_NOFD, ");
else
print_dirfd(tcp, tcp->u_arg[argn]);
}
printpath(tcp, tcp->u_arg[argn + 1]);
return RVAL_DECODED;

23
fcntl.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-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -35,6 +35,7 @@
#include "xlat/f_owner_types.h"
#include "xlat/f_seals.h"
#include "xlat/fcntlcmds.h"
#include "xlat/fcntl64cmds.h"
#include "xlat/fdflags.h"
#include "xlat/lockfcmds.h"
#include "xlat/notifyflags.h"
@ -196,7 +197,18 @@ SYS_FUNC(fcntl)
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
printxval(fcntlcmds, tcp->u_arg[1], "F_???");
const unsigned int cmd = tcp->u_arg[1];
const char *str = xlookup(fcntlcmds, cmd);
if (str) {
tprints(str);
} else {
/*
* fcntl syscall does not recognize these
* constants, but we would like to show them
* for better debugging experience.
*/
printxval(fcntl64cmds, cmd, "F_???");
}
}
return print_fcntl(tcp);
}
@ -207,7 +219,12 @@ SYS_FUNC(fcntl64)
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
printxval(fcntlcmds, cmd, "F_???");
const char *str = xlookup(fcntl64cmds, cmd);
if (str) {
tprints(str);
} else {
printxval(fcntlcmds, cmd, "F_???");
}
}
switch (cmd) {
case F_SETLK64:

View File

@ -1,55 +0,0 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
/*
* Fetch indirect syscall arguments that are provided as an array.
* Return a pointer to a static array of kernel_ulong_t elements,
* or NULL in case of fetch failure.
*/
kernel_ulong_t *
fetch_indirect_syscall_args(struct tcb *const tcp,
const kernel_ulong_t addr,
const unsigned int n_args)
{
static kernel_ulong_t u_arg[MAX_ARGS];
if (current_wordsize == sizeof(*u_arg)) {
if (umoven(tcp, addr, sizeof(*u_arg) * n_args, u_arg))
return NULL;
} else {
uint32_t narrow_arg[ARRAY_SIZE(u_arg)];
if (umoven(tcp, addr, sizeof(*narrow_arg) * n_args, narrow_arg))
return NULL;
for (unsigned int i = 0; i < n_args; ++i)
u_arg[i] = narrow_arg[i];
}
return u_arg;
}

View File

@ -10,7 +10,6 @@ fi
: ${DATE_FILE:=$(dirname "$FILE")/.$(basename "${FILE}").date}
: ${DEFAULT_DATE:=$2}
: ${DATE_FORMAT:=%Y-%m-%d}
LC_TIME=C; export LC_TIME
date=
@ -24,19 +23,13 @@ date=
[ -n "${date}" ] ||
date="$(git log -n 1 --format=format:%cD --no-patch "${FILE}")"
[ -n "${date}" ] ||
date="${DEFAULT_DATE}"
[ -n "${date}" ] || year="${DEFAULT_DATE}"
[ -n "${date}" ] ||
[ -z "${SOURCE_DATE_EPOCH-}" ] ||
date="$(date -u -d "@${SOURCE_DATE_EPOCH}")"
[ -n "${date}" ] ||
date="$(date -u)"
[ -n "${date}" ] || date="$(date -u)"
[ -n "${date}" ] || {
echo >&2 'Undefined date.'
exit 1
}
exec printf "%s" $(date -u "+${DATE_FORMAT}" -d "${date}")
exec printf "%s" $(date "+${DATE_FORMAT}" -d "${date}")

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016 Jeff Mahoney <jeffm@suse.com>
* Copyright (c) 2016-2018 The strace developers.
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -185,7 +185,7 @@ file_ioctl(struct tcb *const tcp, const unsigned int code,
rc = print_array(tcp, arg + offsetof(typeof(args), info),
args.dest_count, &info, sizeof(info),
tfetch_mem,
umoven_or_printaddr,
print_file_dedupe_range_info, limit);
tprints("}");
@ -225,15 +225,15 @@ file_ioctl(struct tcb *const tcp, const unsigned int code,
"FIEMAP_FLAG_???");
tprintf(", fm_mapped_extents=%u",
args.fm_mapped_extents);
tprints(", fm_extents=");
if (abbrev(tcp)) {
tprints(", ...");
tprints("...");
} else {
struct fiemap_extent fe;
tprints(", fm_extents=");
print_array(tcp,
arg + offsetof(typeof(args), fm_extents),
args.fm_mapped_extents, &fe, sizeof(fe),
tfetch_mem,
umoven_or_printaddr,
print_fiemap_extent, 0);
}
tprints("}");

130
filter.c Normal file
View File

@ -0,0 +1,130 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include "filter.h"
#define FILTER_TYPE(name) \
{#name, parse_ ## name ## _filter, run_ ## name ## _filter, \
free_ ## name ## _filter}
/* End of FILTER_TYPE definition. */
static const struct filter_type {
const char *name;
void *(*parse_filter)(const char *, bool);
bool (*run_filter)(struct tcb *, void *);
void (*free_priv_data)(void *);
} filter_types[] = {
FILTER_TYPE(syscall),
FILTER_TYPE(fd),
FILTER_TYPE(path),
};
#undef FILTER_TYPE
struct filter {
const struct filter_type *type;
void *priv_data;
};
static const struct filter_type *
lookup_filter_type(const char *str)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(filter_types); i++) {
if (!strcmp(filter_types[i].name, str))
return &filter_types[i];
}
return NULL;
}
struct filter *
add_filter_to_array(struct filter **filters, unsigned int *nfilters,
const char *name)
{
const struct filter_type *type = lookup_filter_type(name);
struct filter *filter;
if (!type)
error_msg_and_die("invalid filter '%s'", name);
*filters = xreallocarray(*filters, ++(*nfilters),
sizeof(struct filter));
filter = &((*filters)[*nfilters - 1]);
filter->type = type;
return filter;
}
void
parse_filter(struct filter *filter, const char *str, bool qualify_mode)
{
filter->priv_data = filter->type->parse_filter(str, qualify_mode);
}
static bool
run_filter(struct tcb *tcp, struct filter *filter)
{
return filter->type->run_filter(tcp, filter->priv_data);
}
void
run_filters(struct tcb *tcp, struct filter *filters, unsigned int nfilters,
bool *variables_buf)
{
unsigned int i;
for (i = 0; i < nfilters; ++i)
variables_buf[i] = run_filter(tcp, &filters[i]);
}
void
free_filter(struct filter *filter)
{
if (!filter)
return;
filter->type->free_priv_data(filter->priv_data);
}
void
set_filters_qualify_mode(struct filter **filters, unsigned int *nfilters,
unsigned int filters_left)
{
unsigned int i;
for (i = 0; i < *nfilters - filters_left; ++i)
free_filter(*filters + i);
for (i = 0; i < filters_left; ++i)
(*filters)[i] = (*filters)[*nfilters - filters_left + i];
*filters = xreallocarray(*filters, filters_left, sizeof(struct filter));
*nfilters = filters_left;
}
void
set_filter_priv_data(struct filter *filter, void *priv_data)
{
if (filter)
filter->priv_data = priv_data;
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* Copyright (c) 2017-2018 The strace developers.
* Copyright (c) 2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -30,10 +30,93 @@
#define STRACE_FILTER_H
struct number_set;
struct filter;
struct filter_action;
struct bool_expression;
typedef int (*string_to_uint_func)(const char *);
void qualify_tokens(const char *str, struct number_set *set,
string_to_uint_func func, const char *name);
void qualify_syscall_tokens(const char *str, struct number_set *set);
string_to_uint_func func, const char *name,
bool qualify_mode);
void qualify_syscall_tokens(const char *str, struct number_set *set,
bool qualify_mode);
void parse_inject_common_args(char *, struct inject_opts *,
const bool fault_tokens_only, bool qualify_mode);
bool is_traced(struct tcb *);
bool not_injected(struct tcb *);
typedef bool (*match_fd_func)(struct tcb *, int, void *);
int match_fd_common(struct tcb *, match_fd_func, void *);
/* filter api */
struct filter* add_filter_to_array(struct filter **, unsigned int *nfilters,
const char *name);
void parse_filter(struct filter *, const char *str, bool qualify_mode);
void run_filters(struct tcb *, struct filter *, unsigned int, bool *);
void free_filter(struct filter *);
void set_filters_qualify_mode(struct filter **, unsigned int *nfilters,
unsigned int filters_left);
void set_filter_priv_data(struct filter *, void *);
/* filter action api */
struct filter *create_filter(struct filter_action *, const char *name);
struct filter_action *find_or_add_action(const char *);
void parse_filter_action(const char *, const char *, const char *);
void set_qualify_mode(struct filter_action *, unsigned int);
void set_filter_action_priv_data(struct filter_action *, void *);
/* filter expression api */
struct bool_expression *create_expression();
bool run_expression(struct bool_expression *, bool *, unsigned int);
void set_expression_qualify_mode(struct bool_expression *, unsigned int);
void expression_add_filter_and(struct bool_expression *, unsigned int);
void parse_filter_expression(struct bool_expression *, const char *,
struct filter_action *, unsigned int);
void parse_qualify_action(const char *, const char *, const char *);
#define DECL_FILTER(name) \
extern void * \
parse_ ## name ## _filter(const char *, bool); \
extern bool \
run_ ## name ## _filter(struct tcb *, void *); \
extern void \
free_ ## name ## _filter(void *) \
/* End of DECL_FILTER definition. */
DECL_FILTER(syscall);
DECL_FILTER(fd);
DECL_FILTER(path);
#undef DECL_FILTER
#define DECL_FILTER_ACTION(name) \
extern void \
apply_ ## name(struct tcb *, void *) \
/* End of DECL_FILTER_ACTION definition. */
DECL_FILTER_ACTION(trace);
DECL_FILTER_ACTION(raw);
DECL_FILTER_ACTION(abbrev);
DECL_FILTER_ACTION(verbose);
DECL_FILTER_ACTION(inject);
DECL_FILTER_ACTION(fault);
DECL_FILTER_ACTION(read);
DECL_FILTER_ACTION(write);
DECL_FILTER_ACTION(stacktrace);
#undef DECL_FILTER_ACTION
#define DECL_FILTER_ACTION_PARSER(name) \
extern void * \
parse_ ## name(const char *); \
/* End of DECL_FILTER_ACTION_PARSER definition. */
DECL_FILTER_ACTION_PARSER(null);
DECL_FILTER_ACTION_PARSER(inject);
DECL_FILTER_ACTION_PARSER(fault);
#undef DECL_FILTER_ACTION_PARSER
#endif /* !STRACE_FILTER_H */

240
filter_action.c Normal file
View File

@ -0,0 +1,240 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include "filter.h"
#define FILTER_ACTION_TYPE(NAME, PRIORITY, FLAG, PARSER, PREFILTER) \
{#NAME, PRIORITY, FLAG, parse_ ## PARSER, PREFILTER, apply_ ## NAME}
/* End of FILTER_ACTION_TYPE definition. */
static const struct filter_action_type {
const char *name;
/* The highest priority is 0. */
unsigned int priority;
unsigned int qual_flg;
void * (*parse_args)(const char *);
bool (*prefilter)(struct tcb *);
void (*apply)(struct tcb *, void *);
} action_types[] = {
FILTER_ACTION_TYPE(trace, 0, QUAL_TRACE, null, NULL),
FILTER_ACTION_TYPE(inject, 1, QUAL_INJECT, inject, not_injected),
FILTER_ACTION_TYPE(fault, 1, QUAL_INJECT, fault, not_injected),
FILTER_ACTION_TYPE(raw, 2, QUAL_RAW, null, is_traced),
FILTER_ACTION_TYPE(abbrev, 2, QUAL_ABBREV, null, is_traced),
FILTER_ACTION_TYPE(verbose, 2, QUAL_VERBOSE, null, is_traced),
FILTER_ACTION_TYPE(read, 2, QUAL_READ, null, is_traced),
FILTER_ACTION_TYPE(write, 2, QUAL_WRITE, null, is_traced),
# ifdef USE_LIBUNWIND
FILTER_ACTION_TYPE(stacktrace, 2, QUAL_STACKTRACE, null, is_traced),
# endif
};
#undef FILTER_ACTION_TYPE
struct filter_action {
/* Used to correct order of actions with the same priority. */
unsigned int id;
const struct filter_action_type *type;
struct bool_expression *expr;
unsigned int nfilters;
struct filter *filters;
void *priv_data;
};
static unsigned int default_flags = DEFAULT_QUAL_FLAGS;
static struct filter_action *filter_actions;
static unsigned int nfilter_actions;
static bool *variables_buf;
/*
* Compares action priorities. If actions have the same priority,
* uses LIFO order.
*/
static int
compare_action_priority(const void *a, const void *b)
{
const struct filter_action *action_a = a;
const struct filter_action *action_b = b;
unsigned int priority_a = action_a->type->priority;
unsigned int priority_b = action_b->type->priority;
if (priority_a != priority_b) {
return (priority_a < priority_b) ? -1 : 1;
} else {
return (action_a->id > action_b->id) ? -1 : 1;
}
}
static void
inject_path_tracing(void)
{
struct filter_action *action = find_or_add_action("trace");
struct filter *path_filter;
if (!action->nfilters)
filtering_parse("trace=all");
path_filter = add_filter_to_array(&action->filters, &action->nfilters,
"path");
set_filter_priv_data(path_filter, &global_path_set);
expression_add_filter_and(action->expr, action->nfilters - 1);
}
void
filtering_parsing_finish(void)
{
unsigned int maxfilters = 0;
unsigned int i;
/* Inject path filter into trace action. */
if (tracing_paths)
inject_path_tracing();
/* Sort actions by priority */
if (nfilter_actions == 0)
return;
qsort(filter_actions, nfilter_actions, sizeof(struct filter_action),
&compare_action_priority);
/* Allocate variables_buf sufficient for any action */
for (i = 0; i < nfilter_actions; ++i) {
if (filter_actions[i].nfilters > maxfilters)
maxfilters = filter_actions[i].nfilters;
}
variables_buf = xcalloc(maxfilters, sizeof(bool));
}
static const struct filter_action_type *
lookup_filter_action_type(const char *str)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(action_types); ++i) {
if (!strcmp(action_types[i].name, str))
return &action_types[i];
}
return NULL;
}
static struct filter_action *
add_action(const struct filter_action_type *type)
{
struct filter_action *action;
/* Update default_flags */
if (default_flags & type->qual_flg)
default_flags &= ~type->qual_flg;
/* Enable stack tracing. */
#ifdef USE_LIBUNWIND
if (type->qual_flg & QUAL_STACKTRACE)
stack_trace_enabled = true;
#endif
filter_actions = xreallocarray(filter_actions, ++nfilter_actions,
sizeof(struct filter_action));
action = &filter_actions[nfilter_actions - 1];
memset(action, 0, sizeof(*action));
action->id = nfilter_actions - 1;
action->type = type;
action->expr = create_expression();
return action;
}
struct filter_action *
find_or_add_action(const char *name)
{
const struct filter_action_type *type = lookup_filter_action_type(name);
unsigned int i;
if (!type)
error_msg_and_die("invalid filter action '%s'", name);
/* If action takes arguments, add new action */
if (type->parse_args != &parse_null)
return add_action(type);
for (i = 0; i < nfilter_actions; ++i) {
if (filter_actions[i].type == type)
return &filter_actions[i];
}
return add_action(type);
}
void
parse_filter_action(const char *action_name, const char *expr, const char *args)
{
struct filter_action *action = find_or_add_action(action_name);
parse_filter_expression(action->expr, expr, action, action->nfilters);
if (args && action->type->parse_args == &parse_null)
error_msg("%s action takes no arguments, ignored arguments "
"'%s'", action->type->name, args);
action->priv_data = action->type->parse_args(args);
}
static void
run_filter_action(struct tcb *tcp, struct filter_action *action)
{
if (action->type->prefilter && !action->type->prefilter(tcp))
return;
run_filters(tcp, action->filters, action->nfilters, variables_buf);
if (run_expression(action->expr, variables_buf, action->nfilters))
action->type->apply(tcp, action->priv_data);
}
struct filter *
create_filter(struct filter_action *action, const char *name)
{
return add_filter_to_array(&action->filters, &action->nfilters, name);
}
void
set_qualify_mode(struct filter_action *action, unsigned int filters_left)
{
set_filters_qualify_mode(&action->filters, &action->nfilters,
filters_left);
set_expression_qualify_mode(action->expr, filters_left);
}
void
filter_syscall(struct tcb *tcp)
{
unsigned int i;
tcp->qual_flg |= default_flags;
for (i = 0; i < nfilter_actions; ++i)
run_filter_action(tcp, &filter_actions[i]);
}
void
set_filter_action_priv_data(struct filter_action *action, void *priv_data)
{
if (action)
action->priv_data = priv_data;
}

469
filter_expression.c Normal file
View File

@ -0,0 +1,469 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include <stdarg.h>
#include "filter.h"
extern bool is_space_ascii(char);
extern bool is_allowed_in_name(char);
struct expression_token {
enum token_type {
TOK_VARIABLE,
TOK_OPERATOR
} type;
union token_data {
unsigned int variable_id;
enum operator_type {
OP_NOT,
OP_AND,
OP_OR
} operator_id;
} data;
};
/* Pseudo-operator used for parsing */
#define OP_PARENTHESIS 3
struct bool_expression {
unsigned int ntokens;
struct expression_token *tokens;
};
struct bool_expression *
create_expression(void)
{
return xcalloc(1, sizeof(struct bool_expression));
}
static void
reallocate_expression(struct bool_expression *const expr,
const unsigned int new_ntokens)
{
if (!expr)
error_msg_and_die("invalid expression");
expr->tokens = xreallocarray(expr->tokens, new_ntokens,
sizeof(*expr->tokens));
if (new_ntokens > expr->ntokens)
memset(expr->tokens + expr->ntokens, 0,
sizeof(*expr->tokens) * (new_ntokens - expr->ntokens));
expr->ntokens = new_ntokens;
}
static void
add_variable_token(struct bool_expression *expr, unsigned int id)
{
struct expression_token token;
token.type = TOK_VARIABLE;
token.data.variable_id = id;
reallocate_expression(expr, expr->ntokens + 1);
expr->tokens[expr->ntokens - 1] = token;
}
static void
add_operator_token(struct bool_expression *expr, int op) {
struct expression_token token;
token.type = TOK_OPERATOR;
token.data.operator_id = op;
reallocate_expression(expr, expr->ntokens + 1);
expr->tokens[expr->ntokens - 1] = token;
}
void
expression_add_filter_and(struct bool_expression *expr, unsigned int filter_id)
{
add_variable_token(expr, filter_id);
add_operator_token(expr, OP_AND);
}
void
set_expression_qualify_mode(struct bool_expression *expr,
unsigned int filters_left)
{
unsigned int i;
if (!expr)
error_msg_and_die("invalid expression");
reallocate_expression(expr, 2 * filters_left - 1);
for (i = 0; i < filters_left; ++i) {
expr->tokens[i].type = TOK_VARIABLE;
expr->tokens[i].data.variable_id = i;
}
for (; i < 2 * filters_left - 1; ++i) {
expr->tokens[i].type = TOK_OPERATOR;
expr->tokens[i].data.operator_id = OP_AND;
}
}
ATTRIBUTE_FORMAT((printf, 3, 4))
static int
printf_append(char **ptr, char *end, const char *fmt, ...)
{
int ret;
va_list args;
va_start(args, fmt);
ret = vsnprintf(*ptr, end - *ptr, fmt, args);
va_end(args);
if (ret < 0)
return ret;
*ptr += MIN(ret, end - *ptr);
return ret;
}
/* Print full diagnostics for corrupted expression */
ATTRIBUTE_NORETURN
static void
handle_corrupted_expression(struct bool_expression *expr, bool *stack,
unsigned int stack_size, unsigned int current_pos,
bool *variables, unsigned int variables_num)
{
char *buf, *pos, *end;
unsigned int buf_size;
unsigned int i;
/* Calculate buffer size. */
buf_size = sizeof("corrupted filter expression:");
buf_size += sizeof("expression (ntokens = ):")
+ 3 * sizeof(unsigned int)
+ (sizeof("op_") + 3 * sizeof(int)) * expr->ntokens;
buf_size += sizeof("variables (nvariables = ):") + 3 * sizeof(int)
+ sizeof("false") * variables_num;
buf_size += sizeof("current position: ") + 3 * sizeof(int);
buf_size += sizeof("stack (stack_size = ):") + 3 * sizeof(int)
+ sizeof("false") * stack_size;
buf = xcalloc(buf_size, 1);
pos = buf;
end = buf + buf_size;
printf_append(&pos, end, "corrupted filter expression:\n");
/* Print expression. */
printf_append(&pos, end, "expression (ntokens = %u):", expr->ntokens);
for (i = 0; i < expr->ntokens; ++i) {
switch (expr->tokens[i].type) {
case TOK_VARIABLE:
printf_append(&pos, end, " v_%u",
expr->tokens[i].data.variable_id);
break;
case TOK_OPERATOR:
switch (expr->tokens[i].data.operator_id) {
case OP_NOT:
printf_append(&pos, end, " not");
break;
case OP_AND:
printf_append(&pos, end, " and");
break;
case OP_OR:
printf_append(&pos, end, " or");
break;
default:
printf_append(&pos, end, " op_%d",
expr->tokens[i].data.operator_id);
}
break;
default:
printf_append(&pos, end, " ?_%d", expr->tokens[i].type);
}
}
printf_append(&pos, end, "\n");
/* Print variables. */
printf_append(&pos, end, "variables (nvariables = %u):", variables_num);
for (i = 0; i < variables_num; ++i)
printf_append(&pos, end, !variables[i] ? " false" : " true");
printf_append(&pos, end, "\n");
printf_append(&pos, end, "current position: %u\n", current_pos);
/* Print current stack state. */
printf_append(&pos, end, "stack (stack_size = %u):", stack_size);
for (i = 0; i < stack_size; ++i)
printf_append(&pos, end, !stack[i] ? " false" : " true");
error_msg_and_die("%s", buf);
}
#define MAX_STACK_SIZE 32
bool
run_expression(struct bool_expression *expr, bool *variables,
unsigned int variables_num)
{
bool stack[MAX_STACK_SIZE];
unsigned int stack_size = 0;
unsigned int i;
for (i = 0; i < expr->ntokens; ++i) {
struct expression_token *tok = &expr->tokens[i];
switch (tok->type) {
case TOK_VARIABLE:
if (stack_size == MAX_STACK_SIZE)
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
if (tok->data.variable_id >= variables_num)
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
stack[stack_size++] = variables[tok->data.variable_id];
break;
case TOK_OPERATOR:
switch (tok->data.operator_id) {
case OP_NOT:
if (stack_size == 0)
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
stack[stack_size - 1] = !stack[stack_size - 1];
break;
case OP_AND:
if (stack_size < 2)
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
stack[stack_size - 2] = stack[stack_size - 2]
&& stack[stack_size - 1];
--stack_size;
break;
case OP_OR:
if (stack_size < 2)
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
stack[stack_size - 2] = stack[stack_size - 2]
|| stack[stack_size - 1];
--stack_size;
break;
default:
handle_corrupted_expression(expr, stack,
stack_size, i,
variables,
variables_num);
}
break;
}
}
if (stack_size != 1)
handle_corrupted_expression(expr, stack, stack_size, i,
variables, variables_num);
return stack[0];
}
/*
* Parse operator and add operator length to str and pos.
* Return -1 if no operator found.
*/
static int
parse_operator(char **str, unsigned int *pos)
{
#define _OP(s, op) { s, sizeof(s) - 1, op }
struct {
const char *str;
int len;
enum operator_type op;
} ops[] = {
_OP("!", OP_NOT),
_OP("not", OP_NOT),
_OP("&&", OP_AND),
_OP("and", OP_AND),
_OP("||", OP_OR),
_OP("or", OP_OR),
};
#undef _OP
char *p = *str;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(ops); i++) {
if (!strncmp(p, ops[i].str, ops[i].len) &&
(!is_allowed_in_name(ops[i].str[0]) ||
!is_allowed_in_name(p[ops[i].len]))) {
*str += ops[i].len - 1;
*pos += ops[i].len - 1;
return ops[i].op;
}
}
return -1;
}
static char *
unescape_argument(char **str)
{
char *p;
char *p_new;
bool escaped = false;
unsigned int size = 1;
char *new_str = xcalloc(strlen(*str) + 1, 1);
for (p = *str, p_new = new_str; *p; ++p) {
if (!escaped) {
if (*p == '\\') {
escaped = true;
continue;
} else if (is_space_ascii(*p) || *p == ')' || *p == '|'
|| *p == '&') {
break;
}
}
escaped = false;
*(p_new++) = *p;
size++;
}
*str = p - 1;
return xreallocarray(new_str, size, 1);
}
static void
push_operator(int *stack, unsigned int *stack_size, int op)
{
if (*stack_size == MAX_STACK_SIZE)
error_msg_and_die("stack overflow (expression is too complex)");
stack[*stack_size] = op;
(*stack_size)++;
}
static bool
is_higher_priority(int op_a, int op_b)
{
bool op_priority[] = {
[OP_NOT] = 2,
[OP_AND] = 1,
[OP_OR] = 0,
};
return op_priority[op_a] > op_priority[op_b];
}
void
parse_filter_expression(struct bool_expression *expr, const char *str,
struct filter_action *action, unsigned int start_id)
{
enum {
WAIT_FILTER,
FILTER_NAME,
FILTER_ARG,
WAIT_OPERATOR,
} state = WAIT_FILTER;
unsigned int variable_id = start_id;
/* Current stack stack_size */
unsigned int st_size = 0;
int stack[MAX_STACK_SIZE];
char *buf = xstrdup(str);
struct filter *cur_filter = NULL;
char *filter_name = NULL;
char *filter_arg = NULL;
int op;
char *p;
unsigned int pos = 0;
for (p = buf; *p; ++p, ++pos) {
switch (state) {
case WAIT_FILTER:
if (*p == '(') {
push_operator(stack, &st_size, OP_PARENTHESIS);
} else if ((op = parse_operator(&p, &pos)) >= 0) {
if (op == OP_NOT) {
push_operator(stack, &st_size, op);
} else {
error_msg_and_die("invalid operator "
"at '%s':%u",
str, pos);
}
} else if (!is_space_ascii(*p)) {
filter_name = p;
state = FILTER_NAME;
}
break;
case FILTER_NAME:
if (is_space_ascii(*p)) {
*p = '\0';
cur_filter = create_filter(action, filter_name);
filter_arg = NULL;
state = FILTER_ARG;
}
break;
case FILTER_ARG:
if (!filter_arg && is_space_ascii(*p))
break;
filter_arg = unescape_argument(&p);
parse_filter(cur_filter, filter_arg, false);
free(filter_arg);
add_variable_token(expr, variable_id++);
state = WAIT_OPERATOR;
break;
case WAIT_OPERATOR:
if (is_space_ascii(*p))
break;
if (*p == ')') {
while ((st_size > 0) &&
(stack[st_size - 1] != OP_PARENTHESIS)) {
op = stack[--st_size];
add_operator_token(expr, op);
}
--st_size;
break;
}
op = parse_operator(&p, &pos);
if (op < 0 || op == OP_NOT)
error_msg_and_die("invalid operator at '%s':%u",
str, pos);
/* Pop operators with higher priority. */
while ((st_size > 0) &&
(stack[st_size - 1] != OP_PARENTHESIS) &&
is_higher_priority(stack[st_size - 1], op))
add_operator_token(expr, stack[--st_size]);
push_operator(stack, &st_size, op);
state = WAIT_FILTER;
break;
}
}
free(buf);
if (state != WAIT_OPERATOR)
error_msg_and_die("unfinished filter expression '%s'", str);
while (st_size > 0)
add_operator_token(expr, stack[--st_size]);
if (start_id > 0)
add_operator_token(expr, OP_OR);
}

252
filter_parse.c Normal file
View File

@ -0,0 +1,252 @@
/*
* Copyright (c) 2017 Nikolay Marchuk <marchuk.nikolay.a@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include "filter.h"
bool
is_space_ascii(char c)
{
return (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ||
(c == '\v') || (c == '\f');
}
bool
is_allowed_in_name(char c)
{
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')
|| (c >= '0' && c <= '9') || (c == '_');
}
/*
* Split expression into action name, filter expression or qualify set
* and action arguments.
*/
void
filtering_parse(const char *str)
{
enum parsing_states {
F_EMPTY,
F_BEGIN,
F_QUAL_SET,
F_FILT_EXPR,
F_QUAL_ARGS,
F_FILT_ARGS,
F_END,
} state = F_EMPTY;
const char *begin = NULL;
const char *action_name = "trace";
const char *main_part = NULL;
const char *args = NULL;
bool action_specified = false;
bool escaped = false;
int parentheses_count = 0;
/* Used to store position of last terminating parenthesis. */
char *expression_end = NULL;
/* Used to provide diagnostics. */
unsigned int pos = 0;
char *buf = xstrdup(str);
char *p;
for (p = buf; *p; ++p, ++pos) {
switch (state) {
case F_EMPTY:
switch (*p) {
/* trace(), action name omitted */
case '(':
parentheses_count++;
main_part = p;
state = F_FILT_EXPR;
break;
/* missing action name */
case '=':
*p = '\0';
error_msg_and_die("invalid filter action '%s'",
buf);
default:
if (is_space_ascii(*p)) {
break;
} else if (!strncmp(p, "not", 3) && *(p + 3) &&
(is_space_ascii(*(p + 3)) ||
*(p + 3) == '(')) {
main_part = p;
state = F_FILT_EXPR;
break;
} else {
begin = p;
state = F_BEGIN;
}
}
if (state != F_BEGIN)
break;
/* else fall through to check for qualify set */
case F_BEGIN:
switch (*p) {
/* action(...) */
case '(':
if (*begin == '!') {
main_part = begin;
} else {
action_name = begin;
action_specified = true;
*p = '\0';
main_part = p + 1;
}
state = F_FILT_EXPR;
parentheses_count++;
break;
/* action=... */
case '=':
action_name = begin;
action_specified = true;
*p = '\0';
main_part = p + 1;
state = F_QUAL_SET;
break;
case ':':
main_part = begin;
*p = '\0';
args = p + 1;
state = F_QUAL_ARGS;
break;
case ';':
error_msg_and_die("invalid arguments position "
"'%s':%u",
str, pos);
/* qualify set without action. */
case ',':
case '?':
case '/':
case '%':
case '-':
main_part = begin;
state = F_QUAL_SET;
break;
default:
/* new expression without action. */
if (is_space_ascii(*p)) {
main_part = begin;
state = F_FILT_EXPR;
}
}
break;
case F_QUAL_SET:
if (*p == ':') {
*p = '\0';
args = p + 1;
state = F_QUAL_ARGS;
}
break;
case F_FILT_EXPR:
if (!escaped) {
switch (*p) {
case ';':
if (parentheses_count != 1 ||
!action_specified)
error_msg_and_die("invalid "
"arguments "
"position "
"'%s':%u",
str, pos);
*p = '\0';
args = p + 1;
state = F_FILT_ARGS;
break;
case '(':
parentheses_count++;
break;
case ')':
if (parentheses_count <= 0)
error_msg_and_die("unexpected "
"')' at "
"'%s':%u",
str, pos);
parentheses_count--;
expression_end = p;
if (action_specified &&
parentheses_count == 0)
state = F_END;
break;
case '\\':
escaped = true;
break;
}
} else
escaped = false;
break;
case F_QUAL_ARGS:
break;
case F_FILT_ARGS:
if (!escaped) {
switch (*p) {
case ')':
parentheses_count--;
expression_end = p;
state = F_END;
break;
case '\\':
escaped = true;
break;
}
} else
escaped = false;
break;
case F_END:
if (!is_space_ascii(*p))
error_msg_and_die("unexpected '%c' at "
"'%s':%u", *p, str, pos);
}
}
switch (state) {
case F_EMPTY:
main_part = buf;
parse_qualify_action(action_name, main_part, args);
break;
case F_BEGIN:
main_part = begin;
/* fall through */
case F_QUAL_SET:
case F_QUAL_ARGS:
parse_qualify_action(action_name, main_part, args);
break;
case F_FILT_EXPR:
case F_FILT_ARGS:
case F_END:
if (parentheses_count != 0)
error_msg_and_die("missing ')' in '%s'", str);
if (action_specified && expression_end)
*expression_end = '\0';
parse_filter_action(action_name, main_part, args);
break;
}
free(buf);
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2018 The strace developers.
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -30,34 +30,21 @@
#include "nsig.h"
#include "number_set.h"
#include "filter.h"
#include "delay.h"
#include "retval.h"
struct number_set *read_set;
struct number_set *write_set;
struct number_set *signal_set;
static struct number_set *abbrev_set;
static struct number_set *inject_set;
static struct number_set *raw_set;
static struct number_set *trace_set;
static struct number_set *verbose_set;
/* Only syscall numbers are personality-specific so far. */
struct inject_personality_data {
uint16_t scno;
};
static int
sigstr_to_uint(const char *s)
{
int i;
if (*s >= '0' && *s <= '9')
return string_to_uint_upto(s, 255);
if (strncasecmp(s, "SIG", 3) == 0)
s += 3;
for (int i = 0; i <= 255; ++i) {
for (i = 0; i <= 255; ++i) {
const char *name = signame(i);
if (strncasecmp(name, "SIG", 3) != 0)
@ -77,7 +64,9 @@ sigstr_to_uint(const char *s)
static int
find_errno_by_name(const char *name)
{
for (unsigned int i = 1; i < nerrnos; ++i) {
unsigned int i;
for (i = 1; i < nerrnos; ++i) {
if (errnoent[i] && (strcasecmp(name, errnoent[i]) == 0))
return i;
}
@ -85,29 +74,8 @@ find_errno_by_name(const char *name)
return -1;
}
static bool
parse_delay_token(const char *input, struct inject_opts *fopts, bool isenter)
{
unsigned flag = isenter ? INJECT_F_DELAY_ENTER : INJECT_F_DELAY_EXIT;
if (fopts->data.flags & flag) /* duplicate */
return false;
long long intval = string_to_ulonglong(input);
if (intval < 0) /* couldn't parse */
return false;
if (fopts->data.delay_idx == (uint16_t) -1)
fopts->data.delay_idx = alloc_delay_data();
/* populate .ts_enter or .ts_exit */
fill_delay_data(fopts->data.delay_idx, intval, isenter);
fopts->data.flags |= flag;
return true;
}
static bool
parse_inject_token(const char *const token, struct inject_opts *const fopts,
struct inject_personality_data *const pdata,
const bool fault_tokens_only)
{
const char *val;
@ -143,85 +111,24 @@ parse_inject_token(const char *const token, struct inject_opts *const fopts,
/* F == F+0 */
fopts->step = 0;
}
} else if ((val = STR_STRIP_PREFIX(token, "syscall=")) != token) {
if (fopts->data.flags & INJECT_F_SYSCALL)
return false;
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
kernel_long_t scno = scno_by_name(val, p, 0);
if (scno < 0)
return false;
/*
* We want to inject only pure system calls with no side
* effects.
*/
if (!(sysent_vec[p][scno].sys_flags & TRACE_PURE))
return false;
pdata[p].scno = scno;
}
fopts->data.flags |= INJECT_F_SYSCALL;
} else if ((val = STR_STRIP_PREFIX(token, "error=")) != token) {
if (fopts->data.flags & (INJECT_F_ERROR | INJECT_F_RETVAL))
if (fopts->data.flags & INJECT_F_RETVAL)
return false;
intval = string_to_uint_upto(val, MAX_ERRNO_VALUE);
if (intval < 0)
intval = find_errno_by_name(val);
if (intval < 1)
return false;
fopts->data.rval_idx = retval_new(intval);
fopts->data.flags |= INJECT_F_ERROR;
fopts->data.rval = -intval;
fopts->data.flags |= INJECT_F_RETVAL;
} else if (!fault_tokens_only
&& (val = STR_STRIP_PREFIX(token, "retval=")) != token) {
if (fopts->data.flags & (INJECT_F_ERROR | INJECT_F_RETVAL))
if (fopts->data.flags & INJECT_F_RETVAL)
return false;
errno = 0;
char *endp;
unsigned long long ullval = strtoull(val, &endp, 0);
if (endp == val || *endp || (kernel_ulong_t) ullval != ullval
|| ((ullval == 0 || ullval == ULLONG_MAX) && errno))
intval = string_to_uint(val);
if (intval < 0)
return false;
#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
bool inadvertent_fault_injection = false;
#endif
#if !HAVE_ARCH_DEDICATED_ERR_REG
if ((kernel_long_t) ullval < 0
&& (kernel_long_t) ullval >= -MAX_ERRNO_VALUE) {
# if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
inadvertent_fault_injection = true;
# endif
error_msg("Inadvertent injection of error %" PRI_kld
" is possible for retval=%llu",
-(kernel_long_t) ullval, ullval);
}
# if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
else if ((int) ullval < 0 && (int) ullval >= -MAX_ERRNO_VALUE) {
inadvertent_fault_injection = true;
error_msg("Inadvertent injection of error %d is"
" possible in compat personality for"
" retval=%llu",
-(int) ullval, ullval);
}
# endif
#endif
#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
if (!inadvertent_fault_injection
&& (unsigned int) ullval != ullval) {
error_msg("Injected return value %llu will be"
" clipped to %u in compat personality",
ullval, (unsigned int) ullval);
}
#endif
fopts->data.rval_idx = retval_new(ullval);
fopts->data.rval = intval;
fopts->data.flags |= INJECT_F_RETVAL;
} else if (!fault_tokens_only
&& (val = STR_STRIP_PREFIX(token, "signal=")) != token) {
@ -232,14 +139,6 @@ parse_inject_token(const char *const token, struct inject_opts *const fopts,
return false;
fopts->data.signo = intval;
fopts->data.flags |= INJECT_F_SIGNAL;
} else if (!fault_tokens_only
&& (val = STR_STRIP_PREFIX(token, "delay_enter=")) != token) {
if (!parse_delay_token(val, fopts, true))
return false;
} else if (!fault_tokens_only
&& (val = STR_STRIP_PREFIX(token, "delay_exit=")) != token) {
if (!parse_delay_token(val, fopts, false))
return false;
} else {
return false;
}
@ -247,167 +146,170 @@ parse_inject_token(const char *const token, struct inject_opts *const fopts,
return true;
}
static const char *
parse_inject_expression(char *const str,
struct inject_opts *const fopts,
struct inject_personality_data *const pdata,
const bool fault_tokens_only)
void
parse_inject_common_args(char *str, struct inject_opts *const opts,
const bool fault_tokens_only, bool qualify_mode)
{
if (str[0] == '\0' || str[0] == ':')
return "";
char *saveptr = NULL;
const char *name = strtok_r(str, ":", &saveptr);
char *token;
while ((token = strtok_r(NULL, ":", &saveptr))) {
if (!parse_inject_token(token, fopts, pdata, fault_tokens_only))
return NULL;
const char *delim = qualify_mode ? ":" : ";";
*opts = (struct inject_opts) {
.first = 1,
.step = 1
};
for (token = strtok_r(str, delim, &saveptr); token;
token = strtok_r(NULL, delim, &saveptr)) {
if (!parse_inject_token(token, opts, fault_tokens_only)) {
/* return an error by resetting inject flags */
opts->data.flags = 0;
return;
}
}
return name;
/* If neither of retval, error, or signal is specified, then ... */
if (!opts->data.flags) {
if (fault_tokens_only) {
/* in fault= syntax the default error code is ENOSYS. */
opts->data.rval = -ENOSYS;
opts->data.flags |= INJECT_F_RETVAL;
} else {
/* in inject= syntax this is not allowed. */
return;
}
}
}
static void
qualify_read(const char *const str)
qualify_read(const char *const main_part, const char *const args)
{
if (!read_set)
read_set = alloc_number_set_array(1);
qualify_tokens(str, read_set, string_to_uint, "descriptor");
struct filter_action *action = find_or_add_action("read");
struct filter *filter = create_filter(action, "fd");
parse_filter(filter, main_part, true);
if (args)
error_msg("read action takes no arguments, ignored arguments "
"'%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_write(const char *const str)
qualify_write(const char *const main_part, const char *const args)
{
if (!write_set)
write_set = alloc_number_set_array(1);
qualify_tokens(str, write_set, string_to_uint, "descriptor");
struct filter_action *action = find_or_add_action("write");
struct filter *filter = create_filter(action, "fd");
parse_filter(filter, main_part, true);
if (args)
error_msg("write action takes no arguments, ignored arguments "
"'%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_signals(const char *const str)
qualify_signals(const char *const main_part, const char *const args)
{
if (!signal_set)
signal_set = alloc_number_set_array(1);
qualify_tokens(str, signal_set, sigstr_to_uint, "signal");
qualify_tokens(main_part, signal_set, sigstr_to_uint, "signal", true);
if (args)
error_msg("signal action takes no arguments, ignored arguments "
"'%s'", args);
}
static void
qualify_trace(const char *const str)
qualify_trace(const char *const main_part, const char *const args)
{
if (!trace_set)
trace_set = alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(str, trace_set);
struct filter_action *action = find_or_add_action("trace");
struct filter *filter = create_filter(action, "syscall");
parse_filter(filter, main_part, true);
if (args)
error_msg("trace action takes no arguments, ignored arguments "
"'%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_abbrev(const char *const str)
qualify_abbrev(const char *const main_part, const char *const args)
{
if (!abbrev_set)
abbrev_set = alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(str, abbrev_set);
struct filter_action *action = find_or_add_action("abbrev");
struct filter *filter = create_filter(action, "syscall");
parse_filter(filter, main_part, true);
if (args)
error_msg("abbrev action takes no arguments, ignored arguments "
"'%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_verbose(const char *const str)
qualify_verbose(const char *const main_part, const char *const args)
{
if (!verbose_set)
verbose_set = alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(str, verbose_set);
struct filter_action *action = find_or_add_action("verbose");
struct filter *filter = create_filter(action, "syscall");
parse_filter(filter, main_part, true);
if (args)
error_msg("verbose action takes no arguments, ignored arguments"
" '%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_raw(const char *const str)
qualify_raw(const char *const main_part, const char *const args)
{
if (!raw_set)
raw_set = alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(str, raw_set);
struct filter_action *action = find_or_add_action("raw");
struct filter *filter = create_filter(action, "syscall");
parse_filter(filter, main_part, true);
if (args)
error_msg("raw action takes no arguments, ignored arguments "
"'%s'", args);
set_qualify_mode(action, 1);
}
static void
qualify_inject_common(const char *const str,
qualify_inject_common(const char *const main_part, const char *const args,
const bool fault_tokens_only,
const char *const description)
{
struct inject_opts opts = {
.first = 1,
.step = 1,
.data = {
.delay_idx = -1
}
};
struct inject_personality_data pdata[SUPPORTED_PERSONALITIES] = { { 0 } };
char *copy = xstrdup(str);
const char *name =
parse_inject_expression(copy, &opts, pdata, fault_tokens_only);
if (!name)
error_msg_and_die("invalid %s '%s'", description, str);
struct inject_opts *opts = xmalloc(sizeof(struct inject_opts));
char *buf = xstrdup(args);
struct filter_action *action;
struct filter *filter;
struct number_set *tmp_set =
alloc_number_set_array(SUPPORTED_PERSONALITIES);
qualify_syscall_tokens(name, tmp_set);
action = find_or_add_action(fault_tokens_only ? "fault" : "inject");
filter = create_filter(action, "syscall");
parse_filter(filter, main_part, true);
set_qualify_mode(action, 1);
parse_inject_common_args(buf, opts, fault_tokens_only, true);
free(copy);
if (!opts->data.flags)
error_msg_and_die("invalid %s argument '%s'", description,
args ? args : "");
free(buf);
/* If neither of retval, error, signal or delay is specified, then ... */
if (!(opts.data.flags & INJECT_ACTION_FLAGS)) {
if (fault_tokens_only) {
/* in fault= syntax the default error code is ENOSYS. */
opts.data.rval_idx = retval_new(ENOSYS);
opts.data.flags |= INJECT_F_ERROR;
} else {
/* in inject= syntax this is not allowed. */
error_msg_and_die("invalid %s '%s'", description, str);
}
}
/*
* Initialize inject_vec according to tmp_set.
* Merge tmp_set into inject_set.
*/
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
if (number_set_array_is_empty(tmp_set, p))
continue;
if (!inject_set) {
inject_set =
alloc_number_set_array(SUPPORTED_PERSONALITIES);
}
if (!inject_vec[p]) {
inject_vec[p] = xcalloc(nsyscall_vec[p],
sizeof(*inject_vec[p]));
}
for (unsigned int i = 0; i < nsyscall_vec[p]; ++i) {
if (is_number_in_set_array(i, tmp_set, p)) {
add_number_to_set_array(i, inject_set, p);
inject_vec[p][i] = opts;
/* Copy per-personality data. */
inject_vec[p][i].data.scno =
pdata[p].scno;
}
}
}
free_number_set_array(tmp_set, SUPPORTED_PERSONALITIES);
set_filter_action_priv_data(action, opts);
}
static void
qualify_fault(const char *const str)
qualify_fault(const char *const main_part, const char *const args)
{
qualify_inject_common(str, true, "fault argument");
qualify_inject_common(main_part, args, true, "fault");
}
static void
qualify_inject(const char *const str)
qualify_inject(const char *const main_part, const char *const args)
{
qualify_inject_common(str, false, "inject argument");
qualify_inject_common(main_part, args, false, "inject");
}
static const struct qual_options {
const char *name;
void (*qualify)(const char *);
void (*qualify)(const char *, const char *);
} qual_options[] = {
{ "trace", qualify_trace },
{ "t", qualify_trace },
@ -431,36 +333,20 @@ static const struct qual_options {
};
void
qualify(const char *str)
parse_qualify_action(const char *action_name, const char *main_part,
const char *args)
{
const struct qual_options *opt = qual_options;
const struct qual_options *opt = NULL;
unsigned int i;
for (unsigned int i = 0; i < ARRAY_SIZE(qual_options); ++i) {
const char *name = qual_options[i].name;
const size_t len = strlen(name);
const char *val = str_strip_prefix_len(str, name, len);
if (val == str || *val != '=')
continue;
str = val + 1;
opt = &qual_options[i];
break;
for (i = 0; i < ARRAY_SIZE(qual_options); ++i) {
if (!strcmp(action_name, qual_options[i].name)) {
opt = &qual_options[i];
break;
}
}
opt->qualify(str);
}
unsigned int
qual_flags(const unsigned int scno)
{
return (is_number_in_set_array(scno, trace_set, current_personality)
? QUAL_TRACE : 0)
| (is_number_in_set_array(scno, abbrev_set, current_personality)
? QUAL_ABBREV : 0)
| (is_number_in_set_array(scno, verbose_set, current_personality)
? QUAL_VERBOSE : 0)
| (is_number_in_set_array(scno, raw_set, current_personality)
? QUAL_RAW : 0)
| (is_number_in_set_array(scno, inject_set, current_personality)
? QUAL_INJECT : 0);
if (!opt)
error_msg_and_die("invalid filter action '%s'", action_name);
opt->qualify(main_part ? main_part : "", args);
}

11
futex.c
View File

@ -3,7 +3,7 @@
* Copyright (c) 2007-2008 Ulrich Drepper <drepper@redhat.com>
* Copyright (c) 2009 Andreas Schwab <schwab@redhat.com>
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -37,9 +37,6 @@
#ifndef FUTEX_CLOCK_REALTIME
# define FUTEX_CLOCK_REALTIME 256
#endif
#ifndef FUTEX_OP_OPARG_SHIFT
# define FUTEX_OP_OPARG_SHIFT 8
#endif
#include "xlat/futexops.h"
#include "xlat/futexwakeops.h"
@ -97,10 +94,8 @@ SYS_FUNC(futex)
tprintf(", %u, ", val2);
printaddr(uaddr2);
tprints(", ");
if ((val3 >> 28) & FUTEX_OP_OPARG_SHIFT) {
print_xlat(FUTEX_OP_OPARG_SHIFT);
tprints("<<28|");
}
if ((val3 >> 28) & 8)
tprints("FUTEX_OP_OPARG_SHIFT<<28|");
comment = printxval(futexwakeops, (val3 >> 28) & 0x7, NULL)
? NULL : "FUTEX_OP_???";
tprints("<<28");

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2015-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -93,21 +93,4 @@
# 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(6, 0)
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wtautological-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
#endif /* !STRACE_GCC_COMPAT_H */

View File

@ -1,77 +0,0 @@
#!/bin/sh -efu
# Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
input="$1"
shift
cat <<EOF
/* Generated by $0 from $input; do not edit. */
#include "defs.h"
#ifdef HAVE_LINUX_BPF_H
# include <linux/bpf.h>
# include "bpf_attr.h"
# include "static_assert.h"
# define SoM(type_, member_) (sizeof(((type_ *)0)->member_))
EOF
for struct in $(sed -n 's/^struct \([^[:space:]]\+_struct\) .*/\1/p' < "$input"); do
case "$struct" in
BPF_*) type_name='union bpf_attr' ;;
*) type_name="struct ${struct%_struct}" ;;
esac
TYPE_NAME="$(printf %s "$type_name" |tr '[:lower:] ' '[:upper:]_')"
enum="$(sed -n 's/^struct '"$struct"' \/\* \([^[:space:]]\+\) \*\/ {.*/\1/p' < "$input")"
ENUM="$(printf %s "$enum" |tr '[:lower:]' '[:upper:]')"
enum="$enum${enum:+.}"
ENUM="$ENUM${ENUM:+_}"
sed -n '/^struct '"$struct"' [^{]*{/,/^};$/p' < "$input" |
sed -n 's/^[[:space:]]\+[^][;]*[[:space:]]\([^][[:space:];]\+\)\(\[[^;]*\]\)\?;$/\1/p' |
while read field; do
FIELD="$(printf %s "$field" |tr '[:lower:]' '[:upper:]')"
cat <<EOF
# ifdef HAVE_${TYPE_NAME}_$ENUM$FIELD
static_assert(SoM(struct $struct, $field) == SoM($type_name, $enum$field),
"$struct.$field size mismatch");
static_assert(offsetof(struct $struct, $field) == offsetof($type_name, $enum$field),
"$struct.$field offset mismatch");
# endif /* HAVE_${TYPE_NAME}_$ENUM$FIELD */
EOF
done
cat <<EOF
static_assert(${struct}_size == expected_${struct}_size,
"${struct}_size mismatch");
EOF
done
cat <<'EOF'
#endif /* HAVE_LINUX_BPF_H */
EOF

View File

@ -1,6 +0,0 @@
#include "defs.h"
SYS_FUNC(getpagesize)
{
return RVAL_DECODED | RVAL_HEX;
}

View File

@ -1,48 +0,0 @@
/*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
#include <linux/ioctl.h>
#ifndef INOTIFY_IOC_SETNEXTWD
# define INOTIFY_IOC_SETNEXTWD _IOW('I', 0, int32_t)
#endif
int
inotify_ioctl(struct tcb *const tcp, const unsigned int code,
const kernel_ulong_t arg)
{
switch (code) {
case INOTIFY_IOC_SETNEXTWD:
tprintf(", %d", (int) arg);
return RVAL_IOCTL_DECODED;
}
return RVAL_DECODED;
}

4
io.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-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -123,7 +123,7 @@ tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len,
};
print_array(tcp, addr, len, iov, current_wordsize * 2,
tfetch_mem_ignore_syserror, print_iovec, &config);
umoven_or_printaddr_ignore_syserror, print_iovec, &config);
}
SYS_FUNC(readv)

56
ioctl.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-2001 Wichert Akkerman <wichert@cistron.nl>
* Copyright (c) 1999-2018 The strace developers.
* Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -33,6 +33,11 @@
#include <linux/ioctl.h>
#include "xlat/ioctl_dirs.h"
#ifdef HAVE_LINUX_INPUT_H
# include <linux/input.h>
#endif
#include "xlat/evdev_abs.h"
#include "xlat/evdev_ev.h"
static int
@ -87,8 +92,7 @@ evdev_decode_number(const unsigned int code)
if (_IOC_DIR(code) == _IOC_WRITE) {
if (nr >= 0xc0 && nr <= 0xc0 + 0x3f) {
tprints("EVIOCSABS(");
printxval_indexn(evdev_abs, evdev_abs_size, nr - 0xc0,
"ABS_???");
printxval(evdev_abs, nr - 0xc0, "ABS_???");
tprints(")");
return 1;
}
@ -104,8 +108,7 @@ evdev_decode_number(const unsigned int code)
return 1;
} else if (nr >= 0x40 && nr <= 0x40 + 0x3f) {
tprints("EVIOCGABS(");
printxval_indexn(evdev_abs, evdev_abs_size, nr - 0x40,
"ABS_???");
printxval(evdev_abs, nr - 0x40, "ABS_???");
tprints(")");
return 1;
}
@ -255,14 +258,11 @@ ioctl_decode(struct tcb *tcp)
const kernel_ulong_t arg = tcp->u_arg[2];
switch (_IOC_TYPE(code)) {
case '$':
return perf_ioctl(tcp, code, arg);
#if defined(ALPHA) || defined(POWERPC)
case 'f': {
int ret = file_ioctl(tcp, code, arg);
if (ret != RVAL_DECODED)
return ret;
ATTRIBUTE_FALLTHROUGH;
}
case 't':
case 'T':
@ -287,21 +287,15 @@ ioctl_decode(struct tcb *tcp)
return scsi_ioctl(tcp, code, arg);
case 'L':
return loop_ioctl(tcp, code, arg);
#ifdef HAVE_STRUCT_MTD_WRITE_REQ
case 'M':
return mtd_ioctl(tcp, code, arg);
#endif
#ifdef HAVE_STRUCT_UBI_ATTACH_REQ_MAX_BEB_PER1024
case 'o':
case 'O':
return ubi_ioctl(tcp, code, arg);
#endif
case 'V':
return v4l2_ioctl(tcp, code, arg);
#ifdef HAVE_STRUCT_PTP_SYS_OFFSET
case '=':
return ptp_ioctl(tcp, code, arg);
#endif
#ifdef HAVE_LINUX_INPUT_H
case 'E':
return evdev_ioctl(tcp, code, arg);
@ -324,8 +318,6 @@ ioctl_decode(struct tcb *tcp)
case 0xae:
return kvm_ioctl(tcp, code, arg);
#endif
case 'I':
return inotify_ioctl(tcp, code, arg);
default:
break;
}
@ -340,29 +332,19 @@ SYS_FUNC(ioctl)
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
if (xlat_verbosity != XLAT_STYLE_ABBREV)
tprintf("%#x", (unsigned int) tcp->u_arg[1]);
if (xlat_verbosity == XLAT_STYLE_VERBOSE)
tprints(" /* ");
if (xlat_verbosity != XLAT_STYLE_RAW) {
ret = ioctl_decode_command_number(tcp);
if (!(ret & IOCTL_NUMBER_STOP_LOOKUP)) {
iop = ioctl_lookup(tcp->u_arg[1]);
if (iop) {
if (ret)
tprints(" or ");
tprints(iop->symbol);
while ((iop = ioctl_next_match(iop)))
tprintf(" or %s", iop->symbol);
} else if (!ret) {
ioctl_print_code(tcp->u_arg[1]);
}
ret = ioctl_decode_command_number(tcp);
if (!(ret & IOCTL_NUMBER_STOP_LOOKUP)) {
iop = ioctl_lookup(tcp->u_arg[1]);
if (iop) {
if (ret)
tprints(" or ");
tprints(iop->symbol);
while ((iop = ioctl_next_match(iop)))
tprintf(" or %s", iop->symbol);
} else if (!ret) {
ioctl_print_code(tcp->u_arg[1]);
}
}
if (xlat_verbosity == XLAT_STYLE_VERBOSE)
tprints(" */");
ret = ioctl_decode(tcp);
} else {
ret = ioctl_decode(tcp) | RVAL_DECODED;

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -27,7 +27,6 @@
*/
#include "defs.h"
#include "xstring.h"
enum {
IOPRIO_WHO_PROCESS = 1,
@ -56,14 +55,17 @@ static const char *
sprint_ioprio(unsigned int ioprio)
{
static char outstr[256];
char class_buf[64];
const char *str;
unsigned int class, data;
class = IOPRIO_PRIO_CLASS(ioprio);
data = IOPRIO_PRIO_DATA(ioprio);
sprintxval(class_buf, sizeof(class_buf), ioprio_class, class,
"IOPRIO_CLASS_???");
xsprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", class_buf, data);
str = xlookup(ioprio_class, class);
if (str)
sprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data);
else
sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)",
class, "IOPRIO_CLASS_???", data);
return outstr;
}

7
ipc.c
View File

@ -1,6 +1,5 @@
/*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 1999-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -34,11 +33,15 @@ SYS_FUNC(ipc)
unsigned int call = tcp->u_arg[0];
unsigned int version = call >> 16;
call &= 0xffff;
const char *str = xlookup(ipccalls, call);
if (version)
tprintf("%u<<16|", version);
printxval_u(ipccalls, call, NULL);
if (str)
tprints(str);
else
tprintf("%u", call);
unsigned int i;
for (i = 1; i < tcp->s_ent->nargs; ++i)

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2003 Roland McGrath <roland@redhat.com>
* Copyright (c) 2003-2018 The strace developers.
* Copyright (c) 2003-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -43,10 +43,8 @@
#define PRINTCTL(flagset, arg, dflt) \
do { \
if ((arg) & IPC_64) { \
print_xlat(IPC_64); \
tprints("|"); \
} \
if ((arg) & IPC_64) \
tprints("IPC_64|"); \
printxval((flagset), (arg) & ~IPC_64, dflt); \
} while (0)

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-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -41,12 +41,15 @@
#endif
#include "xlat/ipc_msg_flags.h"
#include "xlat/ipc_private.h"
#include "xlat/resource_flags.h"
SYS_FUNC(msgget)
{
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
const int key = (int) tcp->u_arg[0];
if (key)
tprintf("%#x", key);
else
tprints("IPC_PRIVATE");
tprints(", ");
if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
tprints("|");
@ -96,7 +99,7 @@ fetch_msgrcv_args(struct tcb *const tcp, const kernel_ulong_t addr,
if (umove_or_printaddr(tcp, addr, &tmp))
return -1;
pair[0] = tmp[0];
pair[1] = (int) tmp[1];
pair[1] = tmp[1];
}
return 0;
}

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-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -64,7 +64,7 @@ tprint_sembuf_array(struct tcb *const tcp, const kernel_ulong_t addr,
#if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H
struct sembuf sb;
print_array(tcp, addr, count, &sb, sizeof(sb),
tfetch_mem, print_sembuf, 0);
umoven_or_printaddr, print_sembuf, 0);
#else
printaddr(addr);
#endif
@ -103,7 +103,11 @@ SYS_FUNC(semtimedop)
SYS_FUNC(semget)
{
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
const int key = (int) tcp->u_arg[0];
if (key)
tprintf("%#x", key);
else
tprints("IPC_PRIVATE");
tprintf(", %d, ", (int) tcp->u_arg[1]);
if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
tprints("|");

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-2018 The strace developers.
* Copyright (c) 2015-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -52,7 +52,11 @@
SYS_FUNC(shmget)
{
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
const int key = (int) tcp->u_arg[0];
if (key)
tprintf("%#x", key);
else
tprints("IPC_PRIVATE");
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
unsigned int flags = tcp->u_arg[2] & ~0777;
@ -63,12 +67,10 @@ SYS_FUNC(shmget)
if (flags || !hugetlb_value)
printflags(shm_resource_flags, flags, NULL);
if (hugetlb_value) {
tprintf("%s%u<<",
if (hugetlb_value)
tprintf("%s%u<<SHM_HUGE_SHIFT",
flags ? "|" : "",
hugetlb_value >> SHM_HUGE_SHIFT);
print_xlat_u(SHM_HUGE_SHIFT);
}
if (flags || hugetlb_value)
tprints("|");

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -76,7 +76,7 @@ print_kexec_segments(struct tcb *const tcp, const kernel_ulong_t addr,
const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize;
print_array(tcp, addr, len, seg, sizeof_seg,
tfetch_mem, print_seg, 0);
umoven_or_printaddr, print_seg, 0);
}
SYS_FUNC(kexec_load)

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -44,7 +44,12 @@ struct keyctl_dh_params {
static void
print_keyring_serial_number(key_serial_t id)
{
printxval_d(key_spec, id, NULL);
const char *str = xlookup(key_spec, (unsigned int) id);
if (str)
tprints(str);
else
tprintf("%d", id);
}
SYS_FUNC(add_key)
@ -190,8 +195,12 @@ keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
print_keyring_serial_number(id1);
tprintf(", %u, ", timeout);
print_xlat_ex(error, err_str, XLAT_STYLE_FMT_U);
tprints(", ");
if (err_str)
tprintf("%s, ", err_str);
else
tprintf("%u, ", error);
print_keyring_serial_number(id2);
}
@ -387,8 +396,7 @@ SYS_FUNC(keyctl)
break;
case KEYCTL_SET_REQKEY_KEYRING:
printxvals_ex((int) arg2, "KEY_REQKEY_DEFL_???",
XLAT_STYLE_FMT_D, key_reqkeys, NULL);
printxval(key_reqkeys, arg2, "KEY_REQKEY_DEFL_???");
break;
case KEYCTL_SET_TIMEOUT:

View File

@ -1,58 +0,0 @@
/*
* Wrappers for handling discrepancies in LF64-themed syscalls availability and
* necessity between verious architectures and kernel veriosns.
*
* Copyright (c) 2012-2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STRACE_LARGEFILE_WRAPPERS_H
#define STRACE_LARGEFILE_WRAPPERS_H
#include "defs.h"
#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
#endif /* STRACE_LARGEFILE_WRAPPERS_H */

146
ldt.c
View File

@ -6,7 +6,7 @@
* Copyright (c) 2002-2004 Roland McGrath <roland@redhat.com>
* Copyright (c) 2010 Andreas Schwab <schwab@linux-m68k.org>
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2014-2018 The strace developers.
* Copyright (c) 2014-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -38,130 +38,50 @@
# include <asm/ldt.h>
# include "print_fields.h"
# include "xstring.h"
void
print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr,
enum user_desc_print_filter filter)
print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct user_desc desc;
unsigned *entry_number = get_tcb_priv_data(tcp);
switch (filter) {
case USER_DESC_ENTERING:
if (umove_or_printaddr(tcp, addr, &desc.entry_number))
return;
if (umove_or_printaddr(tcp, addr, &desc))
return;
break;
case USER_DESC_EXITING:
if (!addr || !verbose(tcp))
return;
if (syserror(tcp) || umove(tcp, addr, &desc)) {
if (entry_number)
tprints(", ...}");
return;
}
break;
case USER_DESC_BOTH:
if (umove_or_printaddr(tcp, addr, &desc))
return;
break;
}
if (filter & USER_DESC_ENTERING) {
PRINT_FIELD_ID("{", desc, entry_number);
/*
* If we don't print the whole structure now, let's save it for
* later.
*/
if (filter == USER_DESC_ENTERING) {
entry_number = xmalloc(sizeof(*entry_number));
*entry_number = desc.entry_number;
set_tcb_priv_data(tcp, entry_number, free);
}
}
if (filter & USER_DESC_EXITING) {
/*
* It should be the same in case of get_thread_area, but we can
* never be sure...
*/
if (filter == USER_DESC_EXITING) {
if (entry_number) {
if (*entry_number != desc.entry_number) {
if ((int) desc.entry_number == -1)
tprints(" => -1");
else
tprintf(" => %u",
desc.entry_number);
}
} else {
/*
* This is really strange. If we are here, it
* means that we failed on entering but somehow
* succeeded on exiting.
*/
PRINT_FIELD_ID(" => {", desc, entry_number);
}
}
PRINT_FIELD_0X(", ", desc, base_addr);
PRINT_FIELD_0X(", ", desc, limit);
PRINT_FIELD_U_CAST(", ", desc, seg_32bit, unsigned int);
PRINT_FIELD_U_CAST(", ", desc, contents, unsigned int);
PRINT_FIELD_U_CAST(", ", desc, read_exec_only, unsigned int);
PRINT_FIELD_U_CAST(", ", desc, limit_in_pages, unsigned int);
PRINT_FIELD_U_CAST(", ", desc, seg_not_present, unsigned int);
PRINT_FIELD_U_CAST(", ", desc, useable, unsigned int);
# ifdef HAVE_STRUCT_USER_DESC_LM
/* lm is totally ignored for 32-bit processes */
if (current_klongsize == 8)
PRINT_FIELD_U_CAST(", ", desc, lm, unsigned int);
# endif /* HAVE_STRUCT_USER_DESC_LM */
tprints("}");
}
tprintf("{entry_number:%d, "
"base_addr:%#08x, "
"limit:%d, "
"seg_32bit:%d, "
"contents:%d, "
"read_exec_only:%d, "
"limit_in_pages:%d, "
"seg_not_present:%d, "
"useable:%d}",
desc.entry_number,
desc.base_addr,
desc.limit,
desc.seg_32bit,
desc.contents,
desc.read_exec_only,
desc.limit_in_pages,
desc.seg_not_present,
desc.useable);
}
SYS_FUNC(modify_ldt)
{
if (entering(tcp)) {
tprintf("%d, ", (int) tcp->u_arg[0]);
if (tcp->u_arg[2] != sizeof(struct user_desc))
printaddr(tcp->u_arg[1]);
else
print_user_desc(tcp, tcp->u_arg[1], USER_DESC_BOTH);
tprintf(", %" PRI_klu, tcp->u_arg[2]);
tprintf("%" PRI_kld ", ", tcp->u_arg[0]);
if (tcp->u_arg[2] != sizeof(struct user_desc))
printaddr(tcp->u_arg[1]);
else
print_user_desc(tcp, tcp->u_arg[1]);
tprintf(", %" PRI_klu, tcp->u_arg[2]);
return 0;
}
/*
* For some reason ("tht ABI for sys_modify_ldt() expects
* 'int'"), modify_ldt clips higher bits on x86_64.
*/
if (syserror(tcp) || (kernel_ulong_t) tcp->u_rval < 0xfffff000)
return 0;
tcp->u_error = -(unsigned int) tcp->u_rval;
return 0;
return RVAL_DECODED;
}
SYS_FUNC(set_thread_area)
{
if (entering(tcp)) {
print_user_desc(tcp, tcp->u_arg[0], USER_DESC_BOTH);
print_user_desc(tcp, tcp->u_arg[0]);
} else {
struct user_desc desc;
@ -171,7 +91,7 @@ SYS_FUNC(set_thread_area)
} else {
static char outstr[32];
xsprintf(outstr, "entry_number=%u", desc.entry_number);
sprintf(outstr, "entry_number:%d", desc.entry_number);
tcp->auxstr = outstr;
return RVAL_STR;
}
@ -181,8 +101,8 @@ SYS_FUNC(set_thread_area)
SYS_FUNC(get_thread_area)
{
print_user_desc(tcp, tcp->u_arg[0],
entering(tcp) ? USER_DESC_ENTERING : USER_DESC_EXITING);
if (exiting(tcp))
print_user_desc(tcp, tcp->u_arg[0]);
return 0;
}

View File

@ -85,7 +85,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE", _IOC_READ|_IOC_WRITE, 0x6454, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x11c },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 },
@ -94,7 +93,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_SCHED", _IOC_WRITE, 0x6455, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_VM", _IOC_READ|_IOC_WRITE, 0x6453, 0x08 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
@ -113,8 +111,6 @@
{ "drm/drm.h", "DRM_IOCTL_AUTH_MAGIC", _IOC_WRITE, 0x6411, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_BLOCK", _IOC_READ|_IOC_WRITE, 0x6412, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_CONTROL", _IOC_WRITE, 0x6414, 0x08 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_GET_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643b, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_QUEUE_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643c, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_DMA", _IOC_READ|_IOC_WRITE, 0x6429, 0x28 },
{ "drm/drm.h", "DRM_IOCTL_DROP_MASTER", _IOC_NONE, 0x641f, 0x00 },
{ "drm/drm.h", "DRM_IOCTL_FINISH", _IOC_WRITE, 0x642c, 0x08 },
@ -142,7 +138,6 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c6, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 },
{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 },
@ -159,13 +154,10 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64ac, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64aa, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETRESOURCES", _IOC_READ|_IOC_WRITE, 0x64a0, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GET_LEASE", _IOC_READ|_IOC_WRITE, 0x64c8, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_LIST_LESSEES", _IOC_READ|_IOC_WRITE, 0x64c7, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_MAP_DUMB", _IOC_READ|_IOC_WRITE, 0x64b3, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_GETPROPERTIES", _IOC_READ|_IOC_WRITE, 0x64b9, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ba, 0x14 },
{ "drm/drm.h", "DRM_IOCTL_MODE_PAGE_FLIP", _IOC_READ|_IOC_WRITE, 0x64b0, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_REVOKE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c9, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_RMFB", _IOC_READ|_IOC_WRITE, 0x64af, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETCRTC", _IOC_READ|_IOC_WRITE, 0x64a2, 0x68 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a5, 0x20 },
@ -203,12 +195,10 @@
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_DOM", _IOC_READ|_IOC_WRITE, 0x644a, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_SIG", _IOC_READ|_IOC_WRITE, 0x644b, 0x4a },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 },
@ -216,6 +206,10 @@
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6471, 0x60 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_CLEAR", _IOC_WRITE, 0x6442, 0x0c },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_COPY", _IOC_WRITE, 0x6447, 0x0c },
@ -283,7 +277,6 @@
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_ADD_CONFIG", _IOC_WRITE, 0x6477, 0x48 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_OPEN", _IOC_WRITE, 0x6476, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_REMOVE_CONFIG", _IOC_WRITE, 0x6478, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_QUERY", _IOC_READ|_IOC_WRITE, 0x6479, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_REG_READ", _IOC_READ|_IOC_WRITE, 0x6471, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SETPARAM", _IOC_WRITE, 0x6447, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 },
@ -309,11 +302,9 @@
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE", _IOC_WRITE, 0x644b, 0x04 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_NEW", _IOC_READ|_IOC_WRITE, 0x644a, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x1c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_PREP", _IOC_WRITE, 0x6482, 0x08 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6484, 0x28 },
@ -417,17 +408,13 @@
{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6449, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_LABEL_BO", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_CREATE", _IOC_READ|_IOC_WRITE, 0x644c, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_DESTROY", _IOC_READ|_IOC_WRITE, 0x644d, 0x04 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_GET_VALUES", _IOC_READ|_IOC_WRITE, 0x644e, 0x0c },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6448, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
@ -619,7 +606,6 @@
{ "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 },
{ "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", _IOC_READ|_IOC_WRITE, 0x9424, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO_V2", _IOC_READ|_IOC_WRITE, 0x943b, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", _IOC_WRITE, 0x9429, 0x18 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", _IOC_WRITE, 0x942a, 0x10 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", _IOC_READ, 0x942b, 0x30 },
@ -806,14 +792,9 @@
{ "linux/dvb/ca.h", "CA_SEND_MSG", _IOC_WRITE, 0x6f85, 0x10c },
{ "linux/dvb/ca.h", "CA_SET_DESCR", _IOC_WRITE, 0x6f86, 0x10 },
{ "linux/dvb/dmx.h", "DMX_ADD_PID", _IOC_WRITE, 0x6f33, 0x02 },
{ "linux/dvb/dmx.h", "DMX_DQBUF", _IOC_READ|_IOC_WRITE, 0x6f40, 0x18 },
{ "linux/dvb/dmx.h", "DMX_EXPBUF", _IOC_READ|_IOC_WRITE, 0x6f3e, 0x0c },
{ "linux/dvb/dmx.h", "DMX_GET_PES_PIDS", _IOC_READ, 0x6f2f, 0x0a },
{ "linux/dvb/dmx.h", "DMX_GET_STC", _IOC_READ|_IOC_WRITE, 0x6f32, 0x10 },
{ "linux/dvb/dmx.h", "DMX_QBUF", _IOC_READ|_IOC_WRITE, 0x6f3f, 0x18 },
{ "linux/dvb/dmx.h", "DMX_QUERYBUF", _IOC_READ|_IOC_WRITE, 0x6f3d, 0x18 },
{ "linux/dvb/dmx.h", "DMX_REMOVE_PID", _IOC_WRITE, 0x6f34, 0x02 },
{ "linux/dvb/dmx.h", "DMX_REQBUFS", _IOC_READ|_IOC_WRITE, 0x6f3c, 0x08 },
{ "linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", _IOC_NONE, 0x6f2d, 0x00 },
{ "linux/dvb/dmx.h", "DMX_SET_FILTER", _IOC_WRITE, 0x6f2b, 0x3a },
{ "linux/dvb/dmx.h", "DMX_SET_PES_FILTER", _IOC_WRITE, 0x6f2c, 0x12 },
@ -1147,7 +1128,6 @@
{ "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 },
{ "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 },
{ "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 },
{ "linux/if_tun.h", "TUNSETFILTEREBPF", _IOC_READ, 0x54e1, 0x04 },
{ "linux/if_tun.h", "TUNSETGROUP", _IOC_WRITE, 0x54ce, 0x04 },
{ "linux/if_tun.h", "TUNSETIFF", _IOC_WRITE, 0x54ca, 0x04 },
{ "linux/if_tun.h", "TUNSETIFINDEX", _IOC_WRITE, 0x54da, 0x04 },
@ -1158,13 +1138,11 @@
{ "linux/if_tun.h", "TUNSETPERSIST", _IOC_WRITE, 0x54cb, 0x04 },
{ "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 },
{ "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 },
{ "linux/if_tun.h", "TUNSETSTEERINGEBPF", _IOC_READ, 0x54e0, 0x04 },
{ "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 },
{ "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 },
{ "linux/inotify.h", "INOTIFY_IOC_SETNEXTWD", _IOC_WRITE, 0x4900, 0x04 },
{ "linux/input.h", "EVIOCGEFFECTS", _IOC_READ, 0x4584, 0x04 },
{ "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 },
{ "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 },
@ -1202,9 +1180,6 @@
{ "linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", _IOC_READ, 0x6916, 0x08 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", _IOC_READ, 0x690f, 0x02 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691d, 0x0c },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_CLEAR_SMS_ATN", _IOC_NONE, 0xb101, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_FORCE_ABORT", _IOC_NONE, 0xb102, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_SET_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
{ "linux/isdn.h", "IIOCDBGVAR", _IOC_NONE, 0x497f, 0x00 },
{ "linux/isdn.h", "IIOCDRVCTL", _IOC_NONE, 0x4980, 0x00 },
{ "linux/isdn.h", "IIOCGETCPS", _IOC_NONE, 0x4915, 0x00 },
@ -1246,6 +1221,48 @@
{ "linux/ivtv.h", "IVTV_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x38 },
{ "linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", _IOC_WRITE, 0x56c1, 0x04 },
{ "linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x0c },
{ "linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", _IOC_NONE, 0x71cd, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_AEC_START", _IOC_WRITE, 0x71cb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_AEC_STOP", _IOC_NONE, 0x71cc, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_CARDTYPE", _IOC_READ, 0x71c1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CID", _IOC_READ, 0x71d4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CIDCW", _IOC_WRITE, 0x71d9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_AGAIN", _IOC_WRITE, 0x71d2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", _IOC_WRITE, 0x71d0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", _IOC_NONE, 0x71e7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", _IOC_READ, 0x71e6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_IDLE", _IOC_NONE, 0x71c5, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_RESET", _IOC_NONE, 0x71c0, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_TYPE", _IOC_READ, 0x71c3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_VERSION", _IOC_READ, 0x71c4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", _IOC_WRITE, 0x71e8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", _IOC_WRITE, 0x71d6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_READ", _IOC_READ, 0x71e2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", _IOC_READ, 0x71e3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", _IOC_WRITE, 0x71c8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_HZ", _IOC_WRITE, 0x71e0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INIT_TONE", _IOC_WRITE, 0x71c9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_START", _IOC_WRITE, 0x71fd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", _IOC_WRITE, 0x71fe, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_MIXER", _IOC_WRITE, 0x71cf, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PLAY_CID", _IOC_NONE, 0x71d7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_PORT", _IOC_WRITE, 0x71d1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_POTS_PSTN", _IOC_WRITE, 0x71d5, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", _IOC_NONE, 0x71d3, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_RATE", _IOC_WRITE, 0x71e1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_READ_WAIT", _IOC_READ, 0x71e4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_RXG", _IOC_WRITE, 0x71ea, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_TXG", _IOC_WRITE, 0x71eb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SERIAL", _IOC_READ, 0x71c2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER", _IOC_WRITE, 0x71c7, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", _IOC_WRITE, 0x71dd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_LED", _IOC_WRITE, 0x71ce, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SIGCTL", _IOC_WRITE, 0x71e9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_TESTRAM", _IOC_NONE, 0x71c6, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_TONE_CADENCE", _IOC_WRITE, 0x71ca, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VERSION", _IOC_READ, 0x71da, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VMWI", _IOC_READ, 0x71d8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_WRITE_WAIT", _IOC_READ, 0x71e5, 0x04 },
{ "linux/joystick.h", "JSIOCGAXES", _IOC_READ, 0x6a11, 0x01 },
{ "linux/joystick.h", "JSIOCGAXMAP", _IOC_READ, 0x6a32, 0x40 },
{ "linux/joystick.h", "JSIOCGBTNMAP", _IOC_READ, 0x6a34, 0x400 },
@ -1304,8 +1321,6 @@
{ "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 },
{ "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 },
{ "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ACQUIRE_VM", _IOC_WRITE, 0x4b15, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ALLOC_MEMORY_OF_GPU", _IOC_READ|_IOC_WRITE, 0x4b16, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 },
@ -1314,19 +1329,14 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_FREE_MEMORY_OF_GPU", _IOC_WRITE, 0x4b17, 0x08 },
{ "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_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 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_SCRATCH_BACKING_VA", _IOC_READ|_IOC_WRITE, 0x4b11, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_TRAP_HANDLER", _IOC_WRITE, 0x4b13, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU", _IOC_READ|_IOC_WRITE, 0x4b19, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
{ "linux/lightnvm.h", "NVME_NVM_IOCTL_ADMIN_VIO", _IOC_READ|_IOC_WRITE, 0x4c41, 0x50 },
@ -1369,7 +1379,6 @@
{ "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 },
{ "linux/lp.h", "LPSETTIMEOUT_NEW", _IOC_WRITE, 0x060f, 0x10 },
{ "linux/mISDNif.h", "IMADDTIMER", _IOC_READ, 0x4940, 0x04 },
{ "linux/mISDNif.h", "IMCLEAR_L2", _IOC_READ, 0x4946, 0x04 },
{ "linux/mISDNif.h", "IMCTRLREQ", _IOC_READ, 0x4945, 0x04 },
@ -1458,6 +1467,8 @@
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 },
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
@ -1524,10 +1535,8 @@
{ "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_MODIFY_ATTRIBUTES", _IOC_WRITE, 0x240b, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PAUSE_OUTPUT", _IOC_WRITE, 0x2409, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_QUERY_BPF", _IOC_READ|_IOC_WRITE, 0x240a, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 },
@ -1615,7 +1624,6 @@
{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 },
{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 },
{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 },
{ "linux/psp-sev.h", "SEV_ISSUE_CMD", _IOC_READ|_IOC_WRITE, 0x5300, 0x10 },
{ "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 },
{ "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 },
{ "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 },
@ -1653,7 +1661,6 @@
{ "linux/random.h", "RNDCLEARPOOL", _IOC_NONE, 0x5206, 0x00 },
{ "linux/random.h", "RNDGETENTCNT", _IOC_READ, 0x5200, 0x04 },
{ "linux/random.h", "RNDGETPOOL", _IOC_READ, 0x5202, 0x08 },
{ "linux/random.h", "RNDRESEEDCRNG", _IOC_NONE, 0x5207, 0x00 },
{ "linux/random.h", "RNDZAPENTCNT", _IOC_NONE, 0x5204, 0x00 },
{ "linux/raw.h", "RAW_GETBIND", _IOC_NONE, 0xac01, 0x00 },
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
@ -1992,10 +1999,56 @@
{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_REGISTER", _IOC_READ|_IOC_WRITE, 0xa409, 0x18 },
{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
{ "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
{ "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_CHECK", _IOC_WRITE, 0x7182, 0x04 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_LIST", _IOC_READ, 0x7181, 0x04 },
{ "linux/telephony.h", "PHONE_CPT_STOP", _IOC_NONE, 0x71a4, 0x00 },
{ "linux/telephony.h", "PHONE_DIALTONE", _IOC_NONE, 0x71a3, 0x00 },
{ "linux/telephony.h", "PHONE_DTMF_OOB", _IOC_WRITE, 0x7199, 0x04 },
{ "linux/telephony.h", "PHONE_DTMF_READY", _IOC_READ, 0x7196, 0x04 },
{ "linux/telephony.h", "PHONE_EXCEPTION", _IOC_READ, 0x719a, 0x04 },
{ "linux/telephony.h", "PHONE_FRAME", _IOC_WRITE, 0x718d, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF", _IOC_READ, 0x7197, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF_ASCII", _IOC_READ, 0x7198, 0x04 },
{ "linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", _IOC_NONE, 0x719f, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_ON_TIME", _IOC_NONE, 0x719e, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_STATE", _IOC_NONE, 0x71a0, 0x00 },
{ "linux/telephony.h", "PHONE_HOOKSTATE", _IOC_NONE, 0x7184, 0x00 },
{ "linux/telephony.h", "PHONE_MAXRINGS", _IOC_WRITE, 0x7185, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_CODEC", _IOC_WRITE, 0x7190, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_DEPTH", _IOC_WRITE, 0x7193, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_LEVEL", _IOC_NONE, 0x7195, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_START", _IOC_NONE, 0x7191, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_STOP", _IOC_NONE, 0x7192, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_TONE", _IOC_WRITE, 0x719b, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME", _IOC_WRITE, 0x7194, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", _IOC_WRITE, 0x71dc, 0x04 },
{ "linux/telephony.h", "PHONE_PSTN_GET_STATE", _IOC_NONE, 0x71a5, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_LINETEST", _IOC_NONE, 0x71a8, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_SET_STATE", _IOC_WRITE, 0x71a4, 0x04 },
{ "linux/telephony.h", "PHONE_QUERY_CODEC", _IOC_READ|_IOC_WRITE, 0x71a7, 0x04 },
{ "linux/telephony.h", "PHONE_REC_CODEC", _IOC_WRITE, 0x7189, 0x04 },
{ "linux/telephony.h", "PHONE_REC_DEPTH", _IOC_WRITE, 0x718c, 0x04 },
{ "linux/telephony.h", "PHONE_REC_LEVEL", _IOC_NONE, 0x718f, 0x00 },
{ "linux/telephony.h", "PHONE_REC_START", _IOC_NONE, 0x718a, 0x00 },
{ "linux/telephony.h", "PHONE_REC_STOP", _IOC_NONE, 0x718b, 0x00 },
{ "linux/telephony.h", "PHONE_REC_VOLUME", _IOC_WRITE, 0x718e, 0x04 },
{ "linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", _IOC_WRITE, 0x71db, 0x04 },
{ "linux/telephony.h", "PHONE_RING", _IOC_NONE, 0x7183, 0x00 },
{ "linux/telephony.h", "PHONE_RINGBACK", _IOC_NONE, 0x71a2, 0x00 },
{ "linux/telephony.h", "PHONE_RING_CADENCE", _IOC_WRITE, 0x7186, 0x02 },
{ "linux/telephony.h", "PHONE_RING_START", _IOC_WRITE, 0x7187, 0x04 },
{ "linux/telephony.h", "PHONE_RING_STOP", _IOC_NONE, 0x7188, 0x00 },
{ "linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", _IOC_WRITE, 0x719d, 0x04 },
{ "linux/telephony.h", "PHONE_SET_TONE_ON_TIME", _IOC_WRITE, 0x719c, 0x04 },
{ "linux/telephony.h", "PHONE_VAD", _IOC_WRITE, 0x71a9, 0x04 },
{ "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 },
{ "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 },
{ "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 },
{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 },
{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 },
@ -2110,25 +2163,12 @@
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0x58 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5616, 0x30 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x563e, 0x40 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_FILTER_MASK", _IOC_READ|_IOC_WRITE, 0x560c, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_GUEST_CAPABILITIES", _IOC_READ|_IOC_WRITE, 0x560e, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHECK_BALLOON", _IOC_READ|_IOC_WRITE, 0x5611, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_DRIVER_VERSION_INFO", _IOC_READ|_IOC_WRITE, 0x5600, 0x2c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_CONNECT", _IOC_READ|_IOC_WRITE, 0x5604, 0x9c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_DISCONNECT", _IOC_READ|_IOC_WRITE, 0x5605, 0x1c },
{ "linux/vboxguest.h", "VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560b, 0x18 },
{ "linux/vboxguest.h", "VBG_IOCTL_VMMDEV_REQUEST_BIG", _IOC_READ|_IOC_WRITE, 0x5603, 0x00 },
{ "linux/vboxguest.h", "VBG_IOCTL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560a, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_WRITE_CORE_DUMP", _IOC_READ|_IOC_WRITE, 0x5613, 0x1c },
{ "linux/vfio.h", "VFIO_CHECK_EXTENSION", _IOC_NONE, 0x3b65, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_GFX_DMABUF", _IOC_NONE, 0x3b73, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_INFO", _IOC_NONE, 0x3b6b, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", _IOC_NONE, 0x3b6d, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_PCI_HOT_RESET_INFO", _IOC_NONE, 0x3b70, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", _IOC_NONE, 0x3b6c, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_IOEVENTFD", _IOC_NONE, 0x3b74, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_PCI_HOT_RESET", _IOC_NONE, 0x3b71, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_QUERY_GFX_PLANE", _IOC_NONE, 0x3b72, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_RESET", _IOC_NONE, 0x3b6f, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_SET_IRQS", _IOC_NONE, 0x3b6e, 0x00 },
{ "linux/vfio.h", "VFIO_EEH_PE_OP", _IOC_NONE, 0x3b79, 0x00 },
@ -2360,7 +2400,6 @@
{ "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 },
{ "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 },
{ "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 },
{ "linux/wmi.h", "DELL_WMI_SMBIOS_CMD", _IOC_READ|_IOC_WRITE, 0x5700, 0x34 },
{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 },
{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 },
{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 },
@ -2378,11 +2417,6 @@
{ "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 },
{ "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 },
{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 },
{ "misc/ocxl.h", "OCXL_IOCTL_ATTACH", _IOC_WRITE, 0xca10, 0x20 },
{ "misc/ocxl.h", "OCXL_IOCTL_GET_METADATA", _IOC_READ, 0xca14, 0x80 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_ALLOC", _IOC_READ, 0xca11, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_FREE", _IOC_WRITE, 0xca12, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_SET_FD", _IOC_WRITE, 0xca13, 0x10 },
{ "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 },
{ "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 },
{ "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 },
@ -2451,7 +2485,7 @@
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_ACK_EVENT", _IOC_WRITE, 0x1bea, 0x04 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_ASSIGN_CTXT", _IOC_READ|_IOC_WRITE, 0x1be1, 0x1c },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_CREDIT_UPD", _IOC_NONE, 0x1be6, 0x00 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_CTXT_INFO", _IOC_WRITE, 0x1be2, 0x28 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_CTXT_INFO", _IOC_WRITE, 0x1be2, 0x26 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_CTXT_RESET", _IOC_NONE, 0x1bec, 0x00 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_GET_VERS", _IOC_READ, 0x1bee, 0x04 },
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_POLL_TYPE", _IOC_WRITE, 0x1be9, 0x04 },
@ -2465,7 +2499,7 @@
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 },
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
{ "rdma/rdma_user_ioctl.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 },

View File

@ -85,7 +85,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE", _IOC_READ|_IOC_WRITE, 0x6454, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x11c },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 },
@ -94,7 +93,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_SCHED", _IOC_WRITE, 0x6455, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_VM", _IOC_READ|_IOC_WRITE, 0x6453, 0x08 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
@ -113,8 +111,6 @@
{ "drm/drm.h", "DRM_IOCTL_AUTH_MAGIC", _IOC_WRITE, 0x6411, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_BLOCK", _IOC_READ|_IOC_WRITE, 0x6412, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_CONTROL", _IOC_WRITE, 0x6414, 0x08 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_GET_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643b, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_QUEUE_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643c, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_DMA", _IOC_READ|_IOC_WRITE, 0x6429, 0x28 },
{ "drm/drm.h", "DRM_IOCTL_DROP_MASTER", _IOC_NONE, 0x641f, 0x00 },
{ "drm/drm.h", "DRM_IOCTL_FINISH", _IOC_WRITE, 0x642c, 0x08 },
@ -142,7 +138,6 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c6, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 },
{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 },
@ -159,13 +154,10 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64ac, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64aa, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETRESOURCES", _IOC_READ|_IOC_WRITE, 0x64a0, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GET_LEASE", _IOC_READ|_IOC_WRITE, 0x64c8, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_LIST_LESSEES", _IOC_READ|_IOC_WRITE, 0x64c7, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_MAP_DUMB", _IOC_READ|_IOC_WRITE, 0x64b3, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_GETPROPERTIES", _IOC_READ|_IOC_WRITE, 0x64b9, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ba, 0x14 },
{ "drm/drm.h", "DRM_IOCTL_MODE_PAGE_FLIP", _IOC_READ|_IOC_WRITE, 0x64b0, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_REVOKE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c9, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_RMFB", _IOC_READ|_IOC_WRITE, 0x64af, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETCRTC", _IOC_READ|_IOC_WRITE, 0x64a2, 0x68 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a5, 0x20 },
@ -203,12 +195,10 @@
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_DOM", _IOC_READ|_IOC_WRITE, 0x644a, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_SIG", _IOC_READ|_IOC_WRITE, 0x644b, 0x4c },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 },
@ -216,6 +206,10 @@
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6471, 0x60 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_CLEAR", _IOC_WRITE, 0x6442, 0x0c },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_COPY", _IOC_WRITE, 0x6447, 0x0c },
@ -283,7 +277,6 @@
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_ADD_CONFIG", _IOC_WRITE, 0x6477, 0x48 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_OPEN", _IOC_WRITE, 0x6476, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_REMOVE_CONFIG", _IOC_WRITE, 0x6478, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_QUERY", _IOC_READ|_IOC_WRITE, 0x6479, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_REG_READ", _IOC_READ|_IOC_WRITE, 0x6471, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SETPARAM", _IOC_WRITE, 0x6447, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 },
@ -309,11 +302,9 @@
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE", _IOC_WRITE, 0x644b, 0x04 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_NEW", _IOC_READ|_IOC_WRITE, 0x644a, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x1c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_PREP", _IOC_WRITE, 0x6482, 0x08 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6484, 0x28 },
@ -417,17 +408,13 @@
{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6449, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_LABEL_BO", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_CREATE", _IOC_READ|_IOC_WRITE, 0x644c, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_DESTROY", _IOC_READ|_IOC_WRITE, 0x644d, 0x04 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_GET_VALUES", _IOC_READ|_IOC_WRITE, 0x644e, 0x0c },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6448, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
@ -619,7 +606,6 @@
{ "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 },
{ "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", _IOC_READ|_IOC_WRITE, 0x9424, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO_V2", _IOC_READ|_IOC_WRITE, 0x943b, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", _IOC_WRITE, 0x9429, 0x18 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", _IOC_WRITE, 0x942a, 0x10 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", _IOC_READ, 0x942b, 0x30 },
@ -806,14 +792,9 @@
{ "linux/dvb/ca.h", "CA_SEND_MSG", _IOC_WRITE, 0x6f85, 0x10c },
{ "linux/dvb/ca.h", "CA_SET_DESCR", _IOC_WRITE, 0x6f86, 0x10 },
{ "linux/dvb/dmx.h", "DMX_ADD_PID", _IOC_WRITE, 0x6f33, 0x02 },
{ "linux/dvb/dmx.h", "DMX_DQBUF", _IOC_READ|_IOC_WRITE, 0x6f40, 0x18 },
{ "linux/dvb/dmx.h", "DMX_EXPBUF", _IOC_READ|_IOC_WRITE, 0x6f3e, 0x0c },
{ "linux/dvb/dmx.h", "DMX_GET_PES_PIDS", _IOC_READ, 0x6f2f, 0x0a },
{ "linux/dvb/dmx.h", "DMX_GET_STC", _IOC_READ|_IOC_WRITE, 0x6f32, 0x10 },
{ "linux/dvb/dmx.h", "DMX_QBUF", _IOC_READ|_IOC_WRITE, 0x6f3f, 0x18 },
{ "linux/dvb/dmx.h", "DMX_QUERYBUF", _IOC_READ|_IOC_WRITE, 0x6f3d, 0x18 },
{ "linux/dvb/dmx.h", "DMX_REMOVE_PID", _IOC_WRITE, 0x6f34, 0x02 },
{ "linux/dvb/dmx.h", "DMX_REQBUFS", _IOC_READ|_IOC_WRITE, 0x6f3c, 0x08 },
{ "linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", _IOC_NONE, 0x6f2d, 0x00 },
{ "linux/dvb/dmx.h", "DMX_SET_FILTER", _IOC_WRITE, 0x6f2b, 0x3c },
{ "linux/dvb/dmx.h", "DMX_SET_PES_FILTER", _IOC_WRITE, 0x6f2c, 0x14 },
@ -1147,7 +1128,6 @@
{ "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 },
{ "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 },
{ "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 },
{ "linux/if_tun.h", "TUNSETFILTEREBPF", _IOC_READ, 0x54e1, 0x04 },
{ "linux/if_tun.h", "TUNSETGROUP", _IOC_WRITE, 0x54ce, 0x04 },
{ "linux/if_tun.h", "TUNSETIFF", _IOC_WRITE, 0x54ca, 0x04 },
{ "linux/if_tun.h", "TUNSETIFINDEX", _IOC_WRITE, 0x54da, 0x04 },
@ -1158,13 +1138,11 @@
{ "linux/if_tun.h", "TUNSETPERSIST", _IOC_WRITE, 0x54cb, 0x04 },
{ "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 },
{ "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 },
{ "linux/if_tun.h", "TUNSETSTEERINGEBPF", _IOC_READ, 0x54e0, 0x04 },
{ "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 },
{ "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 },
{ "linux/inotify.h", "INOTIFY_IOC_SETNEXTWD", _IOC_WRITE, 0x4900, 0x04 },
{ "linux/input.h", "EVIOCGEFFECTS", _IOC_READ, 0x4584, 0x04 },
{ "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 },
{ "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 },
@ -1202,9 +1180,6 @@
{ "linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", _IOC_READ, 0x6916, 0x08 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", _IOC_READ, 0x690f, 0x02 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691d, 0x0c },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_CLEAR_SMS_ATN", _IOC_NONE, 0xb101, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_FORCE_ABORT", _IOC_NONE, 0xb102, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_SET_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
{ "linux/isdn.h", "IIOCDBGVAR", _IOC_NONE, 0x497f, 0x00 },
{ "linux/isdn.h", "IIOCDRVCTL", _IOC_NONE, 0x4980, 0x00 },
{ "linux/isdn.h", "IIOCGETCPS", _IOC_NONE, 0x4915, 0x00 },
@ -1246,6 +1221,48 @@
{ "linux/ivtv.h", "IVTV_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x38 },
{ "linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", _IOC_WRITE, 0x56c1, 0x04 },
{ "linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x0c },
{ "linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", _IOC_NONE, 0x71cd, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_AEC_START", _IOC_WRITE, 0x71cb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_AEC_STOP", _IOC_NONE, 0x71cc, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_CARDTYPE", _IOC_READ, 0x71c1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CID", _IOC_READ, 0x71d4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CIDCW", _IOC_WRITE, 0x71d9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_AGAIN", _IOC_WRITE, 0x71d2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", _IOC_WRITE, 0x71d0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", _IOC_NONE, 0x71e7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", _IOC_READ, 0x71e6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_IDLE", _IOC_NONE, 0x71c5, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_RESET", _IOC_NONE, 0x71c0, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_TYPE", _IOC_READ, 0x71c3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_VERSION", _IOC_READ, 0x71c4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", _IOC_WRITE, 0x71e8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", _IOC_WRITE, 0x71d6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_READ", _IOC_READ, 0x71e2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", _IOC_READ, 0x71e3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", _IOC_WRITE, 0x71c8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_HZ", _IOC_WRITE, 0x71e0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INIT_TONE", _IOC_WRITE, 0x71c9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_START", _IOC_WRITE, 0x71fd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", _IOC_WRITE, 0x71fe, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_MIXER", _IOC_WRITE, 0x71cf, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PLAY_CID", _IOC_NONE, 0x71d7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_PORT", _IOC_WRITE, 0x71d1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_POTS_PSTN", _IOC_WRITE, 0x71d5, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", _IOC_NONE, 0x71d3, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_RATE", _IOC_WRITE, 0x71e1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_READ_WAIT", _IOC_READ, 0x71e4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_RXG", _IOC_WRITE, 0x71ea, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_TXG", _IOC_WRITE, 0x71eb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SERIAL", _IOC_READ, 0x71c2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER", _IOC_WRITE, 0x71c7, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", _IOC_WRITE, 0x71dd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_LED", _IOC_WRITE, 0x71ce, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SIGCTL", _IOC_WRITE, 0x71e9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_TESTRAM", _IOC_NONE, 0x71c6, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_TONE_CADENCE", _IOC_WRITE, 0x71ca, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VERSION", _IOC_READ, 0x71da, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VMWI", _IOC_READ, 0x71d8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_WRITE_WAIT", _IOC_READ, 0x71e5, 0x04 },
{ "linux/joystick.h", "JSIOCGAXES", _IOC_READ, 0x6a11, 0x01 },
{ "linux/joystick.h", "JSIOCGAXMAP", _IOC_READ, 0x6a32, 0x40 },
{ "linux/joystick.h", "JSIOCGBTNMAP", _IOC_READ, 0x6a34, 0x400 },
@ -1304,8 +1321,6 @@
{ "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 },
{ "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 },
{ "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ACQUIRE_VM", _IOC_WRITE, 0x4b15, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ALLOC_MEMORY_OF_GPU", _IOC_READ|_IOC_WRITE, 0x4b16, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 },
@ -1314,19 +1329,14 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_FREE_MEMORY_OF_GPU", _IOC_WRITE, 0x4b17, 0x08 },
{ "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_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 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_SCRATCH_BACKING_VA", _IOC_READ|_IOC_WRITE, 0x4b11, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_TRAP_HANDLER", _IOC_WRITE, 0x4b13, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU", _IOC_READ|_IOC_WRITE, 0x4b19, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
{ "linux/lightnvm.h", "NVME_NVM_IOCTL_ADMIN_VIO", _IOC_READ|_IOC_WRITE, 0x4c41, 0x50 },
@ -1369,7 +1379,6 @@
{ "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 },
{ "linux/lp.h", "LPSETTIMEOUT_NEW", _IOC_WRITE, 0x060f, 0x10 },
{ "linux/mISDNif.h", "IMADDTIMER", _IOC_READ, 0x4940, 0x04 },
{ "linux/mISDNif.h", "IMCLEAR_L2", _IOC_READ, 0x4946, 0x04 },
{ "linux/mISDNif.h", "IMCTRLREQ", _IOC_READ, 0x4945, 0x04 },
@ -1458,6 +1467,8 @@
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 },
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
@ -1524,10 +1535,8 @@
{ "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_MODIFY_ATTRIBUTES", _IOC_WRITE, 0x240b, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PAUSE_OUTPUT", _IOC_WRITE, 0x2409, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_QUERY_BPF", _IOC_READ|_IOC_WRITE, 0x240a, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 },
@ -1615,7 +1624,6 @@
{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 },
{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 },
{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 },
{ "linux/psp-sev.h", "SEV_ISSUE_CMD", _IOC_READ|_IOC_WRITE, 0x5300, 0x10 },
{ "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 },
{ "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 },
{ "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 },
@ -1653,7 +1661,6 @@
{ "linux/random.h", "RNDCLEARPOOL", _IOC_NONE, 0x5206, 0x00 },
{ "linux/random.h", "RNDGETENTCNT", _IOC_READ, 0x5200, 0x04 },
{ "linux/random.h", "RNDGETPOOL", _IOC_READ, 0x5202, 0x08 },
{ "linux/random.h", "RNDRESEEDCRNG", _IOC_NONE, 0x5207, 0x00 },
{ "linux/random.h", "RNDZAPENTCNT", _IOC_NONE, 0x5204, 0x00 },
{ "linux/raw.h", "RAW_GETBIND", _IOC_NONE, 0xac01, 0x00 },
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
@ -1992,10 +1999,56 @@
{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_REGISTER", _IOC_READ|_IOC_WRITE, 0xa409, 0x18 },
{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
{ "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
{ "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_CHECK", _IOC_WRITE, 0x7182, 0x04 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_LIST", _IOC_READ, 0x7181, 0x04 },
{ "linux/telephony.h", "PHONE_CPT_STOP", _IOC_NONE, 0x71a4, 0x00 },
{ "linux/telephony.h", "PHONE_DIALTONE", _IOC_NONE, 0x71a3, 0x00 },
{ "linux/telephony.h", "PHONE_DTMF_OOB", _IOC_WRITE, 0x7199, 0x04 },
{ "linux/telephony.h", "PHONE_DTMF_READY", _IOC_READ, 0x7196, 0x04 },
{ "linux/telephony.h", "PHONE_EXCEPTION", _IOC_READ, 0x719a, 0x04 },
{ "linux/telephony.h", "PHONE_FRAME", _IOC_WRITE, 0x718d, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF", _IOC_READ, 0x7197, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF_ASCII", _IOC_READ, 0x7198, 0x04 },
{ "linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", _IOC_NONE, 0x719f, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_ON_TIME", _IOC_NONE, 0x719e, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_STATE", _IOC_NONE, 0x71a0, 0x00 },
{ "linux/telephony.h", "PHONE_HOOKSTATE", _IOC_NONE, 0x7184, 0x00 },
{ "linux/telephony.h", "PHONE_MAXRINGS", _IOC_WRITE, 0x7185, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_CODEC", _IOC_WRITE, 0x7190, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_DEPTH", _IOC_WRITE, 0x7193, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_LEVEL", _IOC_NONE, 0x7195, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_START", _IOC_NONE, 0x7191, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_STOP", _IOC_NONE, 0x7192, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_TONE", _IOC_WRITE, 0x719b, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME", _IOC_WRITE, 0x7194, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", _IOC_WRITE, 0x71dc, 0x04 },
{ "linux/telephony.h", "PHONE_PSTN_GET_STATE", _IOC_NONE, 0x71a5, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_LINETEST", _IOC_NONE, 0x71a8, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_SET_STATE", _IOC_WRITE, 0x71a4, 0x04 },
{ "linux/telephony.h", "PHONE_QUERY_CODEC", _IOC_READ|_IOC_WRITE, 0x71a7, 0x04 },
{ "linux/telephony.h", "PHONE_REC_CODEC", _IOC_WRITE, 0x7189, 0x04 },
{ "linux/telephony.h", "PHONE_REC_DEPTH", _IOC_WRITE, 0x718c, 0x04 },
{ "linux/telephony.h", "PHONE_REC_LEVEL", _IOC_NONE, 0x718f, 0x00 },
{ "linux/telephony.h", "PHONE_REC_START", _IOC_NONE, 0x718a, 0x00 },
{ "linux/telephony.h", "PHONE_REC_STOP", _IOC_NONE, 0x718b, 0x00 },
{ "linux/telephony.h", "PHONE_REC_VOLUME", _IOC_WRITE, 0x718e, 0x04 },
{ "linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", _IOC_WRITE, 0x71db, 0x04 },
{ "linux/telephony.h", "PHONE_RING", _IOC_NONE, 0x7183, 0x00 },
{ "linux/telephony.h", "PHONE_RINGBACK", _IOC_NONE, 0x71a2, 0x00 },
{ "linux/telephony.h", "PHONE_RING_CADENCE", _IOC_WRITE, 0x7186, 0x02 },
{ "linux/telephony.h", "PHONE_RING_START", _IOC_WRITE, 0x7187, 0x04 },
{ "linux/telephony.h", "PHONE_RING_STOP", _IOC_NONE, 0x7188, 0x00 },
{ "linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", _IOC_WRITE, 0x719d, 0x04 },
{ "linux/telephony.h", "PHONE_SET_TONE_ON_TIME", _IOC_WRITE, 0x719c, 0x04 },
{ "linux/telephony.h", "PHONE_VAD", _IOC_WRITE, 0x71a9, 0x04 },
{ "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 },
{ "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 },
{ "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 },
{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 },
{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 },
@ -2110,25 +2163,12 @@
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0x58 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5616, 0x30 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x563e, 0x40 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_FILTER_MASK", _IOC_READ|_IOC_WRITE, 0x560c, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_GUEST_CAPABILITIES", _IOC_READ|_IOC_WRITE, 0x560e, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHECK_BALLOON", _IOC_READ|_IOC_WRITE, 0x5611, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_DRIVER_VERSION_INFO", _IOC_READ|_IOC_WRITE, 0x5600, 0x2c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_CONNECT", _IOC_READ|_IOC_WRITE, 0x5604, 0x9c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_DISCONNECT", _IOC_READ|_IOC_WRITE, 0x5605, 0x1c },
{ "linux/vboxguest.h", "VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560b, 0x18 },
{ "linux/vboxguest.h", "VBG_IOCTL_VMMDEV_REQUEST_BIG", _IOC_READ|_IOC_WRITE, 0x5603, 0x00 },
{ "linux/vboxguest.h", "VBG_IOCTL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560a, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_WRITE_CORE_DUMP", _IOC_READ|_IOC_WRITE, 0x5613, 0x1c },
{ "linux/vfio.h", "VFIO_CHECK_EXTENSION", _IOC_NONE, 0x3b65, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_GFX_DMABUF", _IOC_NONE, 0x3b73, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_INFO", _IOC_NONE, 0x3b6b, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", _IOC_NONE, 0x3b6d, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_PCI_HOT_RESET_INFO", _IOC_NONE, 0x3b70, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", _IOC_NONE, 0x3b6c, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_IOEVENTFD", _IOC_NONE, 0x3b74, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_PCI_HOT_RESET", _IOC_NONE, 0x3b71, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_QUERY_GFX_PLANE", _IOC_NONE, 0x3b72, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_RESET", _IOC_NONE, 0x3b6f, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_SET_IRQS", _IOC_NONE, 0x3b6e, 0x00 },
{ "linux/vfio.h", "VFIO_EEH_PE_OP", _IOC_NONE, 0x3b79, 0x00 },
@ -2360,7 +2400,6 @@
{ "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 },
{ "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 },
{ "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 },
{ "linux/wmi.h", "DELL_WMI_SMBIOS_CMD", _IOC_READ|_IOC_WRITE, 0x5700, 0x34 },
{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 },
{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 },
{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 },
@ -2378,11 +2417,6 @@
{ "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 },
{ "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 },
{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 },
{ "misc/ocxl.h", "OCXL_IOCTL_ATTACH", _IOC_WRITE, 0xca10, 0x20 },
{ "misc/ocxl.h", "OCXL_IOCTL_GET_METADATA", _IOC_READ, 0xca14, 0x80 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_ALLOC", _IOC_READ, 0xca11, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_FREE", _IOC_WRITE, 0xca12, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_SET_FD", _IOC_WRITE, 0xca13, 0x10 },
{ "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 },
{ "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 },
{ "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 },
@ -2465,7 +2499,7 @@
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 },
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
{ "rdma/rdma_user_ioctl.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 },

View File

@ -85,7 +85,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE", _IOC_READ|_IOC_WRITE, 0x6454, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x120 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 },
@ -94,7 +93,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_SCHED", _IOC_WRITE, 0x6455, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_VM", _IOC_READ|_IOC_WRITE, 0x6453, 0x08 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
@ -113,8 +111,6 @@
{ "drm/drm.h", "DRM_IOCTL_AUTH_MAGIC", _IOC_WRITE, 0x6411, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_BLOCK", _IOC_READ|_IOC_WRITE, 0x6412, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_CONTROL", _IOC_WRITE, 0x6414, 0x08 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_GET_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643b, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_QUEUE_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643c, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_DMA", _IOC_READ|_IOC_WRITE, 0x6429, 0x28 },
{ "drm/drm.h", "DRM_IOCTL_DROP_MASTER", _IOC_NONE, 0x641f, 0x00 },
{ "drm/drm.h", "DRM_IOCTL_FINISH", _IOC_WRITE, 0x642c, 0x08 },
@ -142,7 +138,6 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c6, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 },
{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 },
@ -159,13 +154,10 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64ac, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64aa, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETRESOURCES", _IOC_READ|_IOC_WRITE, 0x64a0, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GET_LEASE", _IOC_READ|_IOC_WRITE, 0x64c8, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_LIST_LESSEES", _IOC_READ|_IOC_WRITE, 0x64c7, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_MAP_DUMB", _IOC_READ|_IOC_WRITE, 0x64b3, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_GETPROPERTIES", _IOC_READ|_IOC_WRITE, 0x64b9, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ba, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_PAGE_FLIP", _IOC_READ|_IOC_WRITE, 0x64b0, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_REVOKE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c9, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_RMFB", _IOC_READ|_IOC_WRITE, 0x64af, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETCRTC", _IOC_READ|_IOC_WRITE, 0x64a2, 0x68 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a5, 0x20 },
@ -203,12 +195,10 @@
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_DOM", _IOC_READ|_IOC_WRITE, 0x644a, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_SIG", _IOC_READ|_IOC_WRITE, 0x644b, 0x4c },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 },
@ -216,6 +206,10 @@
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6471, 0x60 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_CLEAR", _IOC_WRITE, 0x6442, 0x0c },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_COPY", _IOC_WRITE, 0x6447, 0x0c },
@ -283,7 +277,6 @@
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_ADD_CONFIG", _IOC_WRITE, 0x6477, 0x48 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_OPEN", _IOC_WRITE, 0x6476, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_REMOVE_CONFIG", _IOC_WRITE, 0x6478, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_QUERY", _IOC_READ|_IOC_WRITE, 0x6479, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_REG_READ", _IOC_READ|_IOC_WRITE, 0x6471, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SETPARAM", _IOC_WRITE, 0x6447, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 },
@ -311,9 +304,7 @@
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE", _IOC_WRITE, 0x644b, 0x04 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_NEW", _IOC_READ|_IOC_WRITE, 0x644a, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_PREP", _IOC_WRITE, 0x6482, 0x08 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6484, 0x28 },
@ -417,17 +408,13 @@
{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6449, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_LABEL_BO", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_CREATE", _IOC_READ|_IOC_WRITE, 0x644c, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_DESTROY", _IOC_READ|_IOC_WRITE, 0x644d, 0x04 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_GET_VALUES", _IOC_READ|_IOC_WRITE, 0x644e, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6448, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
@ -619,7 +606,6 @@
{ "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 },
{ "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", _IOC_READ|_IOC_WRITE, 0x9424, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO_V2", _IOC_READ|_IOC_WRITE, 0x943b, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", _IOC_WRITE, 0x9429, 0x18 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", _IOC_WRITE, 0x942a, 0x10 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", _IOC_READ, 0x942b, 0x30 },
@ -806,14 +792,9 @@
{ "linux/dvb/ca.h", "CA_SEND_MSG", _IOC_WRITE, 0x6f85, 0x10c },
{ "linux/dvb/ca.h", "CA_SET_DESCR", _IOC_WRITE, 0x6f86, 0x10 },
{ "linux/dvb/dmx.h", "DMX_ADD_PID", _IOC_WRITE, 0x6f33, 0x02 },
{ "linux/dvb/dmx.h", "DMX_DQBUF", _IOC_READ|_IOC_WRITE, 0x6f40, 0x18 },
{ "linux/dvb/dmx.h", "DMX_EXPBUF", _IOC_READ|_IOC_WRITE, 0x6f3e, 0x0c },
{ "linux/dvb/dmx.h", "DMX_GET_PES_PIDS", _IOC_READ, 0x6f2f, 0x0a },
{ "linux/dvb/dmx.h", "DMX_GET_STC", _IOC_READ|_IOC_WRITE, 0x6f32, 0x10 },
{ "linux/dvb/dmx.h", "DMX_QBUF", _IOC_READ|_IOC_WRITE, 0x6f3f, 0x18 },
{ "linux/dvb/dmx.h", "DMX_QUERYBUF", _IOC_READ|_IOC_WRITE, 0x6f3d, 0x18 },
{ "linux/dvb/dmx.h", "DMX_REMOVE_PID", _IOC_WRITE, 0x6f34, 0x02 },
{ "linux/dvb/dmx.h", "DMX_REQBUFS", _IOC_READ|_IOC_WRITE, 0x6f3c, 0x08 },
{ "linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", _IOC_NONE, 0x6f2d, 0x00 },
{ "linux/dvb/dmx.h", "DMX_SET_FILTER", _IOC_WRITE, 0x6f2b, 0x3c },
{ "linux/dvb/dmx.h", "DMX_SET_PES_FILTER", _IOC_WRITE, 0x6f2c, 0x14 },
@ -1147,7 +1128,6 @@
{ "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 },
{ "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 },
{ "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 },
{ "linux/if_tun.h", "TUNSETFILTEREBPF", _IOC_READ, 0x54e1, 0x04 },
{ "linux/if_tun.h", "TUNSETGROUP", _IOC_WRITE, 0x54ce, 0x04 },
{ "linux/if_tun.h", "TUNSETIFF", _IOC_WRITE, 0x54ca, 0x04 },
{ "linux/if_tun.h", "TUNSETIFINDEX", _IOC_WRITE, 0x54da, 0x04 },
@ -1158,13 +1138,11 @@
{ "linux/if_tun.h", "TUNSETPERSIST", _IOC_WRITE, 0x54cb, 0x04 },
{ "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 },
{ "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 },
{ "linux/if_tun.h", "TUNSETSTEERINGEBPF", _IOC_READ, 0x54e0, 0x04 },
{ "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 },
{ "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 },
{ "linux/inotify.h", "INOTIFY_IOC_SETNEXTWD", _IOC_WRITE, 0x4900, 0x04 },
{ "linux/input.h", "EVIOCGEFFECTS", _IOC_READ, 0x4584, 0x04 },
{ "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 },
{ "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 },
@ -1202,9 +1180,6 @@
{ "linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", _IOC_READ, 0x6916, 0x08 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", _IOC_READ, 0x690f, 0x02 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691d, 0x0c },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_CLEAR_SMS_ATN", _IOC_NONE, 0xb101, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_FORCE_ABORT", _IOC_NONE, 0xb102, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_SET_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
{ "linux/isdn.h", "IIOCDBGVAR", _IOC_NONE, 0x497f, 0x00 },
{ "linux/isdn.h", "IIOCDRVCTL", _IOC_NONE, 0x4980, 0x00 },
{ "linux/isdn.h", "IIOCGETCPS", _IOC_NONE, 0x4915, 0x00 },
@ -1246,6 +1221,48 @@
{ "linux/ivtv.h", "IVTV_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x38 },
{ "linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", _IOC_WRITE, 0x56c1, 0x04 },
{ "linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x0c },
{ "linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", _IOC_NONE, 0x71cd, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_AEC_START", _IOC_WRITE, 0x71cb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_AEC_STOP", _IOC_NONE, 0x71cc, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_CARDTYPE", _IOC_READ, 0x71c1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CID", _IOC_READ, 0x71d4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CIDCW", _IOC_WRITE, 0x71d9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_AGAIN", _IOC_WRITE, 0x71d2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", _IOC_WRITE, 0x71d0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", _IOC_NONE, 0x71e7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", _IOC_READ, 0x71e6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_IDLE", _IOC_NONE, 0x71c5, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_RESET", _IOC_NONE, 0x71c0, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_TYPE", _IOC_READ, 0x71c3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_VERSION", _IOC_READ, 0x71c4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", _IOC_WRITE, 0x71e8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", _IOC_WRITE, 0x71d6, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_READ", _IOC_READ, 0x71e2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", _IOC_READ, 0x71e3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", _IOC_WRITE, 0x71c8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_HZ", _IOC_WRITE, 0x71e0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INIT_TONE", _IOC_WRITE, 0x71c9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_START", _IOC_WRITE, 0x71fd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", _IOC_WRITE, 0x71fe, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_MIXER", _IOC_WRITE, 0x71cf, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PLAY_CID", _IOC_NONE, 0x71d7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_PORT", _IOC_WRITE, 0x71d1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_POTS_PSTN", _IOC_WRITE, 0x71d5, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", _IOC_NONE, 0x71d3, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_RATE", _IOC_WRITE, 0x71e1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_READ_WAIT", _IOC_READ, 0x71e4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_RXG", _IOC_WRITE, 0x71ea, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_TXG", _IOC_WRITE, 0x71eb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SERIAL", _IOC_READ, 0x71c2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER", _IOC_WRITE, 0x71c7, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", _IOC_WRITE, 0x71dd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_LED", _IOC_WRITE, 0x71ce, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SIGCTL", _IOC_WRITE, 0x71e9, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_TESTRAM", _IOC_NONE, 0x71c6, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_TONE_CADENCE", _IOC_WRITE, 0x71ca, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VERSION", _IOC_READ, 0x71da, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_VMWI", _IOC_READ, 0x71d8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_WRITE_WAIT", _IOC_READ, 0x71e5, 0x04 },
{ "linux/joystick.h", "JSIOCGAXES", _IOC_READ, 0x6a11, 0x01 },
{ "linux/joystick.h", "JSIOCGAXMAP", _IOC_READ, 0x6a32, 0x40 },
{ "linux/joystick.h", "JSIOCGBTNMAP", _IOC_READ, 0x6a34, 0x400 },
@ -1304,8 +1321,6 @@
{ "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 },
{ "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 },
{ "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ACQUIRE_VM", _IOC_WRITE, 0x4b15, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ALLOC_MEMORY_OF_GPU", _IOC_READ|_IOC_WRITE, 0x4b16, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 },
@ -1314,19 +1329,14 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_FREE_MEMORY_OF_GPU", _IOC_WRITE, 0x4b17, 0x08 },
{ "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_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 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_SCRATCH_BACKING_VA", _IOC_READ|_IOC_WRITE, 0x4b11, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_TRAP_HANDLER", _IOC_WRITE, 0x4b13, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU", _IOC_READ|_IOC_WRITE, 0x4b19, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
{ "linux/lightnvm.h", "NVME_NVM_IOCTL_ADMIN_VIO", _IOC_READ|_IOC_WRITE, 0x4c41, 0x50 },
@ -1369,7 +1379,6 @@
{ "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 },
{ "linux/lp.h", "LPSETTIMEOUT_NEW", _IOC_WRITE, 0x060f, 0x10 },
{ "linux/mISDNif.h", "IMADDTIMER", _IOC_READ, 0x4940, 0x04 },
{ "linux/mISDNif.h", "IMCLEAR_L2", _IOC_READ, 0x4946, 0x04 },
{ "linux/mISDNif.h", "IMCTRLREQ", _IOC_READ, 0x4945, 0x04 },
@ -1458,6 +1467,8 @@
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 },
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
@ -1524,10 +1535,8 @@
{ "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_MODIFY_ATTRIBUTES", _IOC_WRITE, 0x240b, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PAUSE_OUTPUT", _IOC_WRITE, 0x2409, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_QUERY_BPF", _IOC_READ|_IOC_WRITE, 0x240a, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 },
@ -1615,7 +1624,6 @@
{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 },
{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 },
{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 },
{ "linux/psp-sev.h", "SEV_ISSUE_CMD", _IOC_READ|_IOC_WRITE, 0x5300, 0x10 },
{ "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 },
{ "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 },
{ "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 },
@ -1653,7 +1661,6 @@
{ "linux/random.h", "RNDCLEARPOOL", _IOC_NONE, 0x5206, 0x00 },
{ "linux/random.h", "RNDGETENTCNT", _IOC_READ, 0x5200, 0x04 },
{ "linux/random.h", "RNDGETPOOL", _IOC_READ, 0x5202, 0x08 },
{ "linux/random.h", "RNDRESEEDCRNG", _IOC_NONE, 0x5207, 0x00 },
{ "linux/random.h", "RNDZAPENTCNT", _IOC_NONE, 0x5204, 0x00 },
{ "linux/raw.h", "RAW_GETBIND", _IOC_NONE, 0xac01, 0x00 },
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
@ -1992,10 +1999,56 @@
{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_REGISTER", _IOC_READ|_IOC_WRITE, 0xa409, 0x18 },
{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
{ "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
{ "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_CHECK", _IOC_WRITE, 0x7182, 0x04 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_LIST", _IOC_READ, 0x7181, 0x04 },
{ "linux/telephony.h", "PHONE_CPT_STOP", _IOC_NONE, 0x71a4, 0x00 },
{ "linux/telephony.h", "PHONE_DIALTONE", _IOC_NONE, 0x71a3, 0x00 },
{ "linux/telephony.h", "PHONE_DTMF_OOB", _IOC_WRITE, 0x7199, 0x04 },
{ "linux/telephony.h", "PHONE_DTMF_READY", _IOC_READ, 0x7196, 0x04 },
{ "linux/telephony.h", "PHONE_EXCEPTION", _IOC_READ, 0x719a, 0x04 },
{ "linux/telephony.h", "PHONE_FRAME", _IOC_WRITE, 0x718d, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF", _IOC_READ, 0x7197, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF_ASCII", _IOC_READ, 0x7198, 0x04 },
{ "linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", _IOC_NONE, 0x719f, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_ON_TIME", _IOC_NONE, 0x719e, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_STATE", _IOC_NONE, 0x71a0, 0x00 },
{ "linux/telephony.h", "PHONE_HOOKSTATE", _IOC_NONE, 0x7184, 0x00 },
{ "linux/telephony.h", "PHONE_MAXRINGS", _IOC_WRITE, 0x7185, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_CODEC", _IOC_WRITE, 0x7190, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_DEPTH", _IOC_WRITE, 0x7193, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_LEVEL", _IOC_NONE, 0x7195, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_START", _IOC_NONE, 0x7191, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_STOP", _IOC_NONE, 0x7192, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_TONE", _IOC_WRITE, 0x719b, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME", _IOC_WRITE, 0x7194, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", _IOC_WRITE, 0x71dc, 0x04 },
{ "linux/telephony.h", "PHONE_PSTN_GET_STATE", _IOC_NONE, 0x71a5, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_LINETEST", _IOC_NONE, 0x71a8, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_SET_STATE", _IOC_WRITE, 0x71a4, 0x04 },
{ "linux/telephony.h", "PHONE_QUERY_CODEC", _IOC_READ|_IOC_WRITE, 0x71a7, 0x04 },
{ "linux/telephony.h", "PHONE_REC_CODEC", _IOC_WRITE, 0x7189, 0x04 },
{ "linux/telephony.h", "PHONE_REC_DEPTH", _IOC_WRITE, 0x718c, 0x04 },
{ "linux/telephony.h", "PHONE_REC_LEVEL", _IOC_NONE, 0x718f, 0x00 },
{ "linux/telephony.h", "PHONE_REC_START", _IOC_NONE, 0x718a, 0x00 },
{ "linux/telephony.h", "PHONE_REC_STOP", _IOC_NONE, 0x718b, 0x00 },
{ "linux/telephony.h", "PHONE_REC_VOLUME", _IOC_WRITE, 0x718e, 0x04 },
{ "linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", _IOC_WRITE, 0x71db, 0x04 },
{ "linux/telephony.h", "PHONE_RING", _IOC_NONE, 0x7183, 0x00 },
{ "linux/telephony.h", "PHONE_RINGBACK", _IOC_NONE, 0x71a2, 0x00 },
{ "linux/telephony.h", "PHONE_RING_CADENCE", _IOC_WRITE, 0x7186, 0x02 },
{ "linux/telephony.h", "PHONE_RING_START", _IOC_WRITE, 0x7187, 0x04 },
{ "linux/telephony.h", "PHONE_RING_STOP", _IOC_NONE, 0x7188, 0x00 },
{ "linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", _IOC_WRITE, 0x719d, 0x04 },
{ "linux/telephony.h", "PHONE_SET_TONE_ON_TIME", _IOC_WRITE, 0x719c, 0x04 },
{ "linux/telephony.h", "PHONE_VAD", _IOC_WRITE, 0x71a9, 0x04 },
{ "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 },
{ "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 },
{ "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 },
{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 },
{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 },
@ -2110,25 +2163,12 @@
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0x58 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5616, 0x30 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x563e, 0x40 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_FILTER_MASK", _IOC_READ|_IOC_WRITE, 0x560c, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_GUEST_CAPABILITIES", _IOC_READ|_IOC_WRITE, 0x560e, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHECK_BALLOON", _IOC_READ|_IOC_WRITE, 0x5611, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_DRIVER_VERSION_INFO", _IOC_READ|_IOC_WRITE, 0x5600, 0x2c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_CONNECT", _IOC_READ|_IOC_WRITE, 0x5604, 0x9c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_DISCONNECT", _IOC_READ|_IOC_WRITE, 0x5605, 0x1c },
{ "linux/vboxguest.h", "VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560b, 0x18 },
{ "linux/vboxguest.h", "VBG_IOCTL_VMMDEV_REQUEST_BIG", _IOC_READ|_IOC_WRITE, 0x5603, 0x00 },
{ "linux/vboxguest.h", "VBG_IOCTL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560a, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_WRITE_CORE_DUMP", _IOC_READ|_IOC_WRITE, 0x5613, 0x1c },
{ "linux/vfio.h", "VFIO_CHECK_EXTENSION", _IOC_NONE, 0x3b65, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_GFX_DMABUF", _IOC_NONE, 0x3b73, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_INFO", _IOC_NONE, 0x3b6b, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", _IOC_NONE, 0x3b6d, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_PCI_HOT_RESET_INFO", _IOC_NONE, 0x3b70, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", _IOC_NONE, 0x3b6c, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_IOEVENTFD", _IOC_NONE, 0x3b74, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_PCI_HOT_RESET", _IOC_NONE, 0x3b71, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_QUERY_GFX_PLANE", _IOC_NONE, 0x3b72, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_RESET", _IOC_NONE, 0x3b6f, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_SET_IRQS", _IOC_NONE, 0x3b6e, 0x00 },
{ "linux/vfio.h", "VFIO_EEH_PE_OP", _IOC_NONE, 0x3b79, 0x00 },
@ -2360,7 +2400,6 @@
{ "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 },
{ "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 },
{ "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 },
{ "linux/wmi.h", "DELL_WMI_SMBIOS_CMD", _IOC_READ|_IOC_WRITE, 0x5700, 0x34 },
{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 },
{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 },
{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 },
@ -2378,11 +2417,6 @@
{ "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 },
{ "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 },
{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 },
{ "misc/ocxl.h", "OCXL_IOCTL_ATTACH", _IOC_WRITE, 0xca10, 0x20 },
{ "misc/ocxl.h", "OCXL_IOCTL_GET_METADATA", _IOC_READ, 0xca14, 0x80 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_ALLOC", _IOC_READ, 0xca11, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_FREE", _IOC_WRITE, 0xca12, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_SET_FD", _IOC_WRITE, 0xca13, 0x10 },
{ "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 },
{ "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 },
{ "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 },
@ -2465,7 +2499,7 @@
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 },
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
{ "rdma/rdma_user_ioctl.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 },

View File

@ -177,20 +177,20 @@
[169] = { 2, 0, SEN(gettimeofday), "gettimeofday" },
[170] = { 2, 0, SEN(settimeofday), "settimeofday" },
[171] = { 1, 0, SEN(adjtimex), "adjtimex" },
[172] = { 0, PU|NF, SEN(getpid), "getpid" },
[173] = { 0, PU|NF, SEN(getppid), "getppid" },
[174] = { 0, PU|NF, SEN(getuid), "getuid" },
[175] = { 0, PU|NF, SEN(geteuid), "geteuid" },
[176] = { 0, PU|NF, SEN(getgid), "getgid" },
[177] = { 0, PU|NF, SEN(getegid), "getegid" },
[178] = { 0, PU|NF, SEN(gettid), "gettid" },
[172] = { 0, NF, SEN(getpid), "getpid" },
[173] = { 0, NF, SEN(getppid), "getppid" },
[174] = { 0, NF, SEN(getuid), "getuid" },
[175] = { 0, NF, SEN(geteuid), "geteuid" },
[176] = { 0, NF, SEN(getgid), "getgid" },
[177] = { 0, NF, SEN(getegid), "getegid" },
[178] = { 0, NF, SEN(gettid), "gettid" },
[179] = { 1, 0, SEN(sysinfo), "sysinfo" },
[180] = { 4, TD, SEN(mq_open), "mq_open" },
[180] = { 4, 0, SEN(mq_open), "mq_open" },
[181] = { 1, 0, SEN(mq_unlink), "mq_unlink" },
[182] = { 5, TD, SEN(mq_timedsend), "mq_timedsend" },
[183] = { 5, TD, SEN(mq_timedreceive), "mq_timedreceive" },
[184] = { 2, TD, SEN(mq_notify), "mq_notify" },
[185] = { 3, TD, SEN(mq_getsetattr), "mq_getsetattr" },
[182] = { 5, 0, SEN(mq_timedsend), "mq_timedsend" },
[183] = { 5, 0, SEN(mq_timedreceive), "mq_timedreceive" },
[184] = { 2, 0, SEN(mq_notify), "mq_notify" },
[185] = { 3, 0, SEN(mq_getsetattr), "mq_getsetattr" },
[186] = { 2, TI, SEN(msgget), "msgget" },
[187] = { 3, TI, SEN(msgctl), "msgctl" },
[188] = { 5, TI, SEN(msgrcv), "msgrcv" },
@ -282,7 +282,6 @@
[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
[290] = { 1, 0, SEN(pkey_free), "pkey_free" },
[291] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
[292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" },
#undef sys_ARCH_mmap
#undef ARCH_WANT_SYNC_FILE_RANGE2

View File

@ -85,7 +85,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE", _IOC_READ|_IOC_WRITE, 0x6454, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x120 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 },
@ -94,7 +93,6 @@
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_SCHED", _IOC_WRITE, 0x6455, 0x10 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_VM", _IOC_READ|_IOC_WRITE, 0x6453, 0x08 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
@ -113,8 +111,6 @@
{ "drm/drm.h", "DRM_IOCTL_AUTH_MAGIC", _IOC_WRITE, 0x6411, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_BLOCK", _IOC_READ|_IOC_WRITE, 0x6412, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_CONTROL", _IOC_WRITE, 0x6414, 0x08 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_GET_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643b, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_CRTC_QUEUE_SEQUENCE", _IOC_READ|_IOC_WRITE, 0x643c, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_DMA", _IOC_READ|_IOC_WRITE, 0x6429, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_DROP_MASTER", _IOC_NONE, 0x641f, 0x00 },
{ "drm/drm.h", "DRM_IOCTL_FINISH", _IOC_WRITE, 0x642c, 0x08 },
@ -142,7 +138,6 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c6, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c },
{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 },
{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 },
@ -159,13 +154,10 @@
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64ac, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64aa, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GETRESOURCES", _IOC_READ|_IOC_WRITE, 0x64a0, 0x40 },
{ "drm/drm.h", "DRM_IOCTL_MODE_GET_LEASE", _IOC_READ|_IOC_WRITE, 0x64c8, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_LIST_LESSEES", _IOC_READ|_IOC_WRITE, 0x64c7, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_MAP_DUMB", _IOC_READ|_IOC_WRITE, 0x64b3, 0x10 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_GETPROPERTIES", _IOC_READ|_IOC_WRITE, 0x64b9, 0x20 },
{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ba, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_PAGE_FLIP", _IOC_READ|_IOC_WRITE, 0x64b0, 0x18 },
{ "drm/drm.h", "DRM_IOCTL_MODE_REVOKE_LEASE", _IOC_READ|_IOC_WRITE, 0x64c9, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_RMFB", _IOC_READ|_IOC_WRITE, 0x64af, 0x04 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETCRTC", _IOC_READ|_IOC_WRITE, 0x64a2, 0x68 },
{ "drm/drm.h", "DRM_IOCTL_MODE_SETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a5, 0x20 },
@ -203,12 +195,10 @@
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_DOM", _IOC_READ|_IOC_WRITE, 0x644a, 0x48 },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_PM_QUERY_SIG", _IOC_READ|_IOC_WRITE, 0x644b, 0x4c },
{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 },
@ -216,6 +206,10 @@
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6471, 0x60 },
{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_CLEAR", _IOC_WRITE, 0x6442, 0x0c },
{ "drm/i810_drm.h", "DRM_IOCTL_I810_COPY", _IOC_WRITE, 0x6447, 0x10 },
@ -283,7 +277,6 @@
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_ADD_CONFIG", _IOC_WRITE, 0x6477, 0x48 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_OPEN", _IOC_WRITE, 0x6476, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_PERF_REMOVE_CONFIG", _IOC_WRITE, 0x6478, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_QUERY", _IOC_READ|_IOC_WRITE, 0x6479, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_REG_READ", _IOC_READ|_IOC_WRITE, 0x6471, 0x10 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SETPARAM", _IOC_WRITE, 0x6447, 0x08 },
{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 },
@ -311,9 +304,7 @@
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE", _IOC_WRITE, 0x644b, 0x04 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_SUBMITQUEUE_NEW", _IOC_READ|_IOC_WRITE, 0x644a, 0x0c },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 },
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_PREP", _IOC_WRITE, 0x6482, 0x08 },
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6484, 0x28 },
@ -417,17 +408,13 @@
{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6449, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_LABEL_BO", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_CREATE", _IOC_READ|_IOC_WRITE, 0x644c, 0x18 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_DESTROY", _IOC_READ|_IOC_WRITE, 0x644d, 0x04 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_PERFMON_GET_VALUES", _IOC_READ|_IOC_WRITE, 0x644e, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6448, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
@ -619,7 +606,6 @@
{ "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 },
{ "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", _IOC_READ|_IOC_WRITE, 0x9424, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO_V2", _IOC_READ|_IOC_WRITE, 0x943b, 0x38 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", _IOC_WRITE, 0x9429, 0x18 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", _IOC_WRITE, 0x942a, 0x10 },
{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", _IOC_READ, 0x942b, 0x30 },
@ -806,14 +792,9 @@
{ "linux/dvb/ca.h", "CA_SEND_MSG", _IOC_WRITE, 0x6f85, 0x10c },
{ "linux/dvb/ca.h", "CA_SET_DESCR", _IOC_WRITE, 0x6f86, 0x10 },
{ "linux/dvb/dmx.h", "DMX_ADD_PID", _IOC_WRITE, 0x6f33, 0x02 },
{ "linux/dvb/dmx.h", "DMX_DQBUF", _IOC_READ|_IOC_WRITE, 0x6f40, 0x18 },
{ "linux/dvb/dmx.h", "DMX_EXPBUF", _IOC_READ|_IOC_WRITE, 0x6f3e, 0x0c },
{ "linux/dvb/dmx.h", "DMX_GET_PES_PIDS", _IOC_READ, 0x6f2f, 0x0a },
{ "linux/dvb/dmx.h", "DMX_GET_STC", _IOC_READ|_IOC_WRITE, 0x6f32, 0x10 },
{ "linux/dvb/dmx.h", "DMX_QBUF", _IOC_READ|_IOC_WRITE, 0x6f3f, 0x18 },
{ "linux/dvb/dmx.h", "DMX_QUERYBUF", _IOC_READ|_IOC_WRITE, 0x6f3d, 0x18 },
{ "linux/dvb/dmx.h", "DMX_REMOVE_PID", _IOC_WRITE, 0x6f34, 0x02 },
{ "linux/dvb/dmx.h", "DMX_REQBUFS", _IOC_READ|_IOC_WRITE, 0x6f3c, 0x08 },
{ "linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", _IOC_NONE, 0x6f2d, 0x00 },
{ "linux/dvb/dmx.h", "DMX_SET_FILTER", _IOC_WRITE, 0x6f2b, 0x3c },
{ "linux/dvb/dmx.h", "DMX_SET_PES_FILTER", _IOC_WRITE, 0x6f2c, 0x14 },
@ -1147,7 +1128,6 @@
{ "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 },
{ "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 },
{ "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 },
{ "linux/if_tun.h", "TUNSETFILTEREBPF", _IOC_READ, 0x54e1, 0x04 },
{ "linux/if_tun.h", "TUNSETGROUP", _IOC_WRITE, 0x54ce, 0x04 },
{ "linux/if_tun.h", "TUNSETIFF", _IOC_WRITE, 0x54ca, 0x04 },
{ "linux/if_tun.h", "TUNSETIFINDEX", _IOC_WRITE, 0x54da, 0x04 },
@ -1158,13 +1138,11 @@
{ "linux/if_tun.h", "TUNSETPERSIST", _IOC_WRITE, 0x54cb, 0x04 },
{ "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 },
{ "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 },
{ "linux/if_tun.h", "TUNSETSTEERINGEBPF", _IOC_READ, 0x54e0, 0x04 },
{ "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 },
{ "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 },
{ "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 },
{ "linux/inotify.h", "INOTIFY_IOC_SETNEXTWD", _IOC_WRITE, 0x4900, 0x04 },
{ "linux/input.h", "EVIOCGEFFECTS", _IOC_READ, 0x4584, 0x04 },
{ "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 },
{ "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 },
@ -1202,9 +1180,6 @@
{ "linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", _IOC_READ, 0x6916, 0x08 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", _IOC_READ, 0x690f, 0x02 },
{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691d, 0x0c },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_CLEAR_SMS_ATN", _IOC_NONE, 0xb101, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_FORCE_ABORT", _IOC_NONE, 0xb102, 0x00 },
{ "linux/ipmi_bmc.h", "IPMI_BMC_IOCTL_SET_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
{ "linux/isdn.h", "IIOCDBGVAR", _IOC_NONE, 0x497f, 0x00 },
{ "linux/isdn.h", "IIOCDRVCTL", _IOC_NONE, 0x4980, 0x00 },
{ "linux/isdn.h", "IIOCGETCPS", _IOC_NONE, 0x4915, 0x00 },
@ -1246,6 +1221,48 @@
{ "linux/ivtv.h", "IVTV_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x40 },
{ "linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", _IOC_WRITE, 0x56c1, 0x04 },
{ "linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x18 },
{ "linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", _IOC_NONE, 0x71cd, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_AEC_START", _IOC_WRITE, 0x71cb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_AEC_STOP", _IOC_NONE, 0x71cc, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_CARDTYPE", _IOC_READ, 0x71c1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_CID", _IOC_READ, 0x71d4, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_CIDCW", _IOC_WRITE, 0x71d9, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_DAA_AGAIN", _IOC_WRITE, 0x71d2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", _IOC_WRITE, 0x71d0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", _IOC_NONE, 0x71e7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", _IOC_READ, 0x71e6, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_DSP_IDLE", _IOC_NONE, 0x71c5, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_RESET", _IOC_NONE, 0x71c0, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_DSP_TYPE", _IOC_READ, 0x71c3, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DSP_VERSION", _IOC_READ, 0x71c4, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", _IOC_WRITE, 0x71e8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", _IOC_WRITE, 0x71d6, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_READ", _IOC_READ, 0x71e2, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", _IOC_READ, 0x71e3, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", _IOC_WRITE, 0x71c8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_HZ", _IOC_WRITE, 0x71e0, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INIT_TONE", _IOC_WRITE, 0x71c9, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_START", _IOC_WRITE, 0x71fd, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", _IOC_WRITE, 0x71fe, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_MIXER", _IOC_WRITE, 0x71cf, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PLAY_CID", _IOC_NONE, 0x71d7, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_PORT", _IOC_WRITE, 0x71d1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_POTS_PSTN", _IOC_WRITE, 0x71d5, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", _IOC_NONE, 0x71d3, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_RATE", _IOC_WRITE, 0x71e1, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_READ_WAIT", _IOC_READ, 0x71e4, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_SC_RXG", _IOC_WRITE, 0x71ea, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SC_TXG", _IOC_WRITE, 0x71eb, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SERIAL", _IOC_READ, 0x71c2, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER", _IOC_WRITE, 0x71c7, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", _IOC_WRITE, 0x71dd, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_SET_LED", _IOC_WRITE, 0x71ce, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_SIGCTL", _IOC_WRITE, 0x71e9, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_TESTRAM", _IOC_NONE, 0x71c6, 0x00 },
{ "linux/ixjuser.h", "IXJCTL_TONE_CADENCE", _IOC_WRITE, 0x71ca, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_VERSION", _IOC_READ, 0x71da, 0x08 },
{ "linux/ixjuser.h", "IXJCTL_VMWI", _IOC_READ, 0x71d8, 0x04 },
{ "linux/ixjuser.h", "IXJCTL_WRITE_WAIT", _IOC_READ, 0x71e5, 0x08 },
{ "linux/joystick.h", "JSIOCGAXES", _IOC_READ, 0x6a11, 0x01 },
{ "linux/joystick.h", "JSIOCGAXMAP", _IOC_READ, 0x6a32, 0x40 },
{ "linux/joystick.h", "JSIOCGBTNMAP", _IOC_READ, 0x6a34, 0x400 },
@ -1304,8 +1321,6 @@
{ "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 },
{ "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 },
{ "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ACQUIRE_VM", _IOC_WRITE, 0x4b15, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_ALLOC_MEMORY_OF_GPU", _IOC_READ|_IOC_WRITE, 0x4b16, 0x28 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 },
@ -1314,19 +1329,14 @@
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_FREE_MEMORY_OF_GPU", _IOC_WRITE, 0x4b17, 0x08 },
{ "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_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 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_SCRATCH_BACKING_VA", _IOC_READ|_IOC_WRITE, 0x4b11, 0x10 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_TRAP_HANDLER", _IOC_WRITE, 0x4b13, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UNMAP_MEMORY_FROM_GPU", _IOC_READ|_IOC_WRITE, 0x4b19, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
{ "linux/lightnvm.h", "NVME_NVM_IOCTL_ADMIN_VIO", _IOC_READ|_IOC_WRITE, 0x4c41, 0x50 },
@ -1369,7 +1379,6 @@
{ "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 },
{ "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 },
{ "linux/lp.h", "LPSETTIMEOUT_NEW", _IOC_WRITE, 0x060f, 0x10 },
{ "linux/mISDNif.h", "IMADDTIMER", _IOC_READ, 0x4940, 0x04 },
{ "linux/mISDNif.h", "IMCLEAR_L2", _IOC_READ, 0x4946, 0x04 },
{ "linux/mISDNif.h", "IMCTRLREQ", _IOC_READ, 0x4945, 0x04 },
@ -1458,6 +1467,8 @@
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 },
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
@ -1524,10 +1535,8 @@
{ "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_MODIFY_ATTRIBUTES", _IOC_WRITE, 0x240b, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PAUSE_OUTPUT", _IOC_WRITE, 0x2409, 0x04 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_QUERY_BPF", _IOC_READ|_IOC_WRITE, 0x240a, 0x08 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 },
{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 },
@ -1615,7 +1624,6 @@
{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 },
{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 },
{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 },
{ "linux/psp-sev.h", "SEV_ISSUE_CMD", _IOC_READ|_IOC_WRITE, 0x5300, 0x10 },
{ "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 },
{ "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 },
{ "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 },
@ -1653,7 +1661,6 @@
{ "linux/random.h", "RNDCLEARPOOL", _IOC_NONE, 0x5206, 0x00 },
{ "linux/random.h", "RNDGETENTCNT", _IOC_READ, 0x5200, 0x04 },
{ "linux/random.h", "RNDGETPOOL", _IOC_READ, 0x5202, 0x08 },
{ "linux/random.h", "RNDRESEEDCRNG", _IOC_NONE, 0x5207, 0x00 },
{ "linux/random.h", "RNDZAPENTCNT", _IOC_NONE, 0x5204, 0x00 },
{ "linux/raw.h", "RAW_GETBIND", _IOC_NONE, 0xac01, 0x00 },
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
@ -1992,10 +1999,56 @@
{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
{ "linux/tee.h", "TEE_IOC_SHM_REGISTER", _IOC_READ|_IOC_WRITE, 0xa409, 0x18 },
{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
{ "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
{ "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_CHECK", _IOC_WRITE, 0x7182, 0x08 },
{ "linux/telephony.h", "PHONE_CAPABILITIES_LIST", _IOC_READ, 0x7181, 0x08 },
{ "linux/telephony.h", "PHONE_CPT_STOP", _IOC_NONE, 0x71a4, 0x00 },
{ "linux/telephony.h", "PHONE_DIALTONE", _IOC_NONE, 0x71a3, 0x00 },
{ "linux/telephony.h", "PHONE_DTMF_OOB", _IOC_WRITE, 0x7199, 0x04 },
{ "linux/telephony.h", "PHONE_DTMF_READY", _IOC_READ, 0x7196, 0x04 },
{ "linux/telephony.h", "PHONE_EXCEPTION", _IOC_READ, 0x719a, 0x04 },
{ "linux/telephony.h", "PHONE_FRAME", _IOC_WRITE, 0x718d, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF", _IOC_READ, 0x7197, 0x04 },
{ "linux/telephony.h", "PHONE_GET_DTMF_ASCII", _IOC_READ, 0x7198, 0x04 },
{ "linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", _IOC_NONE, 0x719f, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_ON_TIME", _IOC_NONE, 0x719e, 0x00 },
{ "linux/telephony.h", "PHONE_GET_TONE_STATE", _IOC_NONE, 0x71a0, 0x00 },
{ "linux/telephony.h", "PHONE_HOOKSTATE", _IOC_NONE, 0x7184, 0x00 },
{ "linux/telephony.h", "PHONE_MAXRINGS", _IOC_WRITE, 0x7185, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_CODEC", _IOC_WRITE, 0x7190, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_DEPTH", _IOC_WRITE, 0x7193, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_LEVEL", _IOC_NONE, 0x7195, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_START", _IOC_NONE, 0x7191, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_STOP", _IOC_NONE, 0x7192, 0x00 },
{ "linux/telephony.h", "PHONE_PLAY_TONE", _IOC_WRITE, 0x719b, 0x01 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME", _IOC_WRITE, 0x7194, 0x04 },
{ "linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", _IOC_WRITE, 0x71dc, 0x04 },
{ "linux/telephony.h", "PHONE_PSTN_GET_STATE", _IOC_NONE, 0x71a5, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_LINETEST", _IOC_NONE, 0x71a8, 0x00 },
{ "linux/telephony.h", "PHONE_PSTN_SET_STATE", _IOC_WRITE, 0x71a4, 0x04 },
{ "linux/telephony.h", "PHONE_QUERY_CODEC", _IOC_READ|_IOC_WRITE, 0x71a7, 0x08 },
{ "linux/telephony.h", "PHONE_REC_CODEC", _IOC_WRITE, 0x7189, 0x04 },
{ "linux/telephony.h", "PHONE_REC_DEPTH", _IOC_WRITE, 0x718c, 0x04 },
{ "linux/telephony.h", "PHONE_REC_LEVEL", _IOC_NONE, 0x718f, 0x00 },
{ "linux/telephony.h", "PHONE_REC_START", _IOC_NONE, 0x718a, 0x00 },
{ "linux/telephony.h", "PHONE_REC_STOP", _IOC_NONE, 0x718b, 0x00 },
{ "linux/telephony.h", "PHONE_REC_VOLUME", _IOC_WRITE, 0x718e, 0x04 },
{ "linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", _IOC_WRITE, 0x71db, 0x04 },
{ "linux/telephony.h", "PHONE_RING", _IOC_NONE, 0x7183, 0x00 },
{ "linux/telephony.h", "PHONE_RINGBACK", _IOC_NONE, 0x71a2, 0x00 },
{ "linux/telephony.h", "PHONE_RING_CADENCE", _IOC_WRITE, 0x7186, 0x02 },
{ "linux/telephony.h", "PHONE_RING_START", _IOC_WRITE, 0x7187, 0x08 },
{ "linux/telephony.h", "PHONE_RING_STOP", _IOC_NONE, 0x7188, 0x00 },
{ "linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", _IOC_WRITE, 0x719d, 0x04 },
{ "linux/telephony.h", "PHONE_SET_TONE_ON_TIME", _IOC_WRITE, 0x719c, 0x04 },
{ "linux/telephony.h", "PHONE_VAD", _IOC_WRITE, 0x71a9, 0x04 },
{ "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 },
{ "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 },
{ "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 },
{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 },
{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 },
@ -2110,25 +2163,12 @@
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0x58 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5616, 0x30 },
{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x563e, 0x40 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_FILTER_MASK", _IOC_READ|_IOC_WRITE, 0x560c, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHANGE_GUEST_CAPABILITIES", _IOC_READ|_IOC_WRITE, 0x560e, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_CHECK_BALLOON", _IOC_READ|_IOC_WRITE, 0x5611, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_DRIVER_VERSION_INFO", _IOC_READ|_IOC_WRITE, 0x5600, 0x2c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_CONNECT", _IOC_READ|_IOC_WRITE, 0x5604, 0x9c },
{ "linux/vboxguest.h", "VBG_IOCTL_HGCM_DISCONNECT", _IOC_READ|_IOC_WRITE, 0x5605, 0x1c },
{ "linux/vboxguest.h", "VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560b, 0x18 },
{ "linux/vboxguest.h", "VBG_IOCTL_VMMDEV_REQUEST_BIG", _IOC_READ|_IOC_WRITE, 0x5603, 0x00 },
{ "linux/vboxguest.h", "VBG_IOCTL_WAIT_FOR_EVENTS", _IOC_READ|_IOC_WRITE, 0x560a, 0x20 },
{ "linux/vboxguest.h", "VBG_IOCTL_WRITE_CORE_DUMP", _IOC_READ|_IOC_WRITE, 0x5613, 0x1c },
{ "linux/vfio.h", "VFIO_CHECK_EXTENSION", _IOC_NONE, 0x3b65, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_GFX_DMABUF", _IOC_NONE, 0x3b73, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_INFO", _IOC_NONE, 0x3b6b, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", _IOC_NONE, 0x3b6d, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_PCI_HOT_RESET_INFO", _IOC_NONE, 0x3b70, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", _IOC_NONE, 0x3b6c, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_IOEVENTFD", _IOC_NONE, 0x3b74, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_PCI_HOT_RESET", _IOC_NONE, 0x3b71, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_QUERY_GFX_PLANE", _IOC_NONE, 0x3b72, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_RESET", _IOC_NONE, 0x3b6f, 0x00 },
{ "linux/vfio.h", "VFIO_DEVICE_SET_IRQS", _IOC_NONE, 0x3b6e, 0x00 },
{ "linux/vfio.h", "VFIO_EEH_PE_OP", _IOC_NONE, 0x3b79, 0x00 },
@ -2360,7 +2400,6 @@
{ "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 },
{ "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 },
{ "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 },
{ "linux/wmi.h", "DELL_WMI_SMBIOS_CMD", _IOC_READ|_IOC_WRITE, 0x5700, 0x34 },
{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 },
{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 },
{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 },
@ -2378,11 +2417,6 @@
{ "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 },
{ "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 },
{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 },
{ "misc/ocxl.h", "OCXL_IOCTL_ATTACH", _IOC_WRITE, 0xca10, 0x20 },
{ "misc/ocxl.h", "OCXL_IOCTL_GET_METADATA", _IOC_READ, 0xca14, 0x80 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_ALLOC", _IOC_READ, 0xca11, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_FREE", _IOC_WRITE, 0xca12, 0x08 },
{ "misc/ocxl.h", "OCXL_IOCTL_IRQ_SET_FD", _IOC_WRITE, 0xca13, 0x10 },
{ "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 },
{ "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 },
{ "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 },
@ -2465,7 +2499,7 @@
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 },
{ "rdma/rdma_user_ioctl.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 },
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
{ "rdma/rdma_user_ioctl.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 },
{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 },

View File

@ -170,20 +170,20 @@
[169] = { 2, 0, SEN(gettimeofday), "gettimeofday" },
[170] = { 2, 0, SEN(settimeofday), "settimeofday" },
[171] = { 1, 0, SEN(adjtimex), "adjtimex" },
[172] = { 0, PU|NF, SEN(getpid), "getpid" },
[173] = { 0, PU|NF, SEN(getppid), "getppid" },
[174] = { 0, PU|NF, SEN(getuid), "getuid" },
[175] = { 0, PU|NF, SEN(geteuid), "geteuid" },
[176] = { 0, PU|NF, SEN(getgid), "getgid" },
[177] = { 0, PU|NF, SEN(getegid), "getegid" },
[178] = { 0, PU|NF, SEN(gettid), "gettid" },
[172] = { 0, NF, SEN(getpid), "getpid" },
[173] = { 0, NF, SEN(getppid), "getppid" },
[174] = { 0, NF, SEN(getuid), "getuid" },
[175] = { 0, NF, SEN(geteuid), "geteuid" },
[176] = { 0, NF, SEN(getgid), "getgid" },
[177] = { 0, NF, SEN(getegid), "getegid" },
[178] = { 0, NF, SEN(gettid), "gettid" },
[179] = { 1, 0, SEN(sysinfo), "sysinfo" },
[180] = { 4, TD, SEN(mq_open), "mq_open" },
[180] = { 4, 0, SEN(mq_open), "mq_open" },
[181] = { 1, 0, SEN(mq_unlink), "mq_unlink" },
[182] = { 5, TD, SEN(mq_timedsend), "mq_timedsend" },
[183] = { 5, TD, SEN(mq_timedreceive), "mq_timedreceive" },
[184] = { 2, TD, SEN(mq_notify), "mq_notify" },
[185] = { 3, TD, SEN(mq_getsetattr), "mq_getsetattr" },
[182] = { 5, 0, SEN(mq_timedsend), "mq_timedsend" },
[183] = { 5, 0, SEN(mq_timedreceive), "mq_timedreceive" },
[184] = { 2, 0, SEN(mq_notify), "mq_notify" },
[185] = { 3, 0, SEN(mq_getsetattr), "mq_getsetattr" },
[186] = { 2, TI, SEN(msgget), "msgget" },
[187] = { 3, TI, SEN(msgctl), "msgctl" },
[188] = { 5, TI, SEN(msgrcv), "msgrcv" },
@ -275,4 +275,3 @@
[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
[290] = { 1, 0, SEN(pkey_free), "pkey_free" },
[291] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
[292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" },

View File

@ -1,4 +0,0 @@
#define HAVE_ARCH_OLD_MMAP 1
#define HAVE_ARCH_OLD_SELECT 1
#define HAVE_ARCH_UID16_SYSCALLS 1
#define SUPPORTED_PERSONALITIES 2

View File

@ -36,6 +36,3 @@ static struct iovec aarch64_io = {
#define ARCH_REGS_FOR_GETREGSET arm_regs_union
#define ARCH_IOVEC_FOR_GETREGSET aarch64_io
#define ARCH_PC_REG ((aarch64_io.iov_len == sizeof(arm_regs)) ? arm_regs.ARM_pc : aarch64_regs.pc)
#define ARCH_PERSONALITY_0_IOV_SIZE sizeof(aarch64_regs)
#define ARCH_PERSONALITY_1_IOV_SIZE sizeof(arm_regs)

View File

@ -0,0 +1,2 @@
/* ARM personality */
#include "errnoent.h"

View File

@ -8,11 +8,14 @@ arch_get_scno(struct tcb *tcp)
case sizeof(aarch64_regs):
/* We are in 64-bit mode */
scno = aarch64_regs.regs[8];
update_personality(tcp, 0);
break;
case sizeof(arm_regs):
/* We are in 32-bit mode */
/* Note: we don't support OABI, unlike 32-bit ARM build */
scno = arm_regs.ARM_r7;
scno = shuffle_scno(scno);
update_personality(tcp, 1);
break;
}

View File

@ -1,72 +1 @@
/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */
{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 },
{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 },
{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 },
{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 },
{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 },
{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 },
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 },
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 },
{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 },
{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c },
{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 },
{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 },
{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 },
{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 },
{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 },
{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 },
{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 },
{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 },
{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 },
{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 },
{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 },
{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 },
{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 },
{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x00 },
{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 },
{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 },
{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 },
{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 },
{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x360 },
{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 },
{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x00 },
{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 },
{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 },
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 },
{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 },
{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 },
{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 },
{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 },
{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 },
{ "linux/kvm.h", "KVM_MEMORY_ENCRYPT_OP", _IOC_READ|_IOC_WRITE, 0xaeba, 0x08 },
{ "linux/kvm.h", "KVM_MEMORY_ENCRYPT_REG_REGION", _IOC_READ, 0xaebb, 0x10 },
{ "linux/kvm.h", "KVM_MEMORY_ENCRYPT_UNREG_REGION", _IOC_READ, 0xaebc, 0x10 },
{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 },
{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 },
{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 },
{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 },
{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 },
{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 },
{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 },
{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x00 },
{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 },
{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x208 },
{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 },
{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 },
{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 },
{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 },
{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 },
{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 },
{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x360 },
{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 },
{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x00 },
{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 },
{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 },
{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 },
{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 },
{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 },
{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 },
{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 },
{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 },
{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 },

View File

@ -1 +0,0 @@
#include "../arm/nr_prefix.c"

View File

@ -1,49 +0,0 @@
/*
* Raw syscalls.
*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STRACE_RAW_SYSCALL_H
#define STRACE_RAW_SYSCALL_H
# include "kernel_types.h"
static inline kernel_ulong_t
raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
{
*err = 0;
register kernel_ulong_t x8 __asm__("x8") = nr;
register kernel_ulong_t x0 __asm__("x0");
__asm__ __volatile__("svc 0"
: "=r"(x0)
: "r"(x8)
: "memory");
return x0;
}
# define raw_syscall_0 raw_syscall_0
#endif /* !STRACE_RAW_SYSCALL_H */

View File

@ -1,12 +0,0 @@
#define shuffle_scno arm_shuffle_scno
#include "../arm/shuffle_scno.c"
#undef shuffle_scno
kernel_ulong_t
shuffle_scno(kernel_ulong_t scno)
{
if (current_personality == 1)
return arm_shuffle_scno(scno);
return scno;
}

View File

@ -0,0 +1 @@
#include "signalent.h"

View File

@ -49,7 +49,7 @@
[1057] = { 3, TD, SEN(lseek), "lseek" },
[1058] = { 6, TD|TM|SI, SEN(mmap), "mmap" },
[1059] = { 1, 0, SEN(alarm), "alarm" },
[1060] = { 0, PU|NF, SEN(getpgrp), "getpgrp" },
[1060] = { 0, 0, SEN(getpgrp), "getpgrp" },
[1061] = { 0, TS, SEN(pause), "pause" },
[1062] = { 1, 0, SEN(time), "time" },
[1063] = { 2, TF, SEN(utime), "utime" },

View File

@ -1,2 +0,0 @@
#define HAVE_ARCH_GETRVAL2 1
#define HAVE_ARCH_DEDICATED_ERR_REG 1

View File

@ -2,7 +2,7 @@ long
getrval2(struct tcb *tcp)
{
unsigned long r20;
if (upeek(tcp, 20, &r20) < 0)
if (upeek(tcp->pid, 20, &r20) < 0)
return -1;
return r20;
}

View File

@ -29,5 +29,5 @@ FUNC_GET_RT_SIGFRAME_ADDR
{
unsigned long addr;
return upeek(tcp, REG_FP, &addr) ? 0 : addr;
return upeek(tcp->pid, REG_FP, &addr) ? 0 : addr;
}

View File

@ -3,7 +3,7 @@ arch_sigreturn(struct tcb *tcp)
{
unsigned long addr;
if (upeek(tcp, REG_FP, &addr) < 0)
if (upeek(tcp->pid, REG_FP, &addr) < 0)
return;
addr += offsetof(struct sigcontext, sc_mask);

View File

@ -146,4 +146,3 @@
[527] = "EBADTYPE",
[528] = "EJUKEBOX",
[529] = "EIOCBQUEUED",
[530] = "ERECALLCONFLICT",

View File

@ -4,9 +4,9 @@ arch_get_scno(struct tcb *tcp)
{
kernel_ulong_t scno = 0;
if (upeek(tcp, REG_A3, &alpha_a3) < 0)
if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0)
return -1;
if (upeek(tcp, REG_R0, &scno) < 0)
if (upeek(tcp->pid, REG_R0, &scno) < 0)
return -1;
/*

View File

@ -5,7 +5,7 @@ get_syscall_args(struct tcb *tcp)
unsigned int i;
for (i = 0; i < tcp->s_ent->nargs; ++i)
if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
if (upeek(tcp->pid, REG_A0+i, &tcp->u_arg[i]) < 0)
return -1;
return 1;
}

View File

@ -1,6 +1,6 @@
static int
get_syscall_result_regs(struct tcb *tcp)
{
return (upeek(tcp, REG_A3, &alpha_a3) < 0 ||
upeek(tcp, REG_R0, &alpha_r0) < 0) ? -1 : 0;
return (upeek(tcp->pid, REG_A3, &alpha_a3) < 0 ||
upeek(tcp->pid, REG_R0, &alpha_r0) < 0) ? -1 : 0;
}

View File

@ -1,51 +0,0 @@
/*
* Raw syscalls.
*
* Copyright (c) 2018 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STRACE_RAW_SYSCALL_H
#define STRACE_RAW_SYSCALL_H
# include "kernel_types.h"
static inline kernel_ulong_t
raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
{
kernel_ulong_t sc_0 = nr;
register kernel_ulong_t sc_19 __asm__("$19");
__asm__ __volatile__("callsys"
: "+v"(sc_0), "=r"(sc_19)
:
: "memory", "$1", "$2", "$3", "$4", "$5", "$6",
"$7", "$8", "$16", "$17", "$18", "$20", "$21",
"$22", "$23", "$24", "$25", "$27", "$28");
*err = sc_19;
return sc_0;
}
# define raw_syscall_0 raw_syscall_0
#endif /* !STRACE_RAW_SYSCALL_H */

View File

@ -1,13 +1,13 @@
static int
arch_set_error(struct tcb *tcp)
{
return upoke(tcp, REG_A3, (alpha_a3 = 1))
|| upoke(tcp, REG_R0, (alpha_r0 = tcp->u_error));
alpha_r0 = tcp->u_error;
return upoke(tcp->pid, REG_R0, alpha_r0);
}
static int
arch_set_success(struct tcb *tcp)
{
return upoke(tcp, REG_A3, (alpha_a3 = 0))
|| upoke(tcp, REG_R0, (alpha_r0 = tcp->u_rval));
return upoke(tcp->pid, REG_A3, (alpha_a3 = 0))
|| upoke(tcp->pid, REG_R0, (alpha_r0 = tcp->u_rval));
}

View File

@ -1,5 +1,5 @@
static int
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
return upoke(tcp, REG_R0, scno);
return upoke(tcp->pid, REG_R0, scno);
}

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