Compare commits
366 Commits
Author | SHA1 | Date | |
---|---|---|---|
9a7661cc62 | |||
2b6e074846 | |||
3afef04492 | |||
f52ff7d49c | |||
6ef3718d6b | |||
451c269e80 | |||
dea01d8d83 | |||
2cc81216cb | |||
8f996fc157 | |||
6527c044f3 | |||
b27397a7d2 | |||
bff4578491 | |||
be8985d455 | |||
380d205bb8 | |||
3fedf07869 | |||
4a329a0677 | |||
883617d8b7 | |||
7e0c7e0e88 | |||
525f70debe | |||
d2aa5046e9 | |||
418625eaaa | |||
b178553f22 | |||
49d030ab8a | |||
193e5f6aff | |||
deeb2d42ae | |||
a781b2659f | |||
b870441f58 | |||
9e85a344d7 | |||
58c47fe58a | |||
36b44f9380 | |||
b6fec72d5e | |||
e3e4a524a1 | |||
762ee767f0 | |||
4f652c1ec4 | |||
6229d93cb2 | |||
ce3bddf6c4 | |||
e62b6a5e92 | |||
4eab3a43fd | |||
1e6d5a84b8 | |||
c95426f6ae | |||
7503a0f9e4 | |||
97eb4367e4 | |||
c0827b1ae9 | |||
6d98338f09 | |||
f29c4f1319 | |||
fd0cd658cc | |||
79a02d029c | |||
bdc6ca9e56 | |||
dbc5d26b29 | |||
88d6b7287c | |||
f7c6046026 | |||
41bfa3bf5f | |||
3a7d7d8f8c | |||
9fd42fc53a | |||
27850e48f3 | |||
e390ab2427 | |||
7d0396345d | |||
fd3aa07209 | |||
56f3d28453 | |||
93ef3d32ab | |||
ebdc322480 | |||
05813058ed | |||
ec27280cf3 | |||
712fd66dfb | |||
bcac74438d | |||
d4b2f1c4b6 | |||
401818ec3f | |||
c0c2117be0 | |||
0773735c9d | |||
5c84cf7ddb | |||
45049d4a4d | |||
5c481739d7 | |||
514a667cc3 | |||
08b2c1b82d | |||
dbbe61067c | |||
d476d264de | |||
b6542c5068 | |||
419da8e231 | |||
9c7052f403 | |||
3160ea8999 | |||
da78779d37 | |||
245df3c44b | |||
6c3f75ecfa | |||
01f39a8001 | |||
4646db8e4d | |||
607f2b5e58 | |||
4a4c3aa762 | |||
004742588e | |||
bf15325cd6 | |||
540d70fcb6 | |||
10adc310cb | |||
30fe991db8 | |||
eb2c0b8bdf | |||
d54388e1ce | |||
143d007bbd | |||
ca84856654 | |||
87faa97539 | |||
fa054ebf9b | |||
b6cb4866e2 | |||
ccde0129ea | |||
9228e78d4f | |||
dae6367f18 | |||
ee96027445 | |||
c3b04cdf6e | |||
d8dfba18be | |||
bd19a4d271 | |||
7adb5a2f9e | |||
d5c63293c1 | |||
e1d94ea918 | |||
970eacfcdb | |||
5cf62f3e7a | |||
be0d6a847b | |||
42c9ff9cfe | |||
22aa768c1d | |||
4105c9fb5d | |||
798fef882a | |||
07a4f1954a | |||
597bfc6e1f | |||
d809cd9639 | |||
e73a3cdb45 | |||
c1ed4aa030 | |||
03b50140c7 | |||
9b2605de2d | |||
0f1cf622ba | |||
4245bdfe41 | |||
ddf97dcf74 | |||
8aa2908a4d | |||
acd3d3e992 | |||
7ff51ab3d8 | |||
a112d4a0fd | |||
df9ddd8632 | |||
0a5cc72a62 | |||
e453f28934 | |||
4531bae51a | |||
48af7b3c25 | |||
fbfe5335e5 | |||
25efe1822a | |||
3869880887 | |||
947627ed15 | |||
095f97cab5 | |||
c6143f3e41 | |||
0b578fd0ba | |||
11eb621896 | |||
bca93b2a18 | |||
299fa3fcac | |||
871a9107df | |||
b532e92c6e | |||
2604ea997b | |||
a94e301a9f | |||
d29f44fd49 | |||
cb3a15fe21 | |||
dbaa7ae9b4 | |||
4e0c0becf9 | |||
0c75ebaad0 | |||
3ab43e0228 | |||
c89c8faa63 | |||
dc7901f5c3 | |||
2d82c2c50a | |||
0e72230ef3 | |||
9da6cfcc46 | |||
17dbd04e65 | |||
6e0abf45e4 | |||
27f2d621ee | |||
4e4ac87b03 | |||
95ce60d1da | |||
346e8002b0 | |||
afc49df0b0 | |||
3f59353ab3 | |||
22f04a6c69 | |||
4fb8970101 | |||
fe6e9eaa99 | |||
a228405a08 | |||
b537ddc752 | |||
0f001dee00 | |||
701ae0b878 | |||
1e436b309e | |||
4784564caf | |||
fb3d571696 | |||
1b22898d37 | |||
8783de909c | |||
c802a67751 | |||
3f7d3fcfc9 | |||
e77cec74e0 | |||
5b4317dcc8 | |||
3435de54af | |||
034b10936c | |||
5ece159986 | |||
8085045d17 | |||
70fc6a4dfd | |||
93ffdbe75c | |||
79b15b57df | |||
429d45bcab | |||
e1f99483eb | |||
01a4fcd466 | |||
e428788fe1 | |||
c02090b49b | |||
952059fc69 | |||
c483165463 | |||
5924b08b48 | |||
26f83f30b9 | |||
8669e0c142 | |||
46c9a20614 | |||
77fef8df57 | |||
02114f254c | |||
616fa24122 | |||
93dbeb50ca | |||
3fd36c5f6a | |||
379ad5a1b0 | |||
4bc986fc23 | |||
c0cf981ec8 | |||
79377eeaaf | |||
ab68755e74 | |||
afc00b1807 | |||
5f43328a74 | |||
52c5d58e04 | |||
822a70b3ec | |||
5c01869ce7 | |||
083bc9d5b2 | |||
c8115eb9cf | |||
c9ace844ba | |||
ee5d88c5b6 | |||
3a4bd6b9a7 | |||
1296f7bba1 | |||
40e3734da4 | |||
1d98b287a4 | |||
a1ecb2a51c | |||
840bb0acb5 | |||
e09c6c88aa | |||
ed16666f2f | |||
af7038665c | |||
f17f7e6305 | |||
2bae5f919c | |||
37935cca18 | |||
55d3c559e4 | |||
973687fd92 | |||
ee023f97ab | |||
f08a679a1d | |||
4eb79a767d | |||
e1499151e9 | |||
3f6e47c7cc | |||
f904486a28 | |||
bcff87c31c | |||
f12aa97aab | |||
e36c1a7476 | |||
fa8f4866a4 | |||
16b7bcdccc | |||
548ee616e1 | |||
59e5ef1fc9 | |||
703cc7ce44 | |||
a6082255ac | |||
c23a79e5b9 | |||
6dd265b961 | |||
8d5c37dbfd | |||
1f357a8f1a | |||
42f1ccc867 | |||
417ec2479d | |||
a0f071a2e6 | |||
bd9845770f | |||
96ebee2121 | |||
cc52da10c6 | |||
86bfc08a92 | |||
728e9167e2 | |||
ea61622226 | |||
25d6ed1600 | |||
89955c53a4 | |||
604af7aca4 | |||
037802b576 | |||
a3e7aca688 | |||
bbb3015054 | |||
6cf810b860 | |||
6fb0ffca75 | |||
942033a35e | |||
f900ebd9a0 | |||
ed799d5ecc | |||
69b958656e | |||
5120473370 | |||
a660a091e3 | |||
1778f71acb | |||
3f22d9abae | |||
2cc71623b9 | |||
3dbe33a872 | |||
123651345e | |||
fbb12e77d5 | |||
300a5a39f1 | |||
38c9790ed1 | |||
39530d489a | |||
eaabf55ad2 | |||
3dd9d5f34a | |||
b85a824a5e | |||
4276520135 | |||
f766447b18 | |||
b4bd031872 | |||
9f1a22244f | |||
a2b07d60d7 | |||
8d6fd581fb | |||
114a710b73 | |||
83e797d9dc | |||
2b71146c3a | |||
11df7cd070 | |||
e8f8904356 | |||
8c8321ee9e | |||
fe73383f95 | |||
941fe71851 | |||
85e7619e5b | |||
ced5b5aed4 | |||
f4118d896c | |||
321f9be806 | |||
ad7a72cd06 | |||
3cdaf39e3d | |||
aa01b5368d | |||
fc8294cbc2 | |||
2e5167cc4f | |||
ca5ca349ee | |||
4069dcb912 | |||
0635ea34a8 | |||
31ce194d23 | |||
98d3356b04 | |||
ee2c065dd4 | |||
25a5961610 | |||
b20f744662 | |||
b8ed708a54 | |||
79a79e7b9b | |||
7db513885a | |||
68869ae825 | |||
fd3f73b1f4 | |||
59819338ab | |||
2342efed27 | |||
f21f7033f9 | |||
0ae5745181 | |||
966da001af | |||
bda859a94e | |||
78be7e9d8a | |||
d451b0e283 | |||
039717c2e6 | |||
21b5ba134f | |||
e29b9270c7 | |||
1e00c76862 | |||
37db70c027 | |||
83c129f51c | |||
a465477fc7 | |||
b416f61c3e | |||
6ece6574d2 | |||
b9fcbe6112 | |||
e8c3f34edd | |||
34c7794cc1 | |||
ecf5284f7d | |||
dfd58df4a7 | |||
9165da9f68 | |||
fd4a485828 | |||
ddb5a4ba73 | |||
c78af2c9cf | |||
968a545ab7 | |||
c9694f85ed | |||
d94871775a | |||
39f61ef513 | |||
459ea39686 | |||
1aee6198c7 | |||
94ea427a31 | |||
2713444cb7 | |||
cbaa5db24d | |||
a3509bac24 | |||
958cb40a6e | |||
9574a6e231 | |||
535a07503e | |||
2dad13a0bd | |||
3154e6de55 |
@ -8,30 +8,66 @@ variables:
|
||||
SLEEP_A_BIT: "sleep 0.2"
|
||||
VERBOSE: "1"
|
||||
|
||||
gcc-x86_64:
|
||||
gcc-x86_64-libdw:
|
||||
stage: test
|
||||
script: ci/run-build-and-tests.sh
|
||||
variables:
|
||||
CC: "gcc"
|
||||
TARGET: "x86_64"
|
||||
STACKTRACE: "libdw"
|
||||
|
||||
gcc-x86:
|
||||
gcc-x86_64-libunwind:
|
||||
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
|
||||
variables:
|
||||
CC: "gcc"
|
||||
TARGET: "x86"
|
||||
STACKTRACE: "no"
|
||||
|
||||
clang-x86_64:
|
||||
clang-x86_64-libdw:
|
||||
stage: test
|
||||
script: ci/run-build-and-tests.sh
|
||||
variables:
|
||||
CC: "clang"
|
||||
TARGET: "x86_64"
|
||||
STACKTRACE: "libdw"
|
||||
|
||||
clang-x86:
|
||||
clang-x86_64-libunwind:
|
||||
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
|
||||
variables:
|
||||
CC: "clang"
|
||||
TARGET: "x86"
|
||||
STACKTRACE: "no"
|
||||
|
75
.travis.yml
75
.travis.yml
@ -21,35 +21,50 @@ matrix:
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x32
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x86
|
||||
- compiler: clang
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- compiler: musl-gcc
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- compiler: clang
|
||||
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
|
||||
- STACKTRACE=libunwind
|
||||
- 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
|
||||
|
46
Makefile.am
46
Makefile.am
@ -75,6 +75,8 @@ libstrace_a_SOURCES = \
|
||||
fstatfs64.c \
|
||||
getpagesize.c \
|
||||
ipc.c \
|
||||
mmap_cache.c \
|
||||
mmap_cache.h \
|
||||
sigreturn.c \
|
||||
socketcall.c \
|
||||
statfs.c \
|
||||
@ -128,6 +130,7 @@ strace_SOURCES = \
|
||||
evdev_mpers.c \
|
||||
eventfd.c \
|
||||
execve.c \
|
||||
f_owner_ex.h \
|
||||
fadvise.c \
|
||||
fallocate.c \
|
||||
fanotify.c \
|
||||
@ -157,6 +160,7 @@ strace_SOURCES = \
|
||||
hdio.c \
|
||||
hostname.c \
|
||||
inotify.c \
|
||||
inotify_ioctl.c \
|
||||
io.c \
|
||||
ioctl.c \
|
||||
ioperm.c \
|
||||
@ -178,6 +182,7 @@ strace_SOURCES = \
|
||||
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 \
|
||||
@ -189,8 +194,8 @@ strace_SOURCES = \
|
||||
membarrier.c \
|
||||
memfd_create.c \
|
||||
mknod.c \
|
||||
mmap_cache.c \
|
||||
mmap_cache.h \
|
||||
mmap_notify.c \
|
||||
mmap_notify.h \
|
||||
mmsghdr.c \
|
||||
mount.c \
|
||||
mpers_type.h \
|
||||
@ -204,6 +209,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 \
|
||||
@ -229,14 +236,17 @@ 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 \
|
||||
@ -349,11 +359,21 @@ 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.c unwind.h unwind-libunwind.c
|
||||
strace_SOURCES += unwind-libunwind.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)
|
||||
@ -411,7 +431,6 @@ EXTRA_DIST = \
|
||||
linux/aarch64/arch_regs.h \
|
||||
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 \
|
||||
@ -424,7 +443,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -682,7 +700,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -696,7 +713,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -705,7 +721,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -716,7 +731,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -743,7 +757,6 @@ EXTRA_DIST = \
|
||||
linux/s390x/arch_regs.h \
|
||||
linux/s390x/arch_rt_sigframe.c \
|
||||
linux/s390x/arch_sigreturn.c \
|
||||
linux/s390x/errnoent1.h \
|
||||
linux/s390x/get_error.c \
|
||||
linux/s390x/get_scno.c \
|
||||
linux/s390x/get_syscall_args.c \
|
||||
@ -755,7 +768,6 @@ EXTRA_DIST = \
|
||||
linux/s390x/rt_sigframe.h \
|
||||
linux/s390x/set_error.c \
|
||||
linux/s390x/set_scno.c \
|
||||
linux/s390x/signalent1.h \
|
||||
linux/s390x/syscallent.h \
|
||||
linux/s390x/syscallent1.h \
|
||||
linux/s390x/userent.h \
|
||||
@ -821,7 +833,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -834,7 +845,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -845,7 +855,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -857,7 +866,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -870,7 +878,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -883,7 +890,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -893,8 +899,6 @@ EXTRA_DIST = \
|
||||
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/get_error.c \
|
||||
linux/x86_64/get_scno.c \
|
||||
linux/x86_64/get_syscall_args.c \
|
||||
@ -911,8 +915,6 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -980,7 +982,7 @@ dist-hook:
|
||||
${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
|
||||
${AM_V_GEN}echo $(MANPAGE_DATE) > $(distdir)/.strace.1.in.date
|
||||
|
||||
today = $(shell date +%Y-%m-%d)
|
||||
today = $(shell LC_TIME=C date -u +%Y-%m-%d)
|
||||
version_regexp = $(subst .,\.,$(VERSION))
|
||||
news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
|
||||
|
||||
|
53
NEWS
53
NEWS
@ -1,3 +1,56 @@
|
||||
Noteworthy changes in release 4.23 (2018-06-14)
|
||||
===============================================
|
||||
|
||||
* 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)
|
||||
===============================================
|
||||
|
||||
|
25
aio.c
25
aio.c
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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,
|
||||
umoven_or_printaddr, print_iocbp, 0);
|
||||
tfetch_mem, print_iocbp, 0);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -238,7 +238,8 @@ SYS_FUNC(io_cancel)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(io_getevents)
|
||||
static int
|
||||
print_io_getevents(struct tcb *tcp, bool has_usig)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printaddr(tcp->u_arg[0]);
|
||||
@ -248,16 +249,30 @@ SYS_FUNC(io_getevents)
|
||||
} else {
|
||||
struct io_event buf;
|
||||
print_array(tcp, tcp->u_arg[3], tcp->u_rval, &buf, sizeof(buf),
|
||||
umoven_or_printaddr, print_io_event, 0);
|
||||
tfetch_mem, print_io_event, 0);
|
||||
tprints(", ");
|
||||
/*
|
||||
* Since the timeout parameter is read by the kernel
|
||||
* Since the timeout and usig parameters are 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);
|
||||
}
|
||||
|
123
basic_filters.c
123
basic_filters.c
@ -27,25 +27,82 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "number_set.h"
|
||||
#include "filter.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;
|
||||
}
|
||||
|
||||
static bool
|
||||
qualify_syscall_number(const char *s, struct number_set *set)
|
||||
{
|
||||
int n = string_to_uint(s);
|
||||
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);
|
||||
if (n < 0)
|
||||
return false;
|
||||
|
||||
bool done = false;
|
||||
|
||||
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
|
||||
if ((unsigned) n >= nsyscall_vec[p])
|
||||
continue;
|
||||
add_number_to_set_array(n, set, p);
|
||||
done = true;
|
||||
}
|
||||
for (p = 0; p < SUPPORTED_PERSONALITIES; ++p)
|
||||
done |= qualify_syscall_number_personality(n, p, set);
|
||||
|
||||
return done;
|
||||
}
|
||||
@ -75,12 +132,26 @@ qualify_syscall_regex(const char *s, struct number_set *set)
|
||||
for (unsigned int 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;
|
||||
}
|
||||
@ -164,22 +235,40 @@ scno_by_name(const char *s, unsigned int p, kernel_long_t start)
|
||||
}
|
||||
|
||||
static bool
|
||||
qualify_syscall_name(const char *s, struct number_set *set)
|
||||
qualify_syscall_name_personality(const char *s, unsigned int p,
|
||||
struct number_set *set)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
for (unsigned int p = 0; p < SUPPORTED_PERSONALITIES; ++p) {
|
||||
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;
|
||||
}
|
||||
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);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
511
bpf.c
511
bpf.c
@ -33,6 +33,7 @@
|
||||
#ifdef HAVE_LINUX_BPF_H
|
||||
# include <linux/bpf.h>
|
||||
#endif
|
||||
#include <linux/filter.h>
|
||||
|
||||
#include "bpf_attr.h"
|
||||
|
||||
@ -45,6 +46,9 @@
|
||||
#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 \
|
||||
@ -117,59 +121,160 @@ 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)
|
||||
{
|
||||
struct ebpf_insns_data *eid = data;
|
||||
struct ebpf_insn *insn = elem_buf;
|
||||
|
||||
if (eid->count++ >= BPF_MAXINSNS) {
|
||||
tprints("...");
|
||||
return false;
|
||||
}
|
||||
|
||||
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("{", attr, map_type, bpf_map_types,
|
||||
"BPF_MAP_TYPE_???");
|
||||
PRINT_FIELD_XVAL_INDEX("{", 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);
|
||||
|
||||
/* 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);
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_MAP_LOOKUP_ELEM)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, map_fd, tcp);
|
||||
PRINT_FIELD_X(", ", attr, key);
|
||||
PRINT_FIELD_X(", ", attr, value);
|
||||
PRINT_FIELD_ADDR64(", ", attr, key);
|
||||
PRINT_FIELD_ADDR64(", ", attr, value);
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_MAP_UPDATE_ELEM)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, map_fd, tcp);
|
||||
PRINT_FIELD_X(", ", attr, key);
|
||||
PRINT_FIELD_X(", ", attr, value);
|
||||
PRINT_FIELD_XVAL(", ", attr, flags, bpf_map_update_elem_flags,
|
||||
"BPF_???");
|
||||
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)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_MAP_DELETE_ELEM)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, map_fd, tcp);
|
||||
PRINT_FIELD_X(", ", attr, key);
|
||||
PRINT_FIELD_ADDR64(", ", attr, key);
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_NEXT_KEY)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, map_fd, tcp);
|
||||
PRINT_FIELD_X(", ", attr, key);
|
||||
PRINT_FIELD_X(", ", attr, next_key);
|
||||
PRINT_FIELD_ADDR64(", ", attr, key);
|
||||
PRINT_FIELD_ADDR64(", ", attr, next_key);
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
|
||||
{
|
||||
PRINT_FIELD_XVAL("{", attr, prog_type, bpf_prog_types,
|
||||
"BPF_PROG_TYPE_???");
|
||||
PRINT_FIELD_XVAL_INDEX("{", attr, prog_type, bpf_prog_types,
|
||||
"BPF_PROG_TYPE_???");
|
||||
PRINT_FIELD_U(", ", attr, insn_cnt);
|
||||
PRINT_FIELD_X(", ", attr, insns);
|
||||
tprints(", insns=");
|
||||
print_ebpf_prog(tcp, attr.insns, attr.insn_cnt);
|
||||
|
||||
tprintf(", license=");
|
||||
print_big_u64_addr(attr.license);
|
||||
@ -180,7 +285,9 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
|
||||
break;
|
||||
PRINT_FIELD_U(", ", attr, log_level);
|
||||
PRINT_FIELD_U(", ", attr, log_size);
|
||||
PRINT_FIELD_X(", ", attr, log_buf);
|
||||
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))
|
||||
@ -194,6 +301,32 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
|
||||
if (len <= offsetof(struct BPF_PROG_LOAD_struct, prog_flags))
|
||||
break;
|
||||
PRINT_FIELD_FLAGS(", ", attr, prog_flags, bpf_prog_flags, "BPF_F_???");
|
||||
|
||||
/* 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_???");
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
|
||||
|
||||
@ -204,10 +337,10 @@ BEGIN_BPF_CMD_DECODER(BPF_OBJ_PIN)
|
||||
printpath(tcp, attr.pathname);
|
||||
|
||||
PRINT_FIELD_FD(", ", attr, bpf_fd, tcp);
|
||||
if (len <= offsetofend(struct BPF_OBJ_PIN_struct, bpf_fd))
|
||||
break;
|
||||
|
||||
/* 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_???");
|
||||
}
|
||||
@ -219,7 +352,8 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_ATTACH)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, target_fd, tcp);
|
||||
PRINT_FIELD_FD(", ", attr, attach_bpf_fd, tcp);
|
||||
PRINT_FIELD_XVAL(", ", attr, attach_type, bpf_attach_type, "BPF_???");
|
||||
PRINT_FIELD_XVAL_INDEX(", ", attr, attach_type, bpf_attach_type,
|
||||
"BPF_???");
|
||||
PRINT_FIELD_FLAGS(", ", attr, attach_flags, bpf_attach_flags,
|
||||
"BPF_F_???");
|
||||
}
|
||||
@ -228,7 +362,8 @@ END_BPF_CMD_DECODER(RVAL_DECODED)
|
||||
BEGIN_BPF_CMD_DECODER(BPF_PROG_DETACH)
|
||||
{
|
||||
PRINT_FIELD_FD("{", attr, target_fd, tcp);
|
||||
PRINT_FIELD_XVAL(", ", attr, attach_type, bpf_attach_type, "BPF_???");
|
||||
PRINT_FIELD_XVAL_INDEX(", ", attr, attach_type, bpf_attach_type,
|
||||
"BPF_???");
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED)
|
||||
|
||||
@ -238,8 +373,8 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_TEST_RUN)
|
||||
PRINT_FIELD_U(", ", attr, retval);
|
||||
PRINT_FIELD_U(", ", attr, data_size_in);
|
||||
PRINT_FIELD_U(", ", attr, data_size_out);
|
||||
PRINT_FIELD_X(", ", attr, data_in);
|
||||
PRINT_FIELD_X(", ", attr, data_out);
|
||||
PRINT_FIELD_ADDR64(", ", attr, data_in);
|
||||
PRINT_FIELD_ADDR64(", ", attr, data_out);
|
||||
PRINT_FIELD_U(", ", attr, repeat);
|
||||
PRINT_FIELD_U(", ", attr, duration);
|
||||
tprints("}");
|
||||
@ -250,10 +385,10 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_NEXT_ID)
|
||||
{
|
||||
PRINT_FIELD_U("{", attr, start_id);
|
||||
PRINT_FIELD_U(", ", attr, next_id);
|
||||
if (len <= offsetofend(struct BPF_PROG_GET_NEXT_ID_struct, next_id))
|
||||
break;
|
||||
|
||||
/* 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_???");
|
||||
}
|
||||
@ -265,10 +400,10 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_FD_BY_ID)
|
||||
{
|
||||
PRINT_FIELD_U("{", attr, prog_id);
|
||||
PRINT_FIELD_U(", ", attr, next_id);
|
||||
if (len <= offsetofend(struct BPF_PROG_GET_FD_BY_ID_struct, next_id))
|
||||
break;
|
||||
|
||||
/* 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_???");
|
||||
}
|
||||
@ -278,23 +413,299 @@ BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID)
|
||||
{
|
||||
PRINT_FIELD_U("{", attr, map_id);
|
||||
PRINT_FIELD_U(", ", attr, next_id);
|
||||
if (len <= offsetofend(struct BPF_MAP_GET_FD_BY_ID_struct, next_id))
|
||||
break;
|
||||
|
||||
/* 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)
|
||||
|
||||
BEGIN_BPF_CMD_DECODER(BPF_OBJ_GET_INFO_BY_FD)
|
||||
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)
|
||||
{
|
||||
PRINT_FIELD_FD("{info={", attr, bpf_fd, tcp);
|
||||
PRINT_FIELD_U(", ", attr, info_len);
|
||||
PRINT_FIELD_X(", ", attr, info);
|
||||
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:
|
||||
tprints("}");
|
||||
}
|
||||
END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD)
|
||||
|
||||
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)
|
||||
{
|
||||
struct bpf_prog_info_struct info = { 0 };
|
||||
const unsigned int len = MIN(size, bpf_prog_info_struct_size);
|
||||
uint64_t map_id_buf;
|
||||
|
||||
memcpy(&info, info_buf, 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:
|
||||
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;
|
||||
|
||||
tprints("}");
|
||||
}
|
||||
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)
|
||||
{
|
||||
@ -315,38 +726,36 @@ 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;
|
||||
int rc = RVAL_DECODED;
|
||||
|
||||
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 char *buf;
|
||||
|
||||
if (!buf)
|
||||
buf = xmalloc(get_pagesize());
|
||||
|
||||
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;
|
||||
}
|
||||
if (!umoven_or_printaddr_ignore_syserror(tcp, addr, size, buf))
|
||||
rc = bpf_cmd_decoders[cmd](tcp, addr, size, buf);
|
||||
} else {
|
||||
rc = bpf_cmd_decoders[cmd](tcp, addr, size, NULL) | RVAL_DECODED;
|
||||
printaddr(addr);
|
||||
}
|
||||
|
||||
if (rc & RVAL_DECODED)
|
||||
if (exiting(tcp) || (rc & RVAL_DECODED))
|
||||
tprintf(", %u", size);
|
||||
|
||||
return rc;
|
||||
|
109
bpf_attr.h
109
bpf_attr.h
@ -28,6 +28,33 @@
|
||||
#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;
|
||||
@ -36,11 +63,13 @@ struct BPF_MAP_CREATE_struct {
|
||||
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 28
|
||||
#define expected_BPF_MAP_CREATE_struct_size 48
|
||||
|
||||
struct BPF_MAP_LOOKUP_ELEM_struct {
|
||||
uint32_t map_fd;
|
||||
@ -56,7 +85,7 @@ struct BPF_MAP_UPDATE_ELEM_struct {
|
||||
uint32_t map_fd;
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) key;
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) value;
|
||||
uint64_t flags;
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) flags;
|
||||
};
|
||||
|
||||
#define BPF_MAP_UPDATE_ELEM_struct_size \
|
||||
@ -92,11 +121,14 @@ struct BPF_PROG_LOAD_struct {
|
||||
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 \
|
||||
sizeof(struct BPF_PROG_LOAD_struct)
|
||||
#define expected_BPF_PROG_LOAD_struct_size 48
|
||||
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;
|
||||
@ -190,4 +222,73 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
||||
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 */
|
||||
|
88
bpf_filter.c
88
bpf_filter.c
@ -34,6 +34,7 @@
|
||||
#include "bpf_fprog.h"
|
||||
|
||||
#include <linux/filter.h>
|
||||
|
||||
#include "xlat/bpf_class.h"
|
||||
#include "xlat/bpf_miscop.h"
|
||||
#include "xlat/bpf_mode.h"
|
||||
@ -43,56 +44,85 @@
|
||||
#include "xlat/bpf_size.h"
|
||||
#include "xlat/bpf_src.h"
|
||||
|
||||
static void
|
||||
print_bpf_filter_code(const uint16_t code)
|
||||
#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)
|
||||
{
|
||||
const struct xlat *mode = extended ? ebpf_mode : bpf_mode;
|
||||
uint16_t i = code & ~BPF_CLASS(code);
|
||||
|
||||
printxval(bpf_class, BPF_CLASS(code), "BPF_???");
|
||||
if (extended)
|
||||
printxval_index(ebpf_class, BPF_CLASS(code), "BPF_???");
|
||||
else
|
||||
printxval_index(bpf_class, BPF_CLASS(code), "BPF_???");
|
||||
switch (BPF_CLASS(code)) {
|
||||
case BPF_ST:
|
||||
case BPF_STX:
|
||||
if (!extended) {
|
||||
if (i) {
|
||||
tprintf("|%#x", i);
|
||||
tprints_comment("BPF_???");
|
||||
}
|
||||
break;
|
||||
}
|
||||
ATTRIBUTE_FALLTHROUGH; /* extended == true */
|
||||
|
||||
case BPF_LD:
|
||||
case BPF_LDX:
|
||||
tprints("|");
|
||||
printxval(bpf_size, BPF_SIZE(code), "BPF_???");
|
||||
printxvals(BPF_SIZE(code), "BPF_???",
|
||||
bpf_size, extended ? ebpf_size : NULL, NULL);
|
||||
tprints("|");
|
||||
printxval(bpf_mode, BPF_MODE(code), "BPF_???");
|
||||
printxval(mode, BPF_MODE(code), "BPF_???");
|
||||
break;
|
||||
case BPF_ST:
|
||||
case BPF_STX:
|
||||
if (i) {
|
||||
tprintf("|%#x", i);
|
||||
tprints_comment("BPF_???");
|
||||
|
||||
case BPF_MISC: /* BPF_ALU64 in eBPF */
|
||||
if (!extended) {
|
||||
tprints("|");
|
||||
printxval(bpf_miscop, BPF_MISCOP(code), "BPF_???");
|
||||
i &= ~BPF_MISCOP(code);
|
||||
if (i) {
|
||||
tprintf("|%#x", i);
|
||||
tprints_comment("BPF_???");
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
ATTRIBUTE_FALLTHROUGH; /* extended == true */
|
||||
|
||||
case BPF_ALU:
|
||||
tprints("|");
|
||||
printxval(bpf_src, BPF_SRC(code), "BPF_???");
|
||||
tprints("|");
|
||||
printxval(bpf_op_alu, BPF_OP(code), "BPF_???");
|
||||
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("|");
|
||||
printxval(bpf_op_jmp, BPF_OP(code), "BPF_???");
|
||||
printxvals(BPF_OP(code), "BPF_???",
|
||||
bpf_op_jmp, extended ? ebpf_op_jmp : NULL, NULL);
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -102,7 +132,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);
|
||||
print_bpf_filter_code(filter->code, false);
|
||||
tprints(", ");
|
||||
if (!print_k || !print_k(filter))
|
||||
tprintf("%#x", filter->k);
|
||||
@ -113,7 +143,7 @@ static void
|
||||
print_bpf_filter_jump(const struct bpf_filter_block *const filter)
|
||||
{
|
||||
tprints("BPF_JUMP(");
|
||||
print_bpf_filter_code(filter->code);
|
||||
print_bpf_filter_code(filter->code, false);
|
||||
tprintf(", %#x, %#x, %#x)", filter->k, filter->jt, filter->jf);
|
||||
}
|
||||
|
||||
@ -153,7 +183,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),
|
||||
umoven_or_printaddr, print_bpf_filter_block, &fbd);
|
||||
tfetch_mem, print_bpf_filter_block, &fbd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
* 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
|
||||
@ -33,23 +34,25 @@
|
||||
|
||||
#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) {
|
||||
tprints("SKF_AD_OFF+");
|
||||
print_xlat32(SKF_AD_OFF);
|
||||
tprints("+");
|
||||
printxval(skf_ad, fp->k - (unsigned int) SKF_AD_OFF,
|
||||
"SKF_AD_???");
|
||||
return true;
|
||||
} else if (fp->k >= (unsigned int) SKF_NET_OFF) {
|
||||
tprintf("%s+%u", "SKF_NET_OFF",
|
||||
fp->k - (unsigned int) SKF_NET_OFF);
|
||||
print_xlat32(SKF_NET_OFF);
|
||||
tprintf("+%u", fp->k - (unsigned int) SKF_NET_OFF);
|
||||
return true;
|
||||
} else if (fp->k >= (unsigned int) SKF_LL_OFF) {
|
||||
tprintf("%s+%u", "SKF_LL_OFF",
|
||||
fp->k - (unsigned int) SKF_LL_OFF);
|
||||
print_xlat32(SKF_LL_OFF);
|
||||
tprintf("+%u", fp->k - (unsigned int) SKF_LL_OFF);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
574
btrfs.c
574
btrfs.c
@ -84,10 +84,6 @@ 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];
|
||||
@ -128,6 +124,7 @@ 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"
|
||||
@ -178,31 +175,21 @@ 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={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_???");
|
||||
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_???");
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
@ -214,14 +201,12 @@ btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out)
|
||||
if (umove_or_printaddr(tcp, arg, &balance_args))
|
||||
return;
|
||||
|
||||
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_???");
|
||||
}
|
||||
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_???");
|
||||
|
||||
if (balance_args.flags & BTRFS_BALANCE_DATA)
|
||||
btrfs_print_balance_args("data", &balance_args.data);
|
||||
@ -235,53 +220,41 @@ 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)
|
||||
{
|
||||
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_???");
|
||||
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("}");
|
||||
}
|
||||
|
||||
static void
|
||||
btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
|
||||
{
|
||||
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);
|
||||
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("}");
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
#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_data_container_header(const struct btrfs_data_container *container)
|
||||
{
|
||||
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);
|
||||
PRINT_FIELD_U("{", *container, bytes_left);
|
||||
PRINT_FIELD_U(", ", *container, bytes_missing);
|
||||
PRINT_FIELD_U(", ", *container, elem_cnt);
|
||||
PRINT_FIELD_U(", ", *container, elem_missed);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -294,10 +267,16 @@ static bool
|
||||
print_btrfs_data_container_logical_ino(struct tcb *tcp, void *elem_buf,
|
||||
size_t elem_size, void *data)
|
||||
{
|
||||
const uint64_t *const record = elem_buf;
|
||||
const struct {
|
||||
uint64_t inum;
|
||||
uint64_t offset;
|
||||
uint64_t root;
|
||||
} *const record = elem_buf;
|
||||
|
||||
tprintf("{inum=%" PRIu64 ", offset=%" PRIu64 ", root=%" PRIu64 "}",
|
||||
record[0], record[1], record[2]);
|
||||
PRINT_FIELD_U("{", *record, inum);
|
||||
PRINT_FIELD_U(", ", *record, offset);
|
||||
PRINT_FIELD_U(", ", *record, root);
|
||||
tprints("}");
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -314,14 +293,15 @@ 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),
|
||||
umoven_or_printaddr,
|
||||
tfetch_mem,
|
||||
print_btrfs_data_container_logical_ino, 0);
|
||||
}
|
||||
|
||||
@ -352,28 +332,21 @@ 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),
|
||||
umoven_or_printaddr,
|
||||
tfetch_mem,
|
||||
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)
|
||||
{
|
||||
@ -382,101 +355,84 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
|
||||
if (umove_or_printaddr(tcp, qgi_addr, &inherit))
|
||||
return;
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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),
|
||||
umoven_or_printaddr, print_uint64, 0);
|
||||
tfetch_mem, print_uint64_array_member, 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)) {
|
||||
tprints("{key={tree_id=");
|
||||
btrfs_print_objectid(key->tree_id);
|
||||
btrfs_print_objectid("{key={", *key, tree_id);
|
||||
|
||||
if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID ||
|
||||
!abbrev(tcp)) {
|
||||
tprints(", min_objectid=");
|
||||
btrfs_print_objectid(key->min_objectid);
|
||||
}
|
||||
!abbrev(tcp))
|
||||
btrfs_print_objectid(", ", *key, min_objectid);
|
||||
|
||||
if (key->max_objectid != BTRFS_LAST_FREE_OBJECTID ||
|
||||
!abbrev(tcp)) {
|
||||
tprints(", max_objectid=");
|
||||
btrfs_print_objectid(key->max_objectid);
|
||||
}
|
||||
!abbrev(tcp))
|
||||
btrfs_print_objectid(", ", *key, max_objectid);
|
||||
|
||||
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);
|
||||
PRINT_FIELD_U64(", ", *key, min_offset);
|
||||
PRINT_FIELD_U64(", ", *key, max_offset);
|
||||
PRINT_FIELD_U64(", ", *key, min_transid);
|
||||
PRINT_FIELD_U64(", ", *key, max_transid);
|
||||
|
||||
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);
|
||||
btrfs_print_key_type(", ", *key, min_type);
|
||||
btrfs_print_key_type(", ", *key, max_type);
|
||||
PRINT_FIELD_U(", ", *key, nr_items);
|
||||
tprints("}");
|
||||
if (print_size)
|
||||
tprintf(", buf_size=%" PRIu64, buf_size);
|
||||
tprints("}");
|
||||
} else {
|
||||
tprintf("{key={nr_items=%u}", key->nr_items);
|
||||
PRINT_FIELD_U("{key={", *key, nr_items);
|
||||
tprints("}");
|
||||
if (print_size)
|
||||
tprintf(", buf_size=%" PRIu64, buf_size);
|
||||
tprints(", buf=");
|
||||
if (abbrev(tcp))
|
||||
tprints("...");
|
||||
else {
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
} else {
|
||||
uint64_t i;
|
||||
uint64_t off = 0;
|
||||
tprints("[");
|
||||
tprints(", buf=[");
|
||||
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 ||
|
||||
umove(tcp, addr, &sh)) {
|
||||
if (i > max_strlen) {
|
||||
tprints("...");
|
||||
break;
|
||||
}
|
||||
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);
|
||||
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("}");
|
||||
off += sizeof(sh) + sh.len;
|
||||
|
||||
}
|
||||
@ -490,7 +446,8 @@ static bool
|
||||
print_objectid_callback(struct tcb *tcp, void *elem_buf,
|
||||
size_t elem_size, void *data)
|
||||
{
|
||||
btrfs_print_objectid(*(uint64_t *) elem_buf);
|
||||
printxvals_ex(*(uint64_t *) elem_buf, NULL, XLAT_STYLE_FMT_U,
|
||||
btrfs_tree_objectids, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -501,15 +458,22 @@ print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf,
|
||||
{
|
||||
const struct btrfs_ioctl_space_info *info = elem_buf;
|
||||
|
||||
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);
|
||||
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("}");
|
||||
|
||||
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)
|
||||
@ -605,19 +569,14 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{start=%" PRIu64 ", len=", (uint64_t)args.start);
|
||||
PRINT_FIELD_U("{", args, start);
|
||||
PRINT_FIELD_U64(", ", args, len);
|
||||
|
||||
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_???");
|
||||
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_???");
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
@ -635,23 +594,25 @@ 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)) {
|
||||
tprintf("devid=%" PRI__u64, args.devid);
|
||||
PRINT_FIELD_DEV("{", args, devid);
|
||||
if (valid)
|
||||
tprintf(", uuid=%s", uuid);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprints("{");
|
||||
if (valid)
|
||||
tprintf("uuid=%s, ", uuid);
|
||||
tprintf("bytes_used=%" PRI__u64
|
||||
", total_bytes=%" PRI__u64,
|
||||
args.bytes_used, args.total_bytes);
|
||||
|
||||
PRINT_FIELD_U("", args, bytes_used);
|
||||
PRINT_FIELD_U(", ", args, total_bytes);
|
||||
PRINT_FIELD_CSTRING(", ", args, path);
|
||||
tprints("}");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -669,24 +630,20 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
break;
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprints("{cmd=");
|
||||
printxval64(btrfs_dev_replace_cmds, args.cmd,
|
||||
"BTRFS_IOCTL_DEV_REPLACE_CMD_???");
|
||||
PRINT_FIELD_XVAL("{", args, cmd, btrfs_dev_replace_cmds,
|
||||
"BTRFS_IOCTL_DEV_REPLACE_CMD_???");
|
||||
if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_START) {
|
||||
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));
|
||||
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);
|
||||
tprints("}");
|
||||
|
||||
}
|
||||
@ -694,34 +651,28 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprints("{result=");
|
||||
printxval64(btrfs_dev_replace_results, args.result,
|
||||
"BTRFS_IOCTL_DEV_REPLACE_RESULT_???");
|
||||
PRINT_FIELD_XVAL("{", args, result, btrfs_dev_replace_results,
|
||||
"BTRFS_IOCTL_DEV_REPLACE_RESULT_???");
|
||||
if (args.cmd == BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS) {
|
||||
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_XVAL(", status={", args.status,
|
||||
replace_state, btrfs_dev_replace_state,
|
||||
"BTRFS_IOCTL_DEV_REPLACE_STATE_???");
|
||||
|
||||
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);
|
||||
|
||||
tprintf(", time_started=%" PRIu64,
|
||||
(uint64_t) args.status.time_started);
|
||||
PRINT_FIELD_U(", ", args.status, time_started);
|
||||
tprints_comment(sprinttime(args.status.time_started));
|
||||
|
||||
tprintf(", time_stopped=%" PRIu64,
|
||||
(uint64_t) args.status.time_stopped);
|
||||
PRINT_FIELD_U(", ", args.status, time_stopped);
|
||||
tprints_comment(sprinttime(args.status.time_stopped));
|
||||
|
||||
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);
|
||||
PRINT_FIELD_U(", ", args.status, num_write_errors);
|
||||
PRINT_FIELD_U(", ", args.status,
|
||||
num_uncorrectable_read_errors);
|
||||
}
|
||||
tprints("}");
|
||||
break;
|
||||
@ -810,12 +761,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
#endif
|
||||
btrfs_unparse_uuid(args.fsid, uuid);
|
||||
|
||||
tprints("{");
|
||||
tprintf("max_id=%" PRI__u64 ", num_devices=%" PRI__u64
|
||||
", fsid=%s, nodesize=%u, sectorsize=%u"
|
||||
PRINT_FIELD_U("{", args, max_id);
|
||||
PRINT_FIELD_U(", ", args, num_devices);
|
||||
tprintf(", fsid=%s, nodesize=%u, sectorsize=%u"
|
||||
", clone_alignment=%u",
|
||||
args.max_id, args.num_devices, uuid,
|
||||
nodesize, sectorsize, clone_alignment);
|
||||
uuid, nodesize, sectorsize, clone_alignment);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
@ -835,12 +785,14 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
|
||||
tprints("{");
|
||||
|
||||
if (entering(tcp))
|
||||
tprintf("devid=%" PRI__u64 ", ", args.devid);
|
||||
if (entering(tcp)) {
|
||||
PRINT_FIELD_DEV("", args, devid);
|
||||
tprints(", ");
|
||||
}
|
||||
|
||||
tprintf("nr_items=%" PRI__u64 ", flags=", args.nr_items);
|
||||
printflags64(btrfs_dev_stats_flags, args.flags,
|
||||
"BTRFS_DEV_STATS_???");
|
||||
PRINT_FIELD_U("", args, nr_items);
|
||||
PRINT_FIELD_FLAGS(", ", args, flags, btrfs_dev_stats_flags,
|
||||
"BTRFS_DEV_STATS_???");
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprints("}");
|
||||
@ -860,8 +812,10 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
tprints("...");
|
||||
break;
|
||||
}
|
||||
tprintf("%" PRI__u64, args.values[i]);
|
||||
tprints_comment(xlookup(btrfs_dev_stats_values, i));
|
||||
|
||||
tprints("[");
|
||||
printxval_u(btrfs_dev_stats_values, i, NULL);
|
||||
tprintf("] = %" PRI__u64, args.values[i]);
|
||||
}
|
||||
tprints("]}");
|
||||
break;
|
||||
@ -885,18 +839,15 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (args.treeid == 0)
|
||||
set_tcb_priv_ulong(tcp, 1);
|
||||
|
||||
tprints("{treeid=");
|
||||
btrfs_print_objectid(args.treeid);
|
||||
tprints(", objectid=");
|
||||
btrfs_print_objectid(args.objectid);
|
||||
btrfs_print_objectid("{", args, treeid);
|
||||
btrfs_print_objectid(", ", args, objectid);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprints("{");
|
||||
if (get_tcb_priv_ulong(tcp)) {
|
||||
tprints("treeid=");
|
||||
btrfs_print_objectid(args.treeid);
|
||||
btrfs_print_objectid("", args, treeid);
|
||||
tprints(", ");
|
||||
}
|
||||
|
||||
@ -918,18 +869,15 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprints("{");
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprintf("inum=%" PRI__u64 ", size=%" PRI__u64,
|
||||
args.inum, args.size);
|
||||
tprints(", fspath=");
|
||||
printaddr64(args.fspath);
|
||||
PRINT_FIELD_U("{", args, inum);
|
||||
PRINT_FIELD_U(", ", args, size);
|
||||
PRINT_FIELD_ADDR64(", ", args, fspath);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprints("fspath=");
|
||||
tprints("{fspath=");
|
||||
btrfs_print_ino_path_container(tcp, args.fspath);
|
||||
|
||||
tprints("}");
|
||||
@ -949,11 +897,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprints("{");
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprintf("logical=%" PRI__u64 ", size=%" PRI__u64,
|
||||
args.logical, args.size);
|
||||
PRINT_FIELD_U("{", args, logical);
|
||||
PRINT_FIELD_U(", ", args, size);
|
||||
|
||||
if (!IS_ARRAY_ZERO(args.reserved)) {
|
||||
tprints(", reserved=[");
|
||||
@ -972,13 +918,12 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
args.reserved[3]
|
||||
#endif
|
||||
, "BTRFS_LOGICAL_INO_ARGS_???");
|
||||
tprints(", inodes=");
|
||||
printaddr64(args.inodes);
|
||||
PRINT_FIELD_ADDR64(", ", args, inodes);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprints("inodes=");
|
||||
tprints("{inodes=");
|
||||
btrfs_print_logical_ino_container(tcp, args.inodes);
|
||||
|
||||
tprints("}");
|
||||
@ -992,9 +937,10 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{assign=%" PRI__u64 ", src=%" PRI__u64
|
||||
", dst=%" PRI__u64 "}",
|
||||
args.assign, args.src, args.dst);
|
||||
PRINT_FIELD_U("{", args, assign);
|
||||
PRINT_FIELD_U(", ", args, src);
|
||||
PRINT_FIELD_U(", ", args, dst);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1005,8 +951,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{create=%" PRI__u64 ", qgroupid=%" PRI__u64 "}",
|
||||
args.create, args.qgroupid);
|
||||
PRINT_FIELD_U("{", args, create);
|
||||
PRINT_FIELD_U(", ", args, qgroupid);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1020,7 +967,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{qgroupid=%" PRI__u64 ", lim=", args.qgroupid);
|
||||
PRINT_FIELD_U("{", args, qgroupid);
|
||||
btrfs_print_qgroup_limit(&args.lim);
|
||||
tprints("}");
|
||||
break;
|
||||
@ -1033,8 +980,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
printxval64(btrfs_qgroup_ctl_cmds, args.cmd,
|
||||
"BTRFS_QUOTA_CTL_???");
|
||||
PRINT_FIELD_XVAL("{", args, cmd, btrfs_qgroup_ctl_cmds,
|
||||
"BTRFS_QUOTA_CTL_???");
|
||||
tprints("}");
|
||||
|
||||
break;
|
||||
@ -1047,7 +994,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{flags=%" PRIu64 "}", (uint64_t) args.flags);
|
||||
PRINT_FIELD_U("{", args, flags);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1061,8 +1009,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprintf("{flags=%" PRIu64 ", progress=", (uint64_t) args.flags);
|
||||
btrfs_print_objectid(args.progress);
|
||||
PRINT_FIELD_U("{", args, flags);
|
||||
btrfs_print_objectid(", ", args, progress);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
@ -1083,16 +1031,18 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
|
||||
if (entering(tcp)) {
|
||||
btrfs_unparse_uuid((unsigned char *)args.uuid, uuid);
|
||||
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);
|
||||
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("}");
|
||||
return 0;
|
||||
}
|
||||
tprintf("{rtransid=%" PRIu64 ", rtime=%" PRIu64 ".%u}",
|
||||
(uint64_t) args.rtransid, (uint64_t) args.rtime.sec,
|
||||
args.rtime.nsec);
|
||||
PRINT_FIELD_U("{", args, rtransid);
|
||||
print_btrfs_timespec(", rtime=",
|
||||
args.rtime.sec, args.rtime.nsec);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1111,50 +1061,34 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
break;
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprintf("{devid=%" PRI__u64, args.devid);
|
||||
PRINT_FIELD_DEV("{", args, devid);
|
||||
if (code == BTRFS_IOC_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_???");
|
||||
PRINT_FIELD_U(", ", args, start);
|
||||
PRINT_FIELD_U64(", ", args, end);
|
||||
PRINT_FIELD_FLAGS(", ", args, flags,
|
||||
btrfs_scrub_flags,
|
||||
"BTRFS_SCRUB_???");
|
||||
}
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
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);
|
||||
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("}}");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1189,11 +1123,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
else if (syserror(tcp)) {
|
||||
if (tcp->u_error == EOVERFLOW) {
|
||||
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;
|
||||
if (!umove_or_printaddr_ignore_syserror(tcp,
|
||||
arg, &args)) {
|
||||
PRINT_FIELD_U("{", args, buf_size);
|
||||
tprints("}");
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else
|
||||
@ -1217,26 +1151,23 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprints("{send_fd=");
|
||||
printfd(tcp, args.send_fd);
|
||||
tprintf(", clone_sources_count=%" PRIu64 ", clone_sources=",
|
||||
(uint64_t) args.clone_sources_count);
|
||||
PRINT_FIELD_FD("{", args, send_fd, tcp);
|
||||
PRINT_FIELD_U(", ", args, clone_sources_count);
|
||||
|
||||
tprints(", clone_sources=");
|
||||
if (abbrev(tcp))
|
||||
tprints("...");
|
||||
printaddr((uintptr_t) args.clone_sources);
|
||||
else {
|
||||
uint64_t record;
|
||||
print_array(tcp, ptr_to_kulong(args.clone_sources),
|
||||
args.clone_sources_count,
|
||||
&record, sizeof(record),
|
||||
umoven_or_printaddr,
|
||||
tfetch_mem,
|
||||
print_objectid_callback, 0);
|
||||
}
|
||||
tprints(", parent_root=");
|
||||
btrfs_print_objectid(args.parent_root);
|
||||
tprints(", flags=");
|
||||
printflags64(btrfs_send_flags, args.flags,
|
||||
"BTRFS_SEND_FLAGS_???");
|
||||
btrfs_print_objectid(", ", args, parent_root);
|
||||
PRINT_FIELD_FLAGS(", ", args, flags, btrfs_send_flags,
|
||||
"BTRFS_SEND_FLAGS_???");
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
@ -1254,28 +1185,27 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprints("{");
|
||||
if (entering(tcp)) {
|
||||
tprintf("space_slots=%" PRI__u64 "}", args.space_slots);
|
||||
PRINT_FIELD_U("{", args, space_slots);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tprintf("total_spaces=%" PRI__u64, args.total_spaces);
|
||||
PRINT_FIELD_U("{", args, total_spaces);
|
||||
|
||||
if (args.space_slots == 0 && args.total_spaces) {
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
tprints(", spaces=");
|
||||
|
||||
if (abbrev(tcp))
|
||||
tprints("...");
|
||||
else {
|
||||
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), umoven_or_printaddr,
|
||||
&info, sizeof(info), tfetch_mem,
|
||||
print_btrfs_ioctl_space_info, 0);
|
||||
}
|
||||
tprints("}");
|
||||
@ -1296,8 +1226,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
tprints("{fd=");
|
||||
printfd(tcp, args.fd);
|
||||
PRINT_FIELD_FD("{", args, fd, tcp);
|
||||
PRINT_FIELD_CSTRING(", ", args, name);
|
||||
tprints("}");
|
||||
break;
|
||||
@ -1318,15 +1247,13 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
break;
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprints("{fd=");
|
||||
printfd(tcp, args.fd);
|
||||
tprints(", flags=");
|
||||
printflags64(btrfs_snap_flags_v2, args.flags,
|
||||
"BTRFS_SUBVOL_???");
|
||||
PRINT_FIELD_FD("{", args, fd, tcp);
|
||||
PRINT_FIELD_FLAGS(", ", args, flags,
|
||||
btrfs_snap_flags_v2,
|
||||
"BTRFS_SUBVOL_???");
|
||||
if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
|
||||
tprintf(", size=%" PRIu64 ", qgroup_inherit=",
|
||||
(uint64_t) args.size);
|
||||
|
||||
PRINT_FIELD_U(", ", args, size);
|
||||
tprints(", qgroup_inherit=");
|
||||
btrfs_print_qgroup_inherit(tcp,
|
||||
ptr_to_kulong(args.qgroup_inherit));
|
||||
}
|
||||
@ -1334,7 +1261,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
tprintf("{transid=%" PRIu64 "}", (uint64_t) args.transid);
|
||||
PRINT_FIELD_U("{", args, transid);
|
||||
tprints("}");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
|
||||
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libunwind8-dev make xz-utils'
|
||||
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libbluetooth-dev make xz-utils'
|
||||
|
||||
updated=
|
||||
apt_get_install()
|
||||
@ -17,9 +17,10 @@ apt_get_install()
|
||||
git_installed=
|
||||
clone_repo()
|
||||
{
|
||||
local src dst
|
||||
local src dst branch
|
||||
src="$1"; shift
|
||||
dst="$1"; shift
|
||||
branch="${1-}"
|
||||
|
||||
[ -n "$git_installed" ] || {
|
||||
apt_get_install git ca-certificates
|
||||
@ -35,12 +36,12 @@ clone_repo()
|
||||
;;
|
||||
esac
|
||||
|
||||
git clone --depth=1 "$src" "$dst"
|
||||
git clone --depth=1 ${branch:+--branch $branch} "$src" "$dst"
|
||||
}
|
||||
|
||||
case "$KHEADERS" in
|
||||
*/*)
|
||||
clone_repo https://github.com/"$KHEADERS" kernel
|
||||
clone_repo https://github.com/"$KHEADERS" kernel ${KBRANCH-}
|
||||
apt_get_install $common_packages
|
||||
$sudo make -C kernel headers_install INSTALL_HDR_PATH=/opt/kernel
|
||||
$sudo rm -rf kernel
|
||||
@ -90,6 +91,15 @@ case "$CC" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${STACKTRACE-}" in
|
||||
libdw)
|
||||
apt_get_install libdw-dev
|
||||
;;
|
||||
libunwind)
|
||||
apt_get_install libunwind8-dev
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${CHECK-}" in
|
||||
coverage)
|
||||
apt_get_install lcov
|
||||
|
@ -24,6 +24,15 @@ case "${TARGET-}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${STACKTRACE-}" in
|
||||
libdw|libunwind)
|
||||
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-$STACKTRACE"
|
||||
;;
|
||||
no)
|
||||
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --disable-stacktrace"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$KHEADERS" in
|
||||
*/*)
|
||||
CPPFLAGS='-isystem /opt/kernel/include'
|
||||
|
226
configure.ac
226
configure.ac
@ -46,9 +46,9 @@ 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 '+%a %b %d %Y')"
|
||||
RPM_CHANGELOGTIME="$(LC_TIME=C date -u '+%a %b %d %Y')"
|
||||
AC_SUBST(RPM_CHANGELOGTIME)
|
||||
DEB_CHANGELOGTIME="$(LC_TIME=C date -R)"
|
||||
DEB_CHANGELOGTIME="$(LC_TIME=C date -u -R)"
|
||||
AC_SUBST(DEB_CHANGELOGTIME)
|
||||
|
||||
AC_PROG_CC
|
||||
@ -322,7 +322,9 @@ AC_CHECK_TYPES(m4_normalize([
|
||||
struct flock,
|
||||
struct flock64,
|
||||
struct __kernel_flock,
|
||||
struct __kernel_flock64
|
||||
struct __kernel_flock64,
|
||||
struct f_owner_ex,
|
||||
struct __kernel_f_owner_ex
|
||||
]),,,
|
||||
[#include <sys/types.h>
|
||||
#include <linux/fcntl.h>])
|
||||
@ -382,7 +384,6 @@ AC_CHECK_HEADERS(m4_normalize([
|
||||
asm/cachectl.h
|
||||
asm/guarded_storage.h
|
||||
asm/sysmips.h
|
||||
bluetooth/bluetooth.h
|
||||
elf.h
|
||||
iconv.h
|
||||
inttypes.h
|
||||
@ -465,10 +466,20 @@ AC_CHECK_HEADERS([linux/input.h], [
|
||||
])
|
||||
|
||||
AC_CHECK_HEADERS([linux/bpf.h], [
|
||||
AC_CHECK_TYPES([struct bpf_insn],,, [#include <linux/bpf.h>])
|
||||
AC_CHECK_TYPES(m4_normalize([
|
||||
struct bpf_insn,
|
||||
struct bpf_map_info,
|
||||
struct bpf_prog_info
|
||||
]),,, [#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([
|
||||
struct br_mdb_entry,
|
||||
struct br_port_msg
|
||||
@ -485,7 +496,8 @@ AC_CHECK_TYPES([struct netconfmsg],,, [#include <linux/netconf.h>])
|
||||
AC_CHECK_TYPES(m4_normalize([
|
||||
struct rta_mfc_stats,
|
||||
struct rtvia
|
||||
]),,, [#include <linux/rtnetlink.h>])
|
||||
]),,, [#include <sys/socket.h>
|
||||
#include <linux/rtnetlink.h>])
|
||||
|
||||
AC_CHECK_MEMBERS([struct ndt_stats.ndts_table_fulls],,, [#include <linux/neighbour.h>])
|
||||
AC_CHECK_TYPES(m4_normalize([
|
||||
@ -495,13 +507,23 @@ 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 <linux/if_link.h>])
|
||||
]),,, [#include <sys/socket.h>
|
||||
#include <linux/rtnetlink.h>])
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
struct rtnl_link_stats.rx_nohandler,
|
||||
struct rtnl_link_stats64.rx_nohandler
|
||||
]),,, [#include <linux/if_link.h>])
|
||||
]),,, [#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>])
|
||||
|
||||
AC_CHECK_TYPES(m4_normalize([
|
||||
struct gnet_stats_basic,
|
||||
@ -510,9 +532,15 @@ AC_CHECK_TYPES(m4_normalize([
|
||||
struct gnet_stats_rate_est64
|
||||
]),,, [#include <linux/gen_stats.h>])
|
||||
|
||||
AC_CHECK_TYPES([struct tc_sizespec],,, [#include <linux/pkt_sched.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 fib_rule_uid_range],,, [#include <linux/fib_rules.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 statfs], [
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
@ -552,6 +580,11 @@ AC_CHECK_TYPES(m4_normalize([
|
||||
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,
|
||||
@ -797,13 +830,31 @@ fi
|
||||
|
||||
AC_CACHE_CHECK([for static_assert], [st_cv_have_static_assert],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]],
|
||||
[[static_assert(1,"")]])],
|
||||
[[static_assert(1,"")]]
|
||||
)
|
||||
],
|
||||
[st_cv_have_static_assert=yes],
|
||||
[st_cv_have_static_assert=no])])
|
||||
if test "x$st_cv_have_static_assert" = xyes; then
|
||||
AC_DEFINE([HAVE_STATIC_ASSERT], [1],
|
||||
[Define to 1 if the system provides static_assert])
|
||||
fi
|
||||
[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
|
||||
@ -844,148 +895,7 @@ AC_PATH_PROG([PERL], [perl])
|
||||
|
||||
AC_CHECK_TOOL([READELF], [readelf])
|
||||
|
||||
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])
|
||||
|
||||
dnl demangling symbols in the stack trace
|
||||
libiberty_CPPFLAGS=
|
||||
libiberty_LDFLAGS=
|
||||
libiberty_LIBS=
|
||||
AC_ARG_WITH([libiberty],
|
||||
[AS_HELP_STRING([--with-libiberty],
|
||||
[use libiberty to demangle symbols in stack trace])],
|
||||
[case "${withval}" in
|
||||
yes|no|check) ;;
|
||||
*) with_libiberty=yes
|
||||
libiberty_CPPFLAGS="-I${withval}/include"
|
||||
libiberty_LDFLAGS="-L${withval}/lib" ;;
|
||||
esac],
|
||||
[with_libiberty=check]
|
||||
)
|
||||
|
||||
use_libiberty=no
|
||||
AS_IF([test "x$use_libunwind" = xyes && test "x$with_libiberty" != xno],
|
||||
[saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $libiberty_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([demangle.h libiberty/demangle.h],
|
||||
[saved_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $libiberty_LDFLAGS"
|
||||
AC_CHECK_LIB([iberty],[cplus_demangle],
|
||||
[libiberty_LIBS="-liberty"
|
||||
use_libiberty=yes
|
||||
],
|
||||
[if test "x$with_libiberty" != xcheck; then
|
||||
AC_MSG_FAILURE([failed to find cplus_demangle in libiberty])
|
||||
fi
|
||||
]
|
||||
)
|
||||
LDFLAGS="$saved_LDFLAGS"
|
||||
],
|
||||
[if test "x$with_libiberty" != xcheck; then
|
||||
AC_MSG_FAILURE([failed to find demangle.h])
|
||||
fi
|
||||
]
|
||||
)
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
]
|
||||
)
|
||||
|
||||
dnl enable libiberty
|
||||
AC_MSG_CHECKING([whether to enable demangling symbols in stack trace])
|
||||
if test "x$use_libiberty" = xyes; then
|
||||
AC_DEFINE([USE_DEMANGLE], 1, [Do demangling symbols in stack trace])
|
||||
AC_SUBST(libiberty_LIBS)
|
||||
AC_SUBST(libiberty_LDFLAGS)
|
||||
AC_SUBST(libiberty_CPPFLAGS)
|
||||
fi
|
||||
AM_CONDITIONAL([USE_DEMANGLE], [test "x$use_libiberty" = xyes])
|
||||
AC_MSG_RESULT([$use_libiberty])
|
||||
st_STACKTRACE
|
||||
|
||||
if test "$arch" = mips && test "$no_create" != yes; then
|
||||
mkdir -p linux/mips
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
: ${YEAR_FILE:=$1}
|
||||
: ${DEFAULT_YEAR:=$2}
|
||||
LC_TIME=C; export LC_TIME
|
||||
|
||||
year=
|
||||
|
||||
@ -13,11 +14,17 @@ year=
|
||||
[ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")"
|
||||
|
||||
[ -n "${year}" ] ||
|
||||
year="$(date +%Y -d "$(git show --format=format:%cD --no-patch)")"
|
||||
year="$(date -u +%Y -d "$(git show --format=format:%cD --no-patch)")"
|
||||
|
||||
[ -n "${year}" ] || year="${DEFAULT_YEAR}"
|
||||
[ -n "${year}" ] ||
|
||||
year="${DEFAULT_YEAR}"
|
||||
|
||||
[ -n "${year}" ] || year="$(date "+%Y")"
|
||||
[ -n "${year}" ] ||
|
||||
[ -z "${SOURCE_DATE_EPOCH-}" ] ||
|
||||
year="$(date -u +%Y -d "@${SOURCE_DATE_EPOCH}")"
|
||||
|
||||
[ -n "${year}" ] ||
|
||||
year="$(date -u +%Y)"
|
||||
|
||||
[ -n "${year}" ] || {
|
||||
echo >&2 'Undefined year.'
|
||||
|
6
debian/changelog.in
vendored
6
debian/changelog.in
vendored
@ -4,6 +4,12 @@ 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.
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -2,7 +2,7 @@ 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 s390 sparc sparc64 x32], debhelper (>= 7.0.0), gawk, libunwind-dev [amd64], libiberty-dev [amd64], libbluetooth-dev
|
||||
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
|
||||
Homepage: https://strace.io
|
||||
Vcs-Git: https://salsa.debian.org/debian/strace.git
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -61,7 +61,7 @@ build/Makefile: configure
|
||||
build-udeb/Makefile: configure
|
||||
mkdir -p $(@D)
|
||||
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr \
|
||||
--without-libunwind --without-libiberty $(CONFIG_OPTS)
|
||||
--without-stacktrace --without-libiberty $(CONFIG_OPTS)
|
||||
|
||||
build64/Makefile: configure
|
||||
mkdir -p $(@D)
|
||||
|
487
defs.h
487
defs.h
@ -166,6 +166,12 @@ extern char *stpcpy(char *dst, const char *src);
|
||||
# define HAVE_PERSONALITY_2_MPERS 0
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define is_bigendian true
|
||||
#else
|
||||
# define is_bigendian false
|
||||
#endif
|
||||
|
||||
typedef struct ioctlent {
|
||||
const char *symbol;
|
||||
unsigned int code;
|
||||
@ -176,12 +182,22 @@ typedef struct ioctlent {
|
||||
#define INJECT_F_RETVAL 0x04
|
||||
#define INJECT_F_DELAY_ENTER 0x08
|
||||
#define INJECT_F_DELAY_EXIT 0x10
|
||||
#define INJECT_F_SYSCALL 0x20
|
||||
|
||||
#define INJECT_ACTION_FLAGS \
|
||||
(INJECT_F_SIGNAL \
|
||||
|INJECT_F_ERROR \
|
||||
|INJECT_F_RETVAL \
|
||||
|INJECT_F_DELAY_ENTER \
|
||||
|INJECT_F_DELAY_EXIT \
|
||||
)
|
||||
|
||||
struct inject_data {
|
||||
uint8_t flags; /* 5 of 8 flags are used so far */
|
||||
uint8_t flags; /* 6 of 8 flags are used so far */
|
||||
uint8_t signo; /* NSIG <= 128 */
|
||||
uint16_t rval_idx; /* index in retval_vec */
|
||||
uint16_t delay_idx; /* index in delay_data_vec */
|
||||
uint16_t scno; /* syscall to be injected instead of -1 */
|
||||
};
|
||||
|
||||
struct inject_opts {
|
||||
@ -219,10 +235,8 @@ struct tcb {
|
||||
struct timespec delay_expiration_time; /* When does the delay end */
|
||||
|
||||
struct mmap_cache_t *mmap_cache;
|
||||
unsigned int mmap_cache_size;
|
||||
unsigned int mmap_cache_generation;
|
||||
|
||||
#ifdef USE_LIBUNWIND
|
||||
#ifdef ENABLE_STACKTRACE
|
||||
void *unwind_ctx;
|
||||
struct unwind_queue_t *unwind_queue;
|
||||
#endif
|
||||
@ -257,6 +271,8 @@ struct tcb {
|
||||
#define TCB_INJECT_DELAY_EXIT 0x800 /* Current syscall needs to be delayed
|
||||
on exit */
|
||||
#define TCB_DELAYED 0x1000 /* Current syscall has been delayed */
|
||||
#define TCB_TAMPERED_NO_FAIL 0x2000 /* We tamper tcb with syscall
|
||||
that should not fail. */
|
||||
|
||||
/* qualifier flags */
|
||||
#define QUAL_TRACE 0x001 /* this system call should be traced */
|
||||
@ -281,24 +297,38 @@ struct tcb {
|
||||
#define recovering(tcp) ((tcp)->flags & TCB_RECOVERING)
|
||||
#define inject_delay_exit(tcp) ((tcp)->flags & TCB_INJECT_DELAY_EXIT)
|
||||
#define syscall_delayed(tcp) ((tcp)->flags & TCB_DELAYED)
|
||||
#define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL)
|
||||
|
||||
#include "xlat.h"
|
||||
|
||||
extern const struct xlat addrfams[];
|
||||
|
||||
/** Protocol hardware identifiers array, sorted, defined in sockaddr.c. */
|
||||
extern const struct xlat arp_hardware_types[];
|
||||
/** Protocol hardware identifiers array size without terminating record. */
|
||||
extern const size_t arp_hardware_types_size;
|
||||
|
||||
extern const struct xlat at_flags[];
|
||||
extern const struct xlat clocknames[];
|
||||
extern const struct xlat dirent_types[];
|
||||
|
||||
/** Ethernet protocols list, sorted and unterminated, defined in sockaddr.c. */
|
||||
/** Ethernet protocols list, sorted, defined in sockaddr.c. */
|
||||
extern const struct xlat ethernet_protocols[];
|
||||
/** Ethernet protocols array size without terminating record. */
|
||||
extern const size_t ethernet_protocols_size;
|
||||
|
||||
extern const struct xlat evdev_abs[];
|
||||
extern const struct xlat iffflags[];
|
||||
/** IP protocols list, sorted, defined in net.c. */
|
||||
extern const struct xlat inet_protocols[];
|
||||
/** IP protocols array size without terminating record. */
|
||||
extern const size_t inet_protocols_size;
|
||||
|
||||
extern const struct xlat evdev_abs[];
|
||||
/** Number of elements in evdev_abs array without the terminating record. */
|
||||
extern const size_t evdev_abs_size;
|
||||
|
||||
extern const struct xlat iffflags[];
|
||||
extern const struct xlat ip_type_of_services[];
|
||||
extern const struct xlat ipc_private[];
|
||||
extern const struct xlat msg_flags[];
|
||||
extern const struct xlat netlink_protocols[];
|
||||
extern const struct xlat nl_netfilter_msg_types[];
|
||||
@ -377,7 +407,7 @@ extern struct path_set {
|
||||
#define tracing_paths (global_path_set.num_selected != 0)
|
||||
extern unsigned xflag;
|
||||
extern unsigned followfork;
|
||||
#ifdef USE_LIBUNWIND
|
||||
#ifdef ENABLE_STACKTRACE
|
||||
/* if this is true do the stack trace for every system call */
|
||||
extern bool stack_trace_enabled;
|
||||
#endif
|
||||
@ -456,43 +486,90 @@ static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val)
|
||||
return set_tcb_priv_data(tcp, (void *) val, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 0 on success, -1 on error.
|
||||
*/
|
||||
extern int
|
||||
umoven(struct tcb *, kernel_ulong_t addr, unsigned int len, void *laddr);
|
||||
#define umove(pid, addr, objp) \
|
||||
umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
|
||||
/**
|
||||
* @return true on success, false on error.
|
||||
*/
|
||||
extern bool
|
||||
tfetch_mem64(struct tcb *, uint64_t addr, unsigned int len, void *laddr);
|
||||
|
||||
static inline bool
|
||||
tfetch_mem(struct tcb *tcp, const kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr)
|
||||
{
|
||||
return tfetch_mem64(tcp, addr, len, laddr);
|
||||
}
|
||||
#define tfetch_obj(pid, addr, objp) \
|
||||
tfetch_mem((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
|
||||
/**
|
||||
* @return true on success, false on error.
|
||||
*/
|
||||
extern bool
|
||||
tfetch_mem64_ignore_syserror(struct tcb *, uint64_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
|
||||
static inline bool
|
||||
tfetch_mem_ignore_syserror(struct tcb *tcp, const kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr)
|
||||
{
|
||||
return tfetch_mem64_ignore_syserror(tcp, addr, len, laddr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 0 on success, -1 on error (and print addr).
|
||||
*/
|
||||
extern int
|
||||
umoven_or_printaddr(struct tcb *, kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
umoven_or_printaddr64(struct tcb *, uint64_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
#define umove_or_printaddr64(pid, addr, objp) \
|
||||
umoven_or_printaddr64((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
|
||||
static inline int
|
||||
umoven_or_printaddr(struct tcb *tcp, const kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr)
|
||||
{
|
||||
return umoven_or_printaddr64(tcp, addr, len, laddr);
|
||||
}
|
||||
#define umove_or_printaddr(pid, addr, objp) \
|
||||
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
|
||||
/**
|
||||
* @return 0 on success, -1 on error (and print addr).
|
||||
*/
|
||||
extern int
|
||||
umoven_or_printaddr_ignore_syserror(struct tcb *, kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
umoven_or_printaddr64_ignore_syserror(struct tcb *, uint64_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
#define umove_or_printaddr64_ignore_syserror(pid, addr, objp) \
|
||||
umoven_or_printaddr64_ignore_syserror((pid), (addr), sizeof(*(objp)), \
|
||||
(void *) (objp))
|
||||
|
||||
static inline int
|
||||
umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr)
|
||||
{
|
||||
return umoven_or_printaddr64_ignore_syserror(tcp, addr, len, laddr);
|
||||
}
|
||||
#define umove_or_printaddr_ignore_syserror(pid, addr, objp) \
|
||||
umoven_or_printaddr_ignore_syserror((pid), (addr), sizeof(*(objp)), \
|
||||
(void *) (objp))
|
||||
|
||||
/**
|
||||
* @return strlen + 1 on success, 0 on success and no NUL seen, -1 on error.
|
||||
*/
|
||||
extern int
|
||||
umovestr(struct tcb *, kernel_ulong_t addr, unsigned int len, char *laddr);
|
||||
|
||||
extern int upeek(struct tcb *tcp, unsigned long, kernel_ulong_t *);
|
||||
extern int upoke(struct tcb *tcp, unsigned long, kernel_ulong_t);
|
||||
|
||||
extern bool
|
||||
print_array(struct tcb *,
|
||||
kernel_ulong_t start_addr,
|
||||
size_t nmemb,
|
||||
void *elem_buf,
|
||||
size_t elem_size,
|
||||
int (*umoven_func)(struct tcb *,
|
||||
kernel_ulong_t,
|
||||
unsigned int,
|
||||
void *),
|
||||
bool (*print_func)(struct tcb *,
|
||||
void *elem_buf,
|
||||
size_t elem_size,
|
||||
void *opaque_data),
|
||||
void *opaque_data);
|
||||
|
||||
#if HAVE_ARCH_GETRVAL2
|
||||
extern long getrval2(struct tcb *);
|
||||
#endif
|
||||
@ -500,16 +577,26 @@ extern long getrval2(struct tcb *);
|
||||
extern const char *signame(const int);
|
||||
extern void pathtrace_select_set(const char *, struct path_set *);
|
||||
extern bool pathtrace_match_set(struct tcb *, struct path_set *);
|
||||
#define pathtrace_select(tcp) \
|
||||
pathtrace_select_set(tcp, &global_path_set)
|
||||
#define pathtrace_match(tcp) \
|
||||
pathtrace_match_set(tcp, &global_path_set)
|
||||
|
||||
static inline void
|
||||
pathtrace_select(const char *path)
|
||||
{
|
||||
return pathtrace_select_set(path, &global_path_set);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
pathtrace_match(struct tcb *tcp)
|
||||
{
|
||||
return pathtrace_match_set(tcp, &global_path_set);
|
||||
}
|
||||
|
||||
extern int getfdpath(struct tcb *, int, char *, unsigned);
|
||||
extern unsigned long getfdinode(struct tcb *, int);
|
||||
extern enum sock_proto getfdproto(struct tcb *, int);
|
||||
|
||||
extern const char *xlookup(const struct xlat *, const uint64_t);
|
||||
extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t);
|
||||
extern const char *xlat_idx(const struct xlat *xlat, size_t nmemb, uint64_t val);
|
||||
|
||||
struct dyxlat;
|
||||
struct dyxlat *dyxlat_alloc(size_t nmemb);
|
||||
@ -564,11 +651,36 @@ extern int printllval(struct tcb *, const char *, int)
|
||||
ATTRIBUTE_FORMAT((printf, 2, 0));
|
||||
|
||||
extern void printaddr64(uint64_t addr);
|
||||
extern void printaddr(kernel_ulong_t addr);
|
||||
extern int printxvals(const uint64_t, const char *, const struct xlat *, ...)
|
||||
|
||||
static inline void
|
||||
printaddr(const kernel_ulong_t addr)
|
||||
{
|
||||
printaddr64(addr);
|
||||
}
|
||||
|
||||
#define xlat_verbose(style_) ((style_) & XLAT_STYLE_VERBOSITY_MASK)
|
||||
#define xlat_format(style_) ((style_) & XLAT_STYLE_FORMAT_MASK)
|
||||
|
||||
extern enum xlat_style xlat_verbosity;
|
||||
|
||||
extern int printxvals_ex(uint64_t val, const char *dflt,
|
||||
enum xlat_style, const struct xlat *, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
extern int printxval_searchn(const struct xlat *xlat, size_t xlat_size,
|
||||
uint64_t val, const char *dflt);
|
||||
#define printxvals(val_, dflt_, ...) \
|
||||
printxvals_ex((val_), (dflt_), XLAT_STYLE_DEFAULT, __VA_ARGS__)
|
||||
|
||||
extern int printxval_searchn_ex(const struct xlat *, size_t xlat_size,
|
||||
uint64_t val, const char *dflt,
|
||||
enum xlat_style);
|
||||
|
||||
static inline int
|
||||
printxval_searchn(const struct xlat *xlat, size_t xlat_size, uint64_t val,
|
||||
const char *dflt)
|
||||
{
|
||||
return printxval_searchn_ex(xlat, xlat_size, val, dflt,
|
||||
XLAT_STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper around printxval_searchn that passes ARRAY_SIZE - 1
|
||||
* as the array size, as all arrays are XLAT_END-terminated and
|
||||
@ -576,24 +688,148 @@ extern int printxval_searchn(const struct xlat *xlat, size_t xlat_size,
|
||||
*/
|
||||
#define printxval_search(xlat__, val__, dflt__) \
|
||||
printxval_searchn(xlat__, ARRAY_SIZE(xlat__) - 1, val__, dflt__)
|
||||
extern int sprintxval(char *buf, size_t size, const struct xlat *,
|
||||
unsigned int val, const char *dflt);
|
||||
#define printxval_search_ex(xlat__, val__, dflt__) \
|
||||
printxval_searchn_ex((xlat__), ARRAY_SIZE(xlat__) - 1, (val__), \
|
||||
(dflt__), XLAT_STYLE_DEFAULT)
|
||||
|
||||
extern int printxval_indexn_ex(const struct xlat *, size_t xlat_size,
|
||||
uint64_t val, const char *dflt, enum xlat_style);
|
||||
|
||||
static inline int
|
||||
printxval_indexn(const struct xlat *xlat, size_t xlat_size, uint64_t val,
|
||||
const char *dflt)
|
||||
{
|
||||
return printxval_indexn_ex(xlat, xlat_size, val, dflt,
|
||||
XLAT_STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
#define printxval_index(xlat__, val__, dflt__) \
|
||||
printxval_indexn(xlat__, ARRAY_SIZE(xlat__) - 1, val__, dflt__)
|
||||
#define printxval_index_ex(xlat__, val__, dflt__) \
|
||||
printxval_indexn_ex((xlat__), ARRAY_SIZE(xlat__) - 1, (val__), \
|
||||
(dflt__), XLAT_STYLE_DEFAULT)
|
||||
|
||||
extern int sprintxval_ex(char *buf, size_t size, const struct xlat *,
|
||||
unsigned int val, const char *dflt, enum xlat_style);
|
||||
|
||||
static inline int
|
||||
sprintxval(char *buf, size_t size, const struct xlat *xlat, unsigned int val,
|
||||
const char *dflt)
|
||||
{
|
||||
return sprintxval_ex(buf, size, xlat, val, dflt, XLAT_STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
extern void printxval_dispatch_ex(const struct xlat *, size_t xlat_size,
|
||||
uint64_t val, const char *dflt,
|
||||
enum xlat_type, enum xlat_style);
|
||||
static inline void
|
||||
printxval_dispatch(const struct xlat *xlat, size_t xlat_size, uint64_t val,
|
||||
const char *dflt, enum xlat_type xt)
|
||||
{
|
||||
return printxval_dispatch_ex(xlat, xlat_size, val, dflt, xt,
|
||||
XLAT_STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
/** Print a value in accordance with xlat formatting settings. */
|
||||
extern void print_xlat_ex(uint64_t val, const char *str, enum xlat_style style);
|
||||
#define print_xlat(val_) \
|
||||
print_xlat_ex((val_), #val_, XLAT_STYLE_DEFAULT)
|
||||
#define print_xlat32(val_) \
|
||||
print_xlat_ex((uint32_t) (val_), #val_, XLAT_STYLE_DEFAULT)
|
||||
#define print_xlat_u(val_) \
|
||||
print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_U)
|
||||
#define print_xlat_d(val_) \
|
||||
print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_D)
|
||||
|
||||
extern int printargs(struct tcb *);
|
||||
extern int printargs_u(struct tcb *);
|
||||
extern int printargs_d(struct tcb *);
|
||||
|
||||
extern int printflags_ex(uint64_t, const char *, const struct xlat *, ...)
|
||||
extern int printflags_ex(uint64_t flags, const char *dflt,
|
||||
enum xlat_style, const struct xlat *, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
extern const char *sprintflags(const char *, const struct xlat *, uint64_t);
|
||||
extern const char *sprintflags_ex(const char *prefix, const struct xlat *,
|
||||
uint64_t flags, enum xlat_style);
|
||||
|
||||
static inline const char *
|
||||
sprintflags(const char *prefix, const struct xlat *xlat, uint64_t flags)
|
||||
{
|
||||
return sprintflags_ex(prefix, xlat, flags, XLAT_STYLE_DEFAULT);
|
||||
}
|
||||
|
||||
extern const char *sprinttime(long long sec);
|
||||
extern const char *sprinttime_nsec(long long sec, unsigned long long nsec);
|
||||
extern const char *sprinttime_usec(long long sec, unsigned long long usec);
|
||||
|
||||
extern const char *sprint_mac_addr(const uint8_t addr[], size_t size);
|
||||
|
||||
extern void print_symbolic_mode_t(unsigned int);
|
||||
extern void print_numeric_umode_t(unsigned short);
|
||||
extern void print_numeric_long_umask(unsigned long);
|
||||
extern void print_dev_t(unsigned long long dev);
|
||||
extern void print_abnormal_hi(kernel_ulong_t);
|
||||
|
||||
extern bool print_int32_array_member(struct tcb *, void *elem_buf,
|
||||
size_t elem_size, void *data);
|
||||
extern bool print_uint32_array_member(struct tcb *, void *elem_buf,
|
||||
size_t elem_size, void *data);
|
||||
extern bool print_uint64_array_member(struct tcb *, void *elem_buf,
|
||||
size_t elem_size, void *data);
|
||||
|
||||
typedef bool (*tfetch_mem_fn)(struct tcb *, kernel_ulong_t addr,
|
||||
unsigned int size, void *dest);
|
||||
typedef bool (*print_fn)(struct tcb *, void *elem_buf,
|
||||
size_t elem_size, void *opaque_data);
|
||||
|
||||
enum print_array_flag_bits {
|
||||
PAF_PRINT_INDICES_BIT = XLAT_STYLE_SPEC_BITS + 1,
|
||||
PAF_INDEX_XLAT_SORTED_BIT,
|
||||
PAF_INDEX_XLAT_VALUE_INDEXED_BIT,
|
||||
};
|
||||
|
||||
#define FLAG_(name_) name_ = 1 << name_##_BIT
|
||||
|
||||
enum print_array_flags {
|
||||
FLAG_(PAF_PRINT_INDICES),
|
||||
FLAG_(PAF_INDEX_XLAT_SORTED),
|
||||
FLAG_(PAF_INDEX_XLAT_VALUE_INDEXED),
|
||||
};
|
||||
|
||||
#undef FLAG_
|
||||
|
||||
/**
|
||||
* @param flags Combination of xlat style settings and additional flags from
|
||||
* enum print_array_flags.
|
||||
*/
|
||||
extern bool
|
||||
print_array_ex(struct tcb *,
|
||||
kernel_ulong_t start_addr,
|
||||
size_t nmemb,
|
||||
void *elem_buf,
|
||||
size_t elem_size,
|
||||
tfetch_mem_fn tfetch_mem_func,
|
||||
print_fn print_func,
|
||||
void *opaque_data,
|
||||
unsigned int flags,
|
||||
const struct xlat *index_xlat,
|
||||
size_t index_xlat_size,
|
||||
const char *index_dflt);
|
||||
|
||||
static inline bool
|
||||
print_array(struct tcb *const tcp,
|
||||
const kernel_ulong_t start_addr,
|
||||
const size_t nmemb,
|
||||
void *const elem_buf,
|
||||
const size_t elem_size,
|
||||
tfetch_mem_fn tfetch_mem_func,
|
||||
print_fn print_func,
|
||||
void *const opaque_data)
|
||||
{
|
||||
return print_array_ex(tcp, start_addr, nmemb, elem_buf, elem_size,
|
||||
tfetch_mem_func, print_func, opaque_data,
|
||||
0, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
extern kernel_ulong_t *
|
||||
fetch_indirect_syscall_args(struct tcb *, kernel_ulong_t addr, unsigned int n_args);
|
||||
|
||||
@ -681,8 +917,15 @@ print_struct_statfs(struct tcb *, kernel_ulong_t addr);
|
||||
extern void
|
||||
print_struct_statfs64(struct tcb *, kernel_ulong_t addr, kernel_ulong_t size);
|
||||
|
||||
extern int
|
||||
fetch_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr);
|
||||
extern void
|
||||
print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr);
|
||||
|
||||
extern void print_ifindex(unsigned int);
|
||||
|
||||
extern void print_bpf_filter_code(const uint16_t code, bool extended);
|
||||
|
||||
extern void qualify(const char *);
|
||||
extern unsigned int qual_flags(const unsigned int);
|
||||
|
||||
@ -695,6 +938,7 @@ DECL_IOCTL(dm);
|
||||
DECL_IOCTL(evdev);
|
||||
DECL_IOCTL(file);
|
||||
DECL_IOCTL(fs_x);
|
||||
DECL_IOCTL(inotify);
|
||||
DECL_IOCTL(kvm);
|
||||
DECL_IOCTL(nsfs);
|
||||
DECL_IOCTL(ptp);
|
||||
@ -724,6 +968,10 @@ DECL_NETLINK(route);
|
||||
DECL_NETLINK(selinux);
|
||||
DECL_NETLINK(sock_diag);
|
||||
|
||||
extern void
|
||||
decode_netlink_kobject_uevent(struct tcb *, kernel_ulong_t addr,
|
||||
kernel_ulong_t len);
|
||||
|
||||
extern int ts_nz(const struct timespec *);
|
||||
extern int ts_cmp(const struct timespec *, const struct timespec *);
|
||||
extern double ts_float(const struct timespec *);
|
||||
@ -732,7 +980,7 @@ extern void ts_sub(struct timespec *, const struct timespec *, const struct time
|
||||
extern void ts_mul(struct timespec *, const struct timespec *, int);
|
||||
extern void ts_div(struct timespec *, const struct timespec *, int);
|
||||
|
||||
#ifdef USE_LIBUNWIND
|
||||
#ifdef ENABLE_STACKTRACE
|
||||
extern void unwind_init(void);
|
||||
extern void unwind_tcb_init(struct tcb *);
|
||||
extern void unwind_tcb_fin(struct tcb *);
|
||||
@ -755,7 +1003,7 @@ printstr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
static inline int
|
||||
printflags64(const struct xlat *x, uint64_t flags, const char *dflt)
|
||||
{
|
||||
return printflags_ex(flags, dflt, x, NULL);
|
||||
return printflags_ex(flags, dflt, XLAT_STYLE_DEFAULT, x, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
@ -776,6 +1024,30 @@ printxval(const struct xlat *x, const unsigned int val, const char *dflt)
|
||||
return printxvals(val, dflt, x, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
printxval64_u(const struct xlat *x, const uint64_t val, const char *dflt)
|
||||
{
|
||||
return printxvals_ex(val, dflt, XLAT_STYLE_FMT_U, x, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
printxval_u(const struct xlat *x, const unsigned int val, const char *dflt)
|
||||
{
|
||||
return printxvals_ex(val, dflt, XLAT_STYLE_FMT_U, x, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
printxval64_d(const struct xlat *x, const int64_t val, const char *dflt)
|
||||
{
|
||||
return printxvals_ex(val, dflt, XLAT_STYLE_FMT_D, x, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
printxval_d(const struct xlat *x, const int val, const char *dflt)
|
||||
{
|
||||
return printxvals_ex(val, dflt, XLAT_STYLE_FMT_D, x, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
|
||||
enum iov_decode decode_iov)
|
||||
@ -840,6 +1112,19 @@ extern void tprints(const char *str);
|
||||
extern void tprintf_comment(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
|
||||
extern void tprints_comment(const char *str);
|
||||
|
||||
static inline void
|
||||
printaddr_comment(const kernel_ulong_t addr)
|
||||
{
|
||||
tprintf_comment("%#llx", (unsigned long long) addr);
|
||||
}
|
||||
|
||||
static inline void
|
||||
print_mac_addr(const char *prefix, const uint8_t addr[], size_t size)
|
||||
{
|
||||
tprints(prefix);
|
||||
tprints(sprint_mac_addr(addr, size));
|
||||
}
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
extern void set_personality(unsigned int personality);
|
||||
extern unsigned current_personality;
|
||||
@ -925,39 +1210,94 @@ printnum_long_int(struct tcb *, kernel_ulong_t addr,
|
||||
const char *fmt_long, const char *fmt_int)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0))
|
||||
ATTRIBUTE_FORMAT((printf, 4, 0));
|
||||
|
||||
extern bool printnum_addr_long_int(struct tcb *, kernel_ulong_t addr);
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRId64, "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRIu64, "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_long_int((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_slong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_long_int(tcp, addr, "%" PRId64, "%d");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ulong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_long_int(tcp, addr, "%" PRIu64, "%u");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_long_int(tcp, addr);
|
||||
}
|
||||
|
||||
#elif current_wordsize > 4
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRId64)
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRIu64)
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_int64((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_slong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_int64(tcp, addr, "%" PRId64);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ulong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_int64(tcp, addr, "%" PRIu64);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_int64(tcp, addr);
|
||||
}
|
||||
|
||||
#else /* current_wordsize == 4 */
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_int((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_slong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_int(tcp, addr, "%d");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ulong(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_int(tcp, addr, "%u");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_int(tcp, addr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef current_klongsize
|
||||
extern bool printnum_addr_klong_int(struct tcb *, kernel_ulong_t addr);
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_klong_int((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_klong_int(tcp, addr);
|
||||
}
|
||||
|
||||
#elif current_klongsize > 4
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_int64((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_int64(tcp, addr);
|
||||
}
|
||||
|
||||
#else /* current_klongsize == 4 */
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_int((tcp), (addr))
|
||||
|
||||
static inline bool
|
||||
printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
return printnum_addr_int(tcp, addr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define DECL_PRINTPAIR(name) \
|
||||
@ -1021,28 +1361,27 @@ truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
|
||||
sizeof(v) == sizeof(long) ? (long long) (long) (v) : \
|
||||
(long long) (v))
|
||||
|
||||
extern const char *const errnoent[];
|
||||
extern const char *const signalent[];
|
||||
extern const unsigned int nerrnos;
|
||||
extern const unsigned int nsignals;
|
||||
|
||||
extern const struct_sysent sysent0[];
|
||||
extern const char *const errnoent0[];
|
||||
extern const char *const signalent0[];
|
||||
extern const struct_ioctlent ioctlent0[];
|
||||
|
||||
extern const char *const personality_names[];
|
||||
/* Personality designators to be used for specifying personality */
|
||||
extern const char *const personality_designators[];
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
extern const struct_sysent *sysent;
|
||||
extern const char *const *errnoent;
|
||||
extern const char *const *signalent;
|
||||
extern const struct_ioctlent *ioctlent;
|
||||
#else
|
||||
# define sysent sysent0
|
||||
# define errnoent errnoent0
|
||||
# define signalent signalent0
|
||||
# define ioctlent ioctlent0
|
||||
#endif
|
||||
|
||||
extern unsigned nsyscalls;
|
||||
extern unsigned nerrnos;
|
||||
extern unsigned nsignals;
|
||||
extern unsigned nioctlents;
|
||||
|
||||
extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES];
|
||||
|
2
dm.c
2
dm.c
@ -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),
|
||||
umoven_or_printaddr, dm_print_dev, NULL);
|
||||
tfetch_mem, dm_print_dev, NULL);
|
||||
|
||||
tprints("}");
|
||||
|
||||
|
4
epoll.c
4
epoll.c
@ -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-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 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),
|
||||
umoven_or_printaddr, print_epoll_event, 0);
|
||||
tfetch_mem, print_epoll_event, 0);
|
||||
tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -90,6 +90,7 @@ error_msg_and_die(const char *fmt, ...)
|
||||
va_list p;
|
||||
va_start(p, fmt);
|
||||
verror_msg(0, fmt, p);
|
||||
va_end(p);
|
||||
die();
|
||||
}
|
||||
|
||||
@ -100,6 +101,7 @@ 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);
|
||||
@ -121,5 +123,6 @@ perror_msg_and_die(const char *fmt, ...)
|
||||
va_list p;
|
||||
va_start(p, fmt);
|
||||
verror_msg(errno, fmt, p);
|
||||
va_end(p);
|
||||
die();
|
||||
}
|
||||
|
59
evdev.c
59
evdev.c
@ -29,6 +29,8 @@
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include "xlat/evdev_abs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
|
||||
# include <linux/ioctl.h>
|
||||
@ -51,6 +53,8 @@
|
||||
# define SYN_MAX 0xf
|
||||
# endif
|
||||
|
||||
const size_t evdev_abs_size = ARRAY_SIZE(evdev_abs) - 1;
|
||||
|
||||
static int
|
||||
abs_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
@ -94,7 +98,7 @@ keycode_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
|
||||
if (!umove_or_printaddr(tcp, arg, &keycode)) {
|
||||
tprintf("[%u, ", keycode[0]);
|
||||
printxval(evdev_keycode, keycode[1], "KEY_???");
|
||||
printxval_index(evdev_keycode, keycode[1], "KEY_???");
|
||||
tprints("]");
|
||||
}
|
||||
|
||||
@ -121,7 +125,7 @@ keycode_V2_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
unsigned int i;
|
||||
|
||||
tprintf("index=%" PRIu16 ", keycode=", ike.index);
|
||||
printxval(evdev_keycode, ike.keycode, "KEY_???");
|
||||
printxval_index(evdev_keycode, ike.keycode, "KEY_???");
|
||||
tprints(", scancode=[");
|
||||
for (i = 0; i < ARRAY_SIZE(ike.scancode); i++) {
|
||||
if (i > 0)
|
||||
@ -160,9 +164,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)
|
||||
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)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -183,7 +187,7 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
if (i < 0) {
|
||||
tprints(" 0 ");
|
||||
} else {
|
||||
printxval(decode_nr, i, dflt);
|
||||
printxval_dispatch(decode_nr, decode_nr_size, i, dflt, xt);
|
||||
|
||||
while ((i = next_set_bit(decoded_arg, i + 1, size)) > 0) {
|
||||
if (abbrev(tcp) && bit_displayed >= 3) {
|
||||
@ -191,7 +195,8 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
break;
|
||||
}
|
||||
tprints(", ");
|
||||
printxval(decode_nr, i, dflt);
|
||||
printxval_dispatch(decode_nr, decode_nr_size, i, dflt,
|
||||
xt);
|
||||
bit_displayed++;
|
||||
}
|
||||
}
|
||||
@ -201,6 +206,10 @@ 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,
|
||||
@ -251,43 +260,42 @@ 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_???");
|
||||
SYN_MAX, "SYN_???", XT_INDEXED);
|
||||
case EV_KEY:
|
||||
return decode_bitset(tcp, arg, evdev_keycode,
|
||||
KEY_MAX, "KEY_???");
|
||||
KEY_MAX, "KEY_???", XT_INDEXED);
|
||||
case EV_REL:
|
||||
return decode_bitset(tcp, arg, evdev_relative_axes,
|
||||
REL_MAX, "REL_???");
|
||||
REL_MAX, "REL_???", XT_INDEXED);
|
||||
case EV_ABS:
|
||||
return decode_bitset(tcp, arg, evdev_abs,
|
||||
ABS_MAX, "ABS_???");
|
||||
ABS_MAX, "ABS_???", XT_INDEXED);
|
||||
case EV_MSC:
|
||||
return decode_bitset(tcp, arg, evdev_misc,
|
||||
MSC_MAX, "MSC_???");
|
||||
# ifdef EV_SW
|
||||
MSC_MAX, "MSC_???", XT_INDEXED);
|
||||
case EV_SW:
|
||||
return decode_bitset(tcp, arg, evdev_switch,
|
||||
SW_MAX, "SW_???");
|
||||
# endif
|
||||
SW_MAX, "SW_???", XT_INDEXED);
|
||||
case EV_LED:
|
||||
return decode_bitset(tcp, arg, evdev_leds,
|
||||
LED_MAX, "LED_???");
|
||||
LED_MAX, "LED_???", XT_INDEXED);
|
||||
case EV_SND:
|
||||
return decode_bitset(tcp, arg, evdev_snd,
|
||||
SND_MAX, "SND_???");
|
||||
SND_MAX, "SND_???", XT_INDEXED);
|
||||
case EV_REP:
|
||||
return decode_bitset(tcp, arg, evdev_autorepeat,
|
||||
REP_MAX, "REP_???");
|
||||
REP_MAX, "REP_???", XT_INDEXED);
|
||||
case EV_FF:
|
||||
return decode_bitset(tcp, arg, evdev_ff_types,
|
||||
FF_MAX, "FF_???");
|
||||
FF_MAX, "FF_???", XT_SORTED);
|
||||
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_???");
|
||||
FF_STATUS_MAX, "FF_STATUS_???",
|
||||
XT_INDEXED);
|
||||
default:
|
||||
tprints(", ");
|
||||
printaddr(arg);
|
||||
@ -341,22 +349,23 @@ 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_???");
|
||||
INPUT_PROP_MAX, "PROP_???",
|
||||
XT_INDEXED);
|
||||
# endif
|
||||
case _IOC_NR(EVIOCGSND(0)):
|
||||
return decode_bitset(tcp, arg, evdev_snd,
|
||||
SND_MAX, "SND_???");
|
||||
SND_MAX, "SND_???", XT_INDEXED);
|
||||
# ifdef EVIOCGSW
|
||||
case _IOC_NR(EVIOCGSW(0)):
|
||||
return decode_bitset(tcp, arg, evdev_switch,
|
||||
SW_MAX, "SW_???");
|
||||
SW_MAX, "SW_???", XT_INDEXED);
|
||||
# endif
|
||||
case _IOC_NR(EVIOCGKEY(0)):
|
||||
return decode_bitset(tcp, arg, evdev_keycode,
|
||||
KEY_MAX, "KEY_???");
|
||||
KEY_MAX, "KEY_???", XT_INDEXED);
|
||||
case _IOC_NR(EVIOCGLED(0)):
|
||||
return decode_bitset(tcp, arg, evdev_leds,
|
||||
LED_MAX, "LED_???");
|
||||
LED_MAX, "LED_???", XT_INDEXED);
|
||||
}
|
||||
|
||||
/* multi-number fixed-length commands */
|
||||
|
9
execve.c
9
execve.c
@ -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-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -57,8 +57,11 @@ printargv(struct tcb *const tcp, kernel_ulong_t addr)
|
||||
if (umoven(tcp, addr, wordsize, cp.data)) {
|
||||
if (sep == start_sep)
|
||||
printaddr(addr);
|
||||
else
|
||||
tprints(", ???]");
|
||||
else {
|
||||
tprints(", ...");
|
||||
printaddr_comment(addr);
|
||||
tprints("]");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!(wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64)) {
|
||||
|
41
f_owner_ex.h
Normal file
41
f_owner_ex.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef STRACE_F_OWNER_EX_H
|
||||
#define STRACE_F_OWNER_EX_H
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
|
||||
#if defined HAVE_STRUCT_F_OWNER_EX
|
||||
typedef struct f_owner_ex struct_kernel_f_owner_ex;
|
||||
#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
|
||||
typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
|
||||
#else
|
||||
# error struct f_owner_ex definition not found in <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#endif /* !STRACE_F_OWNER_EX_H */
|
10
fanotify.c
10
fanotify.c
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -75,10 +75,12 @@ SYS_FUNC(fanotify_mark)
|
||||
#endif
|
||||
printflags64(fan_event_flags, mask, "FAN_???");
|
||||
tprints(", ");
|
||||
if ((int) tcp->u_arg[argn] == FAN_NOFD)
|
||||
tprints("FAN_NOFD, ");
|
||||
else
|
||||
if ((int) tcp->u_arg[argn] == FAN_NOFD) {
|
||||
print_xlat_d(FAN_NOFD);
|
||||
tprints(", ");
|
||||
} else {
|
||||
print_dirfd(tcp, tcp->u_arg[argn]);
|
||||
}
|
||||
printpath(tcp, tcp->u_arg[argn + 1]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
|
23
fcntl.c
23
fcntl.c
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -35,7 +35,6 @@
|
||||
#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"
|
||||
@ -197,18 +196,7 @@ SYS_FUNC(fcntl)
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
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_???");
|
||||
}
|
||||
printxval(fcntlcmds, tcp->u_arg[1], "F_???");
|
||||
}
|
||||
return print_fcntl(tcp);
|
||||
}
|
||||
@ -219,12 +207,7 @@ SYS_FUNC(fcntl64)
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
const char *str = xlookup(fcntl64cmds, cmd);
|
||||
if (str) {
|
||||
tprints(str);
|
||||
} else {
|
||||
printxval(fcntlcmds, cmd, "F_???");
|
||||
}
|
||||
printxval(fcntlcmds, cmd, "F_???");
|
||||
}
|
||||
switch (cmd) {
|
||||
case F_SETLK64:
|
||||
|
@ -10,6 +10,7 @@ fi
|
||||
: ${DATE_FILE:=$(dirname "$FILE")/.$(basename "${FILE}").date}
|
||||
: ${DEFAULT_DATE:=$2}
|
||||
: ${DATE_FORMAT:=%Y-%m-%d}
|
||||
LC_TIME=C; export LC_TIME
|
||||
|
||||
date=
|
||||
|
||||
@ -23,13 +24,19 @@ date=
|
||||
[ -n "${date}" ] ||
|
||||
date="$(git log -n 1 --format=format:%cD --no-patch "${FILE}")"
|
||||
|
||||
[ -n "${date}" ] || year="${DEFAULT_DATE}"
|
||||
[ -n "${date}" ] ||
|
||||
date="${DEFAULT_DATE}"
|
||||
|
||||
[ -n "${date}" ] || date="$(date -u)"
|
||||
[ -n "${date}" ] ||
|
||||
[ -z "${SOURCE_DATE_EPOCH-}" ] ||
|
||||
date="$(date -u -d "@${SOURCE_DATE_EPOCH}")"
|
||||
|
||||
[ -n "${date}" ] ||
|
||||
date="$(date -u)"
|
||||
|
||||
[ -n "${date}" ] || {
|
||||
echo >&2 'Undefined date.'
|
||||
exit 1
|
||||
}
|
||||
|
||||
exec printf "%s" $(date "+${DATE_FORMAT}" -d "${date}")
|
||||
exec printf "%s" $(date -u "+${DATE_FORMAT}" -d "${date}")
|
||||
|
10
file_ioctl.c
10
file_ioctl.c
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Jeff Mahoney <jeffm@suse.com>
|
||||
* Copyright (c) 2016-2017 The strace developers.
|
||||
* Copyright (c) 2016-2018 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),
|
||||
umoven_or_printaddr,
|
||||
tfetch_mem,
|
||||
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),
|
||||
umoven_or_printaddr,
|
||||
tfetch_mem,
|
||||
print_fiemap_extent, 0);
|
||||
}
|
||||
tprints("}");
|
||||
|
@ -43,6 +43,11 @@ 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)
|
||||
{
|
||||
@ -102,6 +107,7 @@ parse_delay_token(const char *input, struct inject_opts *fopts, bool isenter)
|
||||
|
||||
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;
|
||||
@ -137,6 +143,27 @@ 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))
|
||||
return false;
|
||||
@ -223,6 +250,7 @@ parse_inject_token(const char *const token, struct inject_opts *const fopts,
|
||||
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)
|
||||
{
|
||||
if (str[0] == '\0' || str[0] == ':')
|
||||
@ -233,7 +261,7 @@ parse_inject_expression(char *const str,
|
||||
|
||||
char *token;
|
||||
while ((token = strtok_r(NULL, ":", &saveptr))) {
|
||||
if (!parse_inject_token(token, fopts, fault_tokens_only))
|
||||
if (!parse_inject_token(token, fopts, pdata, fault_tokens_only))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -308,9 +336,10 @@ qualify_inject_common(const char *const str,
|
||||
.delay_idx = -1
|
||||
}
|
||||
};
|
||||
struct inject_personality_data pdata[SUPPORTED_PERSONALITIES] = { { 0 } };
|
||||
char *copy = xstrdup(str);
|
||||
const char *name =
|
||||
parse_inject_expression(copy, &opts, fault_tokens_only);
|
||||
parse_inject_expression(copy, &opts, pdata, fault_tokens_only);
|
||||
if (!name)
|
||||
error_msg_and_die("invalid %s '%s'", description, str);
|
||||
|
||||
@ -321,7 +350,7 @@ qualify_inject_common(const char *const str,
|
||||
free(copy);
|
||||
|
||||
/* If neither of retval, error, signal or delay is specified, then ... */
|
||||
if (!opts.data.flags) {
|
||||
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);
|
||||
@ -353,6 +382,10 @@ qualify_inject_common(const char *const str,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
futex.c
11
futex.c
@ -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-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,6 +37,9 @@
|
||||
#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"
|
||||
@ -94,8 +97,10 @@ SYS_FUNC(futex)
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
tprints(", ");
|
||||
if ((val3 >> 28) & 8)
|
||||
tprints("FUTEX_OP_OPARG_SHIFT<<28|");
|
||||
if ((val3 >> 28) & FUTEX_OP_OPARG_SHIFT) {
|
||||
print_xlat(FUTEX_OP_OPARG_SHIFT);
|
||||
tprints("<<28|");
|
||||
}
|
||||
comment = printxval(futexwakeops, (val3 >> 28) & 0x7, NULL)
|
||||
? NULL : "FUTEX_OP_???";
|
||||
tprints("<<28");
|
||||
|
11
gcc_compat.h
11
gcc_compat.h
@ -99,4 +99,15 @@
|
||||
# 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 */
|
||||
|
@ -38,23 +38,29 @@ cat <<EOF
|
||||
# define SoM(type_, member_) (sizeof(((type_ *)0)->member_))
|
||||
EOF
|
||||
|
||||
for struct in $(sed -n 's/^struct \(BPF_[^[:space:]]\+_struct\) .*/\1/p' < "$input"); do
|
||||
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' |
|
||||
sed -n 's/^[[:space:]]\+[^][;]*[[:space:]]\([^][[:space:];]\+\)\(\[[^;]*\]\)\?;$/\1/p' |
|
||||
while read field; do
|
||||
FIELD="$(printf %s "$field" |tr '[:lower:]' '[:upper:]')"
|
||||
cat <<EOF
|
||||
|
||||
# ifdef HAVE_UNION_BPF_ATTR_$ENUM$FIELD
|
||||
static_assert(SoM(struct $struct, $field) == SoM(union bpf_attr, $enum$field),
|
||||
# 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(union bpf_attr, $enum$field),
|
||||
static_assert(offsetof(struct $struct, $field) == offsetof($type_name, $enum$field),
|
||||
"$struct.$field offset mismatch");
|
||||
# endif /* HAVE_UNION_BPF_ATTR_$ENUM$FIELD */
|
||||
# endif /* HAVE_${TYPE_NAME}_$ENUM$FIELD */
|
||||
EOF
|
||||
done
|
||||
cat <<EOF
|
||||
|
48
inotify_ioctl.c
Normal file
48
inotify_ioctl.c
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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
4
io.c
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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,
|
||||
umoven_or_printaddr_ignore_syserror, print_iovec, &config);
|
||||
tfetch_mem_ignore_syserror, print_iovec, &config);
|
||||
}
|
||||
|
||||
SYS_FUNC(readv)
|
||||
|
47
ioctl.c
47
ioctl.c
@ -33,11 +33,6 @@
|
||||
#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
|
||||
@ -92,7 +87,8 @@ evdev_decode_number(const unsigned int code)
|
||||
if (_IOC_DIR(code) == _IOC_WRITE) {
|
||||
if (nr >= 0xc0 && nr <= 0xc0 + 0x3f) {
|
||||
tprints("EVIOCSABS(");
|
||||
printxval(evdev_abs, nr - 0xc0, "ABS_???");
|
||||
printxval_indexn(evdev_abs, evdev_abs_size, nr - 0xc0,
|
||||
"ABS_???");
|
||||
tprints(")");
|
||||
return 1;
|
||||
}
|
||||
@ -108,7 +104,8 @@ evdev_decode_number(const unsigned int code)
|
||||
return 1;
|
||||
} else if (nr >= 0x40 && nr <= 0x40 + 0x3f) {
|
||||
tprints("EVIOCGABS(");
|
||||
printxval(evdev_abs, nr - 0x40, "ABS_???");
|
||||
printxval_indexn(evdev_abs, evdev_abs_size, nr - 0x40,
|
||||
"ABS_???");
|
||||
tprints(")");
|
||||
return 1;
|
||||
}
|
||||
@ -258,6 +255,8 @@ 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);
|
||||
@ -325,6 +324,8 @@ ioctl_decode(struct tcb *tcp)
|
||||
case 0xae:
|
||||
return kvm_ioctl(tcp, code, arg);
|
||||
#endif
|
||||
case 'I':
|
||||
return inotify_ioctl(tcp, code, arg);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -339,19 +340,29 @@ SYS_FUNC(ioctl)
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
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_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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (xlat_verbosity == XLAT_STYLE_VERBOSE)
|
||||
tprints(" */");
|
||||
|
||||
ret = ioctl_decode(tcp);
|
||||
} else {
|
||||
ret = ioctl_decode(tcp) | RVAL_DECODED;
|
||||
|
11
ioprio.c
11
ioprio.c
@ -56,17 +56,14 @@ static const char *
|
||||
sprint_ioprio(unsigned int ioprio)
|
||||
{
|
||||
static char outstr[256];
|
||||
const char *str;
|
||||
char class_buf[64];
|
||||
unsigned int class, data;
|
||||
|
||||
class = IOPRIO_PRIO_CLASS(ioprio);
|
||||
data = IOPRIO_PRIO_DATA(ioprio);
|
||||
str = xlookup(ioprio_class, class);
|
||||
if (str)
|
||||
xsprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data);
|
||||
else
|
||||
xsprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)",
|
||||
class, "IOPRIO_CLASS_???", data);
|
||||
sprintxval(class_buf, sizeof(class_buf), ioprio_class, class,
|
||||
"IOPRIO_CLASS_???");
|
||||
xsprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", class_buf, data);
|
||||
|
||||
return outstr;
|
||||
}
|
||||
|
7
ipc.c
7
ipc.c
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
@ -33,15 +34,11 @@ 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);
|
||||
|
||||
if (str)
|
||||
tprints(str);
|
||||
else
|
||||
tprintf("%u", call);
|
||||
printxval_u(ipccalls, call, NULL);
|
||||
|
||||
unsigned int i;
|
||||
for (i = 1; i < tcp->s_ent->nargs; ++i)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Roland McGrath <roland@redhat.com>
|
||||
* Copyright (c) 2003-2017 The strace developers.
|
||||
* Copyright (c) 2003-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,8 +43,10 @@
|
||||
|
||||
#define PRINTCTL(flagset, arg, dflt) \
|
||||
do { \
|
||||
if ((arg) & IPC_64) \
|
||||
tprints("IPC_64|"); \
|
||||
if ((arg) & IPC_64) { \
|
||||
print_xlat(IPC_64); \
|
||||
tprints("|"); \
|
||||
} \
|
||||
printxval((flagset), (arg) & ~IPC_64, dflt); \
|
||||
} while (0)
|
||||
|
||||
|
11
ipc_msg.c
11
ipc_msg.c
@ -5,7 +5,7 @@
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
|
||||
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -41,15 +41,12 @@
|
||||
#endif
|
||||
|
||||
#include "xlat/ipc_msg_flags.h"
|
||||
#include "xlat/ipc_private.h"
|
||||
#include "xlat/resource_flags.h"
|
||||
|
||||
SYS_FUNC(msgget)
|
||||
{
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE");
|
||||
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
|
||||
tprints(", ");
|
||||
if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
|
||||
tprints("|");
|
||||
@ -99,7 +96,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] = tmp[1];
|
||||
pair[1] = (int) tmp[1];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
10
ipc_sem.c
10
ipc_sem.c
@ -5,7 +5,7 @@
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
|
||||
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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),
|
||||
umoven_or_printaddr, print_sembuf, 0);
|
||||
tfetch_mem, print_sembuf, 0);
|
||||
#else
|
||||
printaddr(addr);
|
||||
#endif
|
||||
@ -103,11 +103,7 @@ SYS_FUNC(semtimedop)
|
||||
|
||||
SYS_FUNC(semget)
|
||||
{
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE");
|
||||
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
|
||||
tprintf(", %d, ", (int) tcp->u_arg[1]);
|
||||
if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
|
||||
tprints("|");
|
||||
|
14
ipc_shm.c
14
ipc_shm.c
@ -5,7 +5,7 @@
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
|
||||
* Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -52,11 +52,7 @@
|
||||
|
||||
SYS_FUNC(shmget)
|
||||
{
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE");
|
||||
printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
|
||||
unsigned int flags = tcp->u_arg[2] & ~0777;
|
||||
@ -67,10 +63,12 @@ SYS_FUNC(shmget)
|
||||
if (flags || !hugetlb_value)
|
||||
printflags(shm_resource_flags, flags, NULL);
|
||||
|
||||
if (hugetlb_value)
|
||||
tprintf("%s%u<<SHM_HUGE_SHIFT",
|
||||
if (hugetlb_value) {
|
||||
tprintf("%s%u<<",
|
||||
flags ? "|" : "",
|
||||
hugetlb_value >> SHM_HUGE_SHIFT);
|
||||
print_xlat_u(SHM_HUGE_SHIFT);
|
||||
}
|
||||
|
||||
if (flags || hugetlb_value)
|
||||
tprints("|");
|
||||
|
4
kexec.c
4
kexec.c
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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,
|
||||
umoven_or_printaddr, print_seg, 0);
|
||||
tfetch_mem, print_seg, 0);
|
||||
}
|
||||
|
||||
SYS_FUNC(kexec_load)
|
||||
|
20
keyctl.c
20
keyctl.c
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -44,12 +44,7 @@ struct keyctl_dh_params {
|
||||
static void
|
||||
print_keyring_serial_number(key_serial_t id)
|
||||
{
|
||||
const char *str = xlookup(key_spec, (unsigned int) id);
|
||||
|
||||
if (str)
|
||||
tprints(str);
|
||||
else
|
||||
tprintf("%d", id);
|
||||
printxval_d(key_spec, id, NULL);
|
||||
}
|
||||
|
||||
SYS_FUNC(add_key)
|
||||
@ -195,12 +190,8 @@ keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
|
||||
|
||||
print_keyring_serial_number(id1);
|
||||
tprintf(", %u, ", timeout);
|
||||
|
||||
if (err_str)
|
||||
tprintf("%s, ", err_str);
|
||||
else
|
||||
tprintf("%u, ", error);
|
||||
|
||||
print_xlat_ex(error, err_str, XLAT_STYLE_FMT_U);
|
||||
tprints(", ");
|
||||
print_keyring_serial_number(id2);
|
||||
}
|
||||
|
||||
@ -396,7 +387,8 @@ SYS_FUNC(keyctl)
|
||||
break;
|
||||
|
||||
case KEYCTL_SET_REQKEY_KEYRING:
|
||||
printxval(key_reqkeys, arg2, "KEY_REQKEY_DEFL_???");
|
||||
printxvals_ex((int) arg2, "KEY_REQKEY_DEFL_???",
|
||||
XLAT_STYLE_FMT_D, key_reqkeys, NULL);
|
||||
break;
|
||||
|
||||
case KEYCTL_SET_TIMEOUT:
|
||||
|
@ -283,6 +283,7 @@
|
||||
{ "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 },
|
||||
@ -422,8 +423,11 @@
|
||||
{ "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, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
|
||||
{ "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 },
|
||||
@ -1160,6 +1164,7 @@
|
||||
{ "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 },
|
||||
@ -1197,6 +1202,9 @@
|
||||
{ "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 },
|
||||
@ -1238,48 +1246,6 @@
|
||||
{ "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 },
|
||||
@ -1338,6 +1304,8 @@
|
||||
{ "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 },
|
||||
@ -1346,15 +1314,19 @@
|
||||
{ "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 },
|
||||
@ -1552,6 +1524,7 @@
|
||||
{ "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 },
|
||||
@ -1680,6 +1653,7 @@
|
||||
{ "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 },
|
||||
@ -2022,53 +1996,6 @@
|
||||
{ "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 },
|
||||
@ -2199,6 +2126,7 @@
|
||||
{ "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 },
|
||||
@ -2523,7 +2451,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, 0x26 },
|
||||
{ "rdma/rdma_user_ioctl.h", "HFI1_IOCTL_CTXT_INFO", _IOC_WRITE, 0x1be2, 0x28 },
|
||||
{ "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 },
|
||||
@ -2537,7 +2465,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.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
|
||||
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
|
||||
{ "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 },
|
||||
|
@ -283,6 +283,7 @@
|
||||
{ "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 },
|
||||
@ -422,8 +423,11 @@
|
||||
{ "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, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
|
||||
{ "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 },
|
||||
@ -1160,6 +1164,7 @@
|
||||
{ "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 },
|
||||
@ -1197,6 +1202,9 @@
|
||||
{ "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 },
|
||||
@ -1238,48 +1246,6 @@
|
||||
{ "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 },
|
||||
@ -1338,6 +1304,8 @@
|
||||
{ "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 },
|
||||
@ -1346,15 +1314,19 @@
|
||||
{ "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 },
|
||||
@ -1552,6 +1524,7 @@
|
||||
{ "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 },
|
||||
@ -1680,6 +1653,7 @@
|
||||
{ "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 },
|
||||
@ -2022,53 +1996,6 @@
|
||||
{ "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 },
|
||||
@ -2199,6 +2126,7 @@
|
||||
{ "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 },
|
||||
@ -2537,7 +2465,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.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
|
||||
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
|
||||
{ "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 },
|
||||
|
@ -283,6 +283,7 @@
|
||||
{ "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 },
|
||||
@ -422,8 +423,11 @@
|
||||
{ "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, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
|
||||
{ "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 },
|
||||
@ -1160,6 +1164,7 @@
|
||||
{ "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 },
|
||||
@ -1197,6 +1202,9 @@
|
||||
{ "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 },
|
||||
@ -1238,48 +1246,6 @@
|
||||
{ "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 },
|
||||
@ -1338,6 +1304,8 @@
|
||||
{ "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 },
|
||||
@ -1346,15 +1314,19 @@
|
||||
{ "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 },
|
||||
@ -1552,6 +1524,7 @@
|
||||
{ "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 },
|
||||
@ -1680,6 +1653,7 @@
|
||||
{ "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 },
|
||||
@ -2022,53 +1996,6 @@
|
||||
{ "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 },
|
||||
@ -2199,6 +2126,7 @@
|
||||
{ "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 },
|
||||
@ -2537,7 +2465,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.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
|
||||
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
|
||||
{ "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 },
|
||||
|
@ -282,6 +282,7 @@
|
||||
[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
|
||||
|
@ -283,6 +283,7 @@
|
||||
{ "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 },
|
||||
@ -422,8 +423,11 @@
|
||||
{ "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, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
|
||||
{ "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 },
|
||||
@ -1160,6 +1164,7 @@
|
||||
{ "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 },
|
||||
@ -1197,6 +1202,9 @@
|
||||
{ "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 },
|
||||
@ -1238,48 +1246,6 @@
|
||||
{ "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 },
|
||||
@ -1338,6 +1304,8 @@
|
||||
{ "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 },
|
||||
@ -1346,15 +1314,19 @@
|
||||
{ "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 },
|
||||
@ -1552,6 +1524,7 @@
|
||||
{ "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 },
|
||||
@ -1680,6 +1653,7 @@
|
||||
{ "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 },
|
||||
@ -2022,53 +1996,6 @@
|
||||
{ "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 },
|
||||
@ -2199,6 +2126,7 @@
|
||||
{ "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 },
|
||||
@ -2537,7 +2465,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.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
|
||||
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
|
||||
{ "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 },
|
||||
|
@ -275,3 +275,4 @@
|
||||
[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" },
|
||||
|
@ -1,2 +0,0 @@
|
||||
/* ARM personality */
|
||||
#include "errnoent.h"
|
@ -1 +0,0 @@
|
||||
#include "signalent.h"
|
@ -1,8 +1,8 @@
|
||||
static int
|
||||
arch_set_error(struct tcb *tcp)
|
||||
{
|
||||
alpha_r0 = tcp->u_error;
|
||||
return upoke(tcp, REG_R0, alpha_r0);
|
||||
return upoke(tcp, REG_A3, (alpha_a3 = 1))
|
||||
|| upoke(tcp, REG_R0, (alpha_r0 = tcp->u_error));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -36,12 +36,27 @@ static inline kernel_ulong_t
|
||||
raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
|
||||
{
|
||||
*err = 0;
|
||||
|
||||
#ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
|
||||
|
||||
register kernel_ulong_t rt;
|
||||
register kernel_ulong_t r0 __asm__("r0");
|
||||
__asm__ __volatile__("mov %1,r7; mov r7,%2; swi 0x0; mov r7,%1"
|
||||
: "=r"(r0), "=&r"(rt)
|
||||
: "r"(nr)
|
||||
: "memory");
|
||||
|
||||
#else
|
||||
|
||||
register kernel_ulong_t r7 __asm__("r7") = nr;
|
||||
register kernel_ulong_t r0 __asm__("r0");
|
||||
__asm__ __volatile__("swi 0x0"
|
||||
: "=r"(r0)
|
||||
: "r"(r7)
|
||||
: "memory");
|
||||
|
||||
#endif
|
||||
|
||||
return r0;
|
||||
}
|
||||
# define raw_syscall_0 raw_syscall_0
|
||||
|
@ -423,6 +423,7 @@
|
||||
[395] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[396] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[397] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[398] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
# define ARM_FIRST_SHUFFLED_SYSCALL 400
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1995-2017 The strace developers.
|
||||
* Copyright (c) 1995-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -36,6 +36,7 @@
|
||||
#endif
|
||||
|
||||
/* still unfinished */
|
||||
#define sys_rseq printargs
|
||||
#define sys_vm86 printargs
|
||||
#define sys_vm86old printargs
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_HYPERV_EVENTFD", _IOC_WRITE, 0xaebd, 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 },
|
||||
|
@ -411,6 +411,8 @@
|
||||
[382] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[383] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[384] = { 2, TP, SEN(arch_prctl), "arch_prctl" },
|
||||
[385] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" },
|
||||
[386] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
||||
#define SYS_socket_subcall 400
|
||||
#include "subcall.h"
|
||||
|
@ -27,21 +27,6 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* IA-32 syscalls that have pointer arguments which are incompatible
|
||||
* with 64-bit layout get redirected to printargs.
|
||||
*/
|
||||
#if CST > 0
|
||||
# undef SYS_FUNC_NAME
|
||||
# define SYS_FUNC_NAME(syscall_name) printargs
|
||||
# include "../i386/syscallent.h"
|
||||
# undef SYS_FUNC_NAME
|
||||
# define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name)
|
||||
#endif
|
||||
|
||||
/* You must be careful to check ../i386/syscallent.h so that this table
|
||||
starts where that one leaves off.
|
||||
*/
|
||||
[1024] = { 0, 0, SEN(printargs), "ni_syscall" },
|
||||
[1025] = { 1, TP|SE, SEN(exit), "exit" },
|
||||
[1026] = { 3, TD, SEN(read), "read" },
|
||||
|
5
linux/linux/signal.h
Normal file
5
linux/linux/signal.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* Workaround the infamous incompatibility between <linux/signal.h>
|
||||
* and many libc headers by overriding <linux/signal.h> with <signal.h>.
|
||||
*/
|
||||
#include <signal.h>
|
@ -38,7 +38,7 @@
|
||||
[6035] = { 2, 0, SEN(getitimer), "getitimer" },
|
||||
[6036] = { 3, 0, SEN(setitimer), "setitimer" },
|
||||
[6037] = { 1, 0, SEN(alarm), "alarm" },
|
||||
[6038] = { 0, NF, SEN(getpid), "getpid" },
|
||||
[6038] = { 0, PU|NF, SEN(getpid), "getpid" },
|
||||
[6039] = { 4, TD|TN, SEN(sendfile), "sendfile" },
|
||||
[6040] = { 3, TN, SEN(socket), "socket" },
|
||||
[6041] = { 3, TN, SEN(connect), "connect" },
|
||||
@ -100,16 +100,16 @@
|
||||
[6097] = { 1, 0, SEN(sysinfo), "sysinfo" },
|
||||
[6098] = { 1, 0, SEN(times), "times" },
|
||||
[6099] = { 4, 0, SEN(ptrace), "ptrace" },
|
||||
[6100] = { 0, NF, SEN(getuid), "getuid" },
|
||||
[6100] = { 0, PU|NF, SEN(getuid), "getuid" },
|
||||
[6101] = { 3, 0, SEN(syslog), "syslog" },
|
||||
[6102] = { 0, NF, SEN(getgid), "getgid" },
|
||||
[6102] = { 0, PU|NF, SEN(getgid), "getgid" },
|
||||
[6103] = { 1, 0, SEN(setuid), "setuid" },
|
||||
[6104] = { 1, 0, SEN(setgid), "setgid" },
|
||||
[6105] = { 0, NF, SEN(geteuid), "geteuid" },
|
||||
[6106] = { 0, NF, SEN(getegid), "getegid" },
|
||||
[6105] = { 0, PU|NF, SEN(geteuid), "geteuid" },
|
||||
[6106] = { 0, PU|NF, SEN(getegid), "getegid" },
|
||||
[6107] = { 2, 0, SEN(setpgid), "setpgid" },
|
||||
[6108] = { 0, NF, SEN(getppid), "getppid" },
|
||||
[6109] = { 0, 0, SEN(getpgrp), "getpgrp" },
|
||||
[6108] = { 0, PU|NF, SEN(getppid), "getppid" },
|
||||
[6109] = { 0, PU|NF, SEN(getpgrp), "getpgrp" },
|
||||
[6110] = { 0, 0, SEN(setsid), "setsid" },
|
||||
[6111] = { 2, 0, SEN(setreuid), "setreuid" },
|
||||
[6112] = { 2, 0, SEN(setregid), "setregid" },
|
||||
@ -178,7 +178,7 @@
|
||||
[6175] = { 5, TN, SEN(putpmsg), "putpmsg" },
|
||||
[6176] = { 0, 0, SEN(afs_syscall), "afs_syscall" },
|
||||
[6177] = { 0, 0, SEN(printargs), "reserved177" },
|
||||
[6178] = { 0, NF, SEN(gettid), "gettid" },
|
||||
[6178] = { 0, PU|NF, SEN(gettid), "gettid" },
|
||||
[6179] = { 3, TD, SEN(readahead), "readahead" },
|
||||
[6180] = { 5, TF, SEN(setxattr), "setxattr" },
|
||||
[6181] = { 5, TF, SEN(setxattr), "lsetxattr" },
|
||||
|
@ -38,7 +38,7 @@
|
||||
[5035] = { 2, 0, SEN(getitimer), "getitimer" },
|
||||
[5036] = { 3, 0, SEN(setitimer), "setitimer" },
|
||||
[5037] = { 1, 0, SEN(alarm), "alarm" },
|
||||
[5038] = { 0, NF, SEN(getpid), "getpid" },
|
||||
[5038] = { 0, PU|NF, SEN(getpid), "getpid" },
|
||||
[5039] = { 4, TD|TN, SEN(sendfile), "sendfile" },
|
||||
[5040] = { 3, TN, SEN(socket), "socket" },
|
||||
[5041] = { 3, TN, SEN(connect), "connect" },
|
||||
@ -100,16 +100,16 @@
|
||||
[5097] = { 1, 0, SEN(sysinfo), "sysinfo" },
|
||||
[5098] = { 1, 0, SEN(times), "times" },
|
||||
[5099] = { 4, 0, SEN(ptrace), "ptrace" },
|
||||
[5100] = { 0, NF, SEN(getuid), "getuid" },
|
||||
[5100] = { 0, PU|NF, SEN(getuid), "getuid" },
|
||||
[5101] = { 3, 0, SEN(syslog), "syslog" },
|
||||
[5102] = { 0, NF, SEN(getgid), "getgid" },
|
||||
[5102] = { 0, PU|NF, SEN(getgid), "getgid" },
|
||||
[5103] = { 1, 0, SEN(setuid), "setuid" },
|
||||
[5104] = { 1, 0, SEN(setgid), "setgid" },
|
||||
[5105] = { 0, NF, SEN(geteuid), "geteuid" },
|
||||
[5106] = { 0, NF, SEN(getegid), "getegid" },
|
||||
[5105] = { 0, PU|NF, SEN(geteuid), "geteuid" },
|
||||
[5106] = { 0, PU|NF, SEN(getegid), "getegid" },
|
||||
[5107] = { 2, 0, SEN(setpgid), "setpgid" },
|
||||
[5108] = { 0, NF, SEN(getppid), "getppid" },
|
||||
[5109] = { 0, 0, SEN(getpgrp), "getpgrp" },
|
||||
[5108] = { 0, PU|NF, SEN(getppid), "getppid" },
|
||||
[5109] = { 0, PU|NF, SEN(getpgrp), "getpgrp" },
|
||||
[5110] = { 0, 0, SEN(setsid), "setsid" },
|
||||
[5111] = { 2, 0, SEN(setreuid), "setreuid" },
|
||||
[5112] = { 2, 0, SEN(setregid), "setregid" },
|
||||
@ -178,7 +178,7 @@
|
||||
[5175] = { 5, TN, SEN(putpmsg), "putpmsg" },
|
||||
[5176] = { 0, 0, SEN(afs_syscall), "afs_syscall" },
|
||||
[5177] = { 0, 0, SEN(printargs), "reserved177" },
|
||||
[5178] = { 0, NF, SEN(gettid), "gettid" },
|
||||
[5178] = { 0, PU|NF, SEN(gettid), "gettid" },
|
||||
[5179] = { 3, TD, SEN(readahead), "readahead" },
|
||||
[5180] = { 5, TF, SEN(setxattr), "setxattr" },
|
||||
[5181] = { 5, TF, SEN(setxattr), "lsetxattr" },
|
||||
|
@ -21,11 +21,11 @@
|
||||
[4017] = { 0, TM, SEN(break), "break" },
|
||||
[4018] = { 2, TF|TST|TSTA, SEN(oldstat), "oldstat" },
|
||||
[4019] = { 3, TD, SEN(lseek), "lseek" },
|
||||
[4020] = { 0, NF, SEN(getpid), "getpid" },
|
||||
[4020] = { 0, PU|NF, SEN(getpid), "getpid" },
|
||||
[4021] = { 5, TF, SEN(mount), "mount" },
|
||||
[4022] = { 1, TF, SEN(umount), "umount" },
|
||||
[4023] = { 1, 0, SEN(setuid), "setuid" },
|
||||
[4024] = { 0, NF, SEN(getuid), "getuid" },
|
||||
[4024] = { 0, PU|NF, SEN(getuid), "getuid" },
|
||||
[4025] = { 1, 0, SEN(stime), "stime" },
|
||||
[4026] = { 4, 0, SEN(ptrace), "ptrace" },
|
||||
[4027] = { 1, 0, SEN(alarm), "alarm" },
|
||||
@ -48,10 +48,10 @@
|
||||
[4044] = { 0, 0, SEN(prof), "prof" },
|
||||
[4045] = { 1, TM|SI, SEN(brk), "brk" },
|
||||
[4046] = { 1, 0, SEN(setgid), "setgid" },
|
||||
[4047] = { 0, NF, SEN(getgid), "getgid" },
|
||||
[4047] = { 0, PU|NF, SEN(getgid), "getgid" },
|
||||
[4048] = { 2, TS, SEN(signal), "signal" },
|
||||
[4049] = { 0, NF, SEN(geteuid), "geteuid" },
|
||||
[4050] = { 0, NF, SEN(getegid), "getegid" },
|
||||
[4049] = { 0, PU|NF, SEN(geteuid), "geteuid" },
|
||||
[4050] = { 0, PU|NF, SEN(getegid), "getegid" },
|
||||
[4051] = { 1, TF, SEN(acct), "acct" },
|
||||
[4052] = { 2, TF, SEN(umount2), "umount2" },
|
||||
[4053] = { 0, 0, SEN(lock), "lock" },
|
||||
@ -65,8 +65,8 @@
|
||||
[4061] = { 1, TF, SEN(chroot), "chroot" },
|
||||
[4062] = { 2, TSFA, SEN(ustat), "ustat" },
|
||||
[4063] = { 2, TD, SEN(dup2), "dup2" },
|
||||
[4064] = { 0, NF, SEN(getppid), "getppid" },
|
||||
[4065] = { 0, 0, SEN(getpgrp), "getpgrp" },
|
||||
[4064] = { 0, PU|NF, SEN(getppid), "getppid" },
|
||||
[4065] = { 0, PU|NF, SEN(getpgrp), "getpgrp" },
|
||||
[4066] = { 0, 0, SEN(setsid), "setsid" },
|
||||
[4067] = { 3, TS, SEN(sigaction), "sigaction" },
|
||||
[4068] = { 0, TS, SEN(sgetmask), "sgetmask" },
|
||||
@ -223,7 +223,7 @@
|
||||
[4219] = { 3, TD, SEN(getdents64), "getdents64" },
|
||||
[4220] = { 3, TD, SEN(fcntl64), "fcntl64" },
|
||||
[4221] = { },
|
||||
[4222] = { 0, NF, SEN(gettid), "gettid" },
|
||||
[4222] = { 0, PU|NF, SEN(gettid), "gettid" },
|
||||
[4223] = { 5, TD, SEN(readahead), "readahead" },
|
||||
[4224] = { 5, TF, SEN(setxattr), "setxattr" },
|
||||
[4225] = { 5, TF, SEN(setxattr), "lsetxattr" },
|
||||
|
@ -2,8 +2,10 @@ static int
|
||||
arch_set_error(struct tcb *tcp)
|
||||
{
|
||||
ppc_regs.gpr[3] = tcp->u_error;
|
||||
ppc_regs.ccr |= 0x10000000;
|
||||
#ifdef HAVE_GETREGS_OLD
|
||||
return upoke(tcp, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]);
|
||||
return upoke(tcp, sizeof(long) * PT_CCR, ppc_regs.ccr) ||
|
||||
upoke(tcp, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]);
|
||||
#else
|
||||
return set_regs(tcp->pid);
|
||||
#endif
|
||||
|
@ -414,6 +414,7 @@
|
||||
[384] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[385] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[386] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" },
|
||||
[387] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
||||
#define SYS_socket_subcall 400
|
||||
#include "subcall.h"
|
||||
|
@ -1 +0,0 @@
|
||||
#include "errnoent.h"
|
@ -1 +0,0 @@
|
||||
#include "signalent.h"
|
@ -409,6 +409,7 @@
|
||||
[384] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[385] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[386] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" },
|
||||
[387] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
||||
#define SYS_socket_subcall 400
|
||||
#include "subcall.h"
|
||||
|
@ -1,2 +0,0 @@
|
||||
/* RISC-V rv32 and rv64 */
|
||||
#include "../errnoent.h"
|
@ -1,2 +0,0 @@
|
||||
/* RISC-V rv32 and rv64 */
|
||||
#include "../signalent.h"
|
@ -410,6 +410,7 @@
|
||||
[378] = { 2, 0, SEN(s390_guarded_storage), "s390_guarded_storage" },
|
||||
[379] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[380] = { 4, 0, SEN(s390_sthyi), "s390_sthyi" },
|
||||
[381] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" },
|
||||
|
||||
#define SYS_socket_subcall 400
|
||||
#include "subcall.h"
|
||||
|
@ -1 +0,0 @@
|
||||
#include "errnoent.h"
|
@ -1 +0,0 @@
|
||||
#include "signalent.h"
|
@ -394,6 +394,7 @@
|
||||
[378] = { 2, 0, SEN(s390_guarded_storage), "s390_guarded_storage" },
|
||||
[379] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[380] = { 4, 0, SEN(s390_sthyi), "s390_sthyi" },
|
||||
[381] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" },
|
||||
|
||||
#define SYS_socket_subcall 400
|
||||
#include "subcall.h"
|
||||
|
@ -1 +0,0 @@
|
||||
#include "errnoent.h"
|
@ -1 +0,0 @@
|
||||
#include "signalent.h"
|
@ -1,2 +0,0 @@
|
||||
/* tilegx32/tilepro */
|
||||
#include "errnoent.h"
|
@ -1,2 +0,0 @@
|
||||
/* tilegx32/tilepro */
|
||||
#include "signalent.h"
|
@ -1,2 +0,0 @@
|
||||
/* i386 personality */
|
||||
#include "errnoent.h"
|
@ -283,6 +283,7 @@
|
||||
{ "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 },
|
||||
@ -422,8 +423,11 @@
|
||||
{ "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, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa8 },
|
||||
{ "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 },
|
||||
@ -1160,6 +1164,7 @@
|
||||
{ "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 },
|
||||
@ -1197,6 +1202,9 @@
|
||||
{ "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 },
|
||||
@ -1238,48 +1246,6 @@
|
||||
{ "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 },
|
||||
@ -1338,6 +1304,8 @@
|
||||
{ "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 },
|
||||
@ -1346,15 +1314,19 @@
|
||||
{ "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 },
|
||||
@ -1552,6 +1524,7 @@
|
||||
{ "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 },
|
||||
@ -1680,6 +1653,7 @@
|
||||
{ "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 },
|
||||
@ -2022,53 +1996,6 @@
|
||||
{ "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 },
|
||||
@ -2199,6 +2126,7 @@
|
||||
{ "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 },
|
||||
@ -2537,7 +2465,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.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x10 },
|
||||
{ "rdma/rdma_user_ioctl_cmds.h", "RDMA_VERBS_IOCTL", _IOC_READ|_IOC_WRITE, 0x1b01, 0x18 },
|
||||
{ "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 },
|
||||
|
@ -1,2 +0,0 @@
|
||||
/* i386 personality */
|
||||
#include "signalent.h"
|
@ -11,14 +11,14 @@
|
||||
[ 10] = { 3, TM|SI, SEN(mprotect), "mprotect" },
|
||||
[ 11] = { 2, TM|SI, SEN(munmap), "munmap" },
|
||||
[ 12] = { 1, TM|SI, SEN(brk), "brk" },
|
||||
[ 13] = { 4, TS, SEN(printargs), "64:rt_sigaction" },
|
||||
[ 13] = { 4, TS, SEN(printargs), "rt_sigaction#64" },
|
||||
[ 14] = { 4, TS, SEN(rt_sigprocmask), "rt_sigprocmask" },
|
||||
[ 15] = { 0, TS, SEN(rt_sigreturn), "64:rt_sigreturn" },
|
||||
[ 16] = { 3, TD, SEN(printargs), "64:ioctl" },
|
||||
[ 15] = { 0, TS, SEN(rt_sigreturn), "rt_sigreturn#64" },
|
||||
[ 16] = { 3, TD, SEN(printargs), "ioctl#64" },
|
||||
[ 17] = { 4, TD, SEN(pread), "pread64" },
|
||||
[ 18] = { 4, TD, SEN(pwrite), "pwrite64" },
|
||||
[ 19] = { 3, TD, SEN(printargs), "64:readv" },
|
||||
[ 20] = { 3, TD, SEN(printargs), "64:writev" },
|
||||
[ 19] = { 3, TD, SEN(printargs), "readv#64" },
|
||||
[ 20] = { 3, TD, SEN(printargs), "writev#64" },
|
||||
[ 21] = { 2, TF, SEN(access), "access" },
|
||||
[ 22] = { 1, TD, SEN(pipe), "pipe" },
|
||||
[ 23] = { 5, TD, SEN(select), "select" },
|
||||
@ -43,21 +43,21 @@
|
||||
[ 42] = { 3, TN, SEN(connect), "connect" },
|
||||
[ 43] = { 3, TN, SEN(accept), "accept" },
|
||||
[ 44] = { 6, TN, SEN(sendto), "sendto" },
|
||||
[ 45] = { 6, TN, SEN(printargs), "64:recvfrom" },
|
||||
[ 46] = { 3, TN, SEN(printargs), "64:sendmsg" },
|
||||
[ 47] = { 3, TN, SEN(printargs), "64:recvmsg" },
|
||||
[ 45] = { 6, TN, SEN(printargs), "recvfrom#64" },
|
||||
[ 46] = { 3, TN, SEN(printargs), "sendmsg#64" },
|
||||
[ 47] = { 3, TN, SEN(printargs), "recvmsg#64" },
|
||||
[ 48] = { 2, TN, SEN(shutdown), "shutdown" },
|
||||
[ 49] = { 3, TN, SEN(bind), "bind" },
|
||||
[ 50] = { 2, TN, SEN(listen), "listen" },
|
||||
[ 51] = { 3, TN, SEN(getsockname), "getsockname" },
|
||||
[ 52] = { 3, TN, SEN(getpeername), "getpeername" },
|
||||
[ 53] = { 4, TN, SEN(socketpair), "socketpair" },
|
||||
[ 54] = { 5, TN, SEN(printargs), "64:setsockopt" },
|
||||
[ 55] = { 5, TN, SEN(printargs), "64:getsockopt" },
|
||||
[ 54] = { 5, TN, SEN(printargs), "setsockopt#64" },
|
||||
[ 55] = { 5, TN, SEN(printargs), "getsockopt#64" },
|
||||
[ 56] = { 5, TP, SEN(clone), "clone" },
|
||||
[ 57] = { 0, TP, SEN(fork), "fork" },
|
||||
[ 58] = { 0, TP, SEN(vfork), "vfork" },
|
||||
[ 59] = { 3, TF|TP|SE|SI, SEN(printargs), "64:execve" },
|
||||
[ 59] = { 3, TF|TP|SE|SI, SEN(printargs), "execve#64" },
|
||||
[ 60] = { 1, TP|SE, SEN(exit), "exit" },
|
||||
[ 61] = { 4, TP, SEN(wait4), "wait4" },
|
||||
[ 62] = { 2, TS, SEN(kill), "kill" },
|
||||
@ -99,7 +99,7 @@
|
||||
[ 98] = { 2, 0, SEN(getrusage), "getrusage" },
|
||||
[ 99] = { 1, 0, SEN(sysinfo), "sysinfo" },
|
||||
[100] = { 1, 0, SEN(times), "times" },
|
||||
[101] = { 4, 0, SEN(printargs), "64:ptrace" },
|
||||
[101] = { 4, 0, SEN(printargs), "ptrace#64" },
|
||||
[102] = { 0, PU|NF, SEN(getuid), "getuid" },
|
||||
[103] = { 3, 0, SEN(syslog), "syslog" },
|
||||
[104] = { 0, PU|NF, SEN(getgid), "getgid" },
|
||||
@ -125,14 +125,14 @@
|
||||
[124] = { 1, 0, SEN(getsid), "getsid" },
|
||||
[125] = { 2, 0, SEN(capget), "capget" },
|
||||
[126] = { 2, 0, SEN(capset), "capset" },
|
||||
[127] = { 2, TS, SEN(printargs), "64:rt_sigpending" },
|
||||
[128] = { 4, TS, SEN(printargs), "64:rt_sigtimedwait" },
|
||||
[129] = { 3, TS, SEN(printargs), "64:rt_sigqueueinfo" },
|
||||
[127] = { 2, TS, SEN(printargs), "rt_sigpending#64" },
|
||||
[128] = { 4, TS, SEN(printargs), "rt_sigtimedwait#64" },
|
||||
[129] = { 3, TS, SEN(printargs), "rt_sigqueueinfo#64" },
|
||||
[130] = { 2, TS, SEN(rt_sigsuspend), "rt_sigsuspend" },
|
||||
[131] = { 2, TS, SEN(printargs), "64:sigaltstack" },
|
||||
[131] = { 2, TS, SEN(printargs), "sigaltstack#64" },
|
||||
[132] = { 2, TF, SEN(utime), "utime" },
|
||||
[133] = { 3, TF, SEN(mknod), "mknod" },
|
||||
[134] = { 1, TF, SEN(printargs), "64:uselib" },
|
||||
[134] = { 1, TF, SEN(printargs), "uselib#64" },
|
||||
[135] = { 1, NF, SEN(personality), "personality" },
|
||||
[136] = { 2, TSFA, SEN(ustat), "ustat" },
|
||||
[137] = { 2, TF|TSF|TSFA, SEN(statfs), "statfs" },
|
||||
@ -154,7 +154,7 @@
|
||||
[153] = { 0, 0, SEN(vhangup), "vhangup" },
|
||||
[154] = { 3, 0, SEN(modify_ldt), "modify_ldt" },
|
||||
[155] = { 2, TF, SEN(pivotroot), "pivot_root" },
|
||||
[156] = { 1, 0, SEN(printargs), "64:_sysctl" },
|
||||
[156] = { 1, 0, SEN(printargs), "_sysctl#64" },
|
||||
[157] = { 5, 0, SEN(prctl), "prctl" },
|
||||
[158] = { 2, TP, SEN(arch_prctl), "arch_prctl" },
|
||||
[159] = { 1, 0, SEN(adjtimex), "adjtimex" },
|
||||
@ -172,13 +172,13 @@
|
||||
[171] = { 2, 0, SEN(setdomainname), "setdomainname" },
|
||||
[172] = { 1, 0, SEN(iopl), "iopl" },
|
||||
[173] = { 3, 0, SEN(ioperm), "ioperm" },
|
||||
[174] = { 2, 0, SEN(printargs), "64:create_module" },
|
||||
[174] = { 2, 0, SEN(printargs), "create_module#64" },
|
||||
[175] = { 3, 0, SEN(init_module), "init_module" },
|
||||
[176] = { 2, 0, SEN(delete_module), "delete_module" },
|
||||
[177] = { 1, 0, SEN(printargs), "64:get_kernel_syms" },
|
||||
[178] = { 5, 0, SEN(printargs), "64:query_module" },
|
||||
[177] = { 1, 0, SEN(printargs), "get_kernel_syms#64" },
|
||||
[178] = { 5, 0, SEN(printargs), "query_module#64" },
|
||||
[179] = { 4, TF, SEN(quotactl), "quotactl" },
|
||||
[180] = { 3, 0, SEN(printargs), "64:nfsservctl" },
|
||||
[180] = { 3, 0, SEN(printargs), "nfsservctl#64" },
|
||||
[181] = { 5, TN, SEN(getpmsg), "getpmsg" },
|
||||
[182] = { 5, TN, SEN(putpmsg), "putpmsg" },
|
||||
[183] = { 5, 0, SEN(afs_syscall), "afs_syscall" },
|
||||
@ -203,24 +203,24 @@
|
||||
[202] = { 6, 0, SEN(futex), "futex" },
|
||||
[203] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" },
|
||||
[204] = { 3, 0, SEN(sched_getaffinity), "sched_getaffinity" },
|
||||
[205] = { 1, 0, SEN(printargs), "64:set_thread_area" },
|
||||
[206] = { 2, TM, SEN(printargs), "64:io_setup" },
|
||||
[205] = { 1, 0, SEN(printargs), "set_thread_area#64" },
|
||||
[206] = { 2, TM, SEN(printargs), "io_setup#64" },
|
||||
[207] = { 1, TM, SEN(io_destroy), "io_destroy" },
|
||||
[208] = { 5, 0, SEN(io_getevents), "io_getevents" },
|
||||
[209] = { 3, 0, SEN(printargs), "64:io_submit" },
|
||||
[209] = { 3, 0, SEN(printargs), "io_submit#64" },
|
||||
[210] = { 3, 0, SEN(io_cancel), "io_cancel" },
|
||||
[211] = { 1, 0, SEN(printargs), "64:get_thread_area" },
|
||||
[211] = { 1, 0, SEN(printargs), "get_thread_area#64" },
|
||||
[212] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" },
|
||||
[213] = { 1, TD, SEN(epoll_create), "epoll_create" },
|
||||
[214] = { 4, 0, SEN(printargs), "64:epoll_ctl_old" },
|
||||
[215] = { 4, 0, SEN(printargs), "64:epoll_wait_old" },
|
||||
[214] = { 4, 0, SEN(printargs), "epoll_ctl_old#64" },
|
||||
[215] = { 4, 0, SEN(printargs), "epoll_wait_old#64" },
|
||||
[216] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" },
|
||||
[217] = { 3, TD, SEN(getdents64), "getdents64" },
|
||||
[218] = { 1, 0, SEN(set_tid_address), "set_tid_address" },
|
||||
[219] = { 0, 0, SEN(restart_syscall), "restart_syscall" },
|
||||
[220] = { 4, TI, SEN(semtimedop), "semtimedop" },
|
||||
[221] = { 4, TD, SEN(fadvise64), "fadvise64" },
|
||||
[222] = { 3, 0, SEN(printargs), "64:timer_create" },
|
||||
[222] = { 3, 0, SEN(printargs), "timer_create#64" },
|
||||
[223] = { 4, 0, SEN(timer_settime), "timer_settime" },
|
||||
[224] = { 2, 0, SEN(timer_gettime), "timer_gettime" },
|
||||
[225] = { 1, 0, SEN(timer_getoverrun), "timer_getoverrun" },
|
||||
@ -234,7 +234,7 @@
|
||||
[233] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" },
|
||||
[234] = { 3, TS, SEN(tgkill), "tgkill" },
|
||||
[235] = { 2, TF, SEN(utimes), "utimes" },
|
||||
[236] = { 5, 0, SEN(printargs), "64:vserver" },
|
||||
[236] = { 5, 0, SEN(printargs), "vserver#64" },
|
||||
[237] = { 6, TM, SEN(mbind), "mbind" },
|
||||
[238] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" },
|
||||
[239] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" },
|
||||
@ -242,10 +242,10 @@
|
||||
[241] = { 1, 0, SEN(mq_unlink), "mq_unlink" },
|
||||
[242] = { 5, TD, SEN(mq_timedsend), "mq_timedsend" },
|
||||
[243] = { 5, TD, SEN(mq_timedreceive), "mq_timedreceive" },
|
||||
[244] = { 2, 0, SEN(printargs), "64:mq_notify" },
|
||||
[244] = { 2, 0, SEN(printargs), "mq_notify#64" },
|
||||
[245] = { 3, TD, SEN(mq_getsetattr), "mq_getsetattr" },
|
||||
[246] = { 4, 0, SEN(printargs), "64:kexec_load" },
|
||||
[247] = { 5, TP, SEN(printargs), "64:waitid" },
|
||||
[246] = { 4, 0, SEN(printargs), "kexec_load#64" },
|
||||
[247] = { 5, TP, SEN(printargs), "waitid#64" },
|
||||
[248] = { 5, 0, SEN(add_key), "add_key" },
|
||||
[249] = { 4, 0, SEN(request_key), "request_key" },
|
||||
[250] = { 5, 0, SEN(keyctl), "keyctl" },
|
||||
@ -271,13 +271,13 @@
|
||||
[270] = { 6, TD, SEN(pselect6), "pselect6" },
|
||||
[271] = { 5, TD, SEN(ppoll), "ppoll" },
|
||||
[272] = { 1, TP, SEN(unshare), "unshare" },
|
||||
[273] = { 2, 0, SEN(printargs), "64:set_robust_list" },
|
||||
[274] = { 3, 0, SEN(printargs), "64:get_robust_list" },
|
||||
[273] = { 2, 0, SEN(printargs), "set_robust_list#64" },
|
||||
[274] = { 3, 0, SEN(printargs), "get_robust_list#64" },
|
||||
[275] = { 6, TD, SEN(splice), "splice" },
|
||||
[276] = { 4, TD, SEN(tee), "tee" },
|
||||
[277] = { 4, TD, SEN(sync_file_range), "sync_file_range" },
|
||||
[278] = { 4, TD, SEN(printargs), "64:vmsplice" },
|
||||
[279] = { 6, TM, SEN(printargs), "64:move_pages" },
|
||||
[278] = { 4, TD, SEN(printargs), "vmsplice#64" },
|
||||
[279] = { 6, TM, SEN(printargs), "move_pages#64" },
|
||||
[280] = { 4, TD|TF, SEN(utimensat), "utimensat" },
|
||||
[281] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" },
|
||||
[282] = { 3, TD|TS, SEN(signalfd), "signalfd" },
|
||||
@ -293,11 +293,11 @@
|
||||
[292] = { 3, TD, SEN(dup3), "dup3" },
|
||||
[293] = { 2, TD, SEN(pipe2), "pipe2" },
|
||||
[294] = { 1, TD, SEN(inotify_init1), "inotify_init1" },
|
||||
[295] = { 4, TD, SEN(printargs), "64:preadv" },
|
||||
[296] = { 4, TD, SEN(printargs), "64:pwritev" },
|
||||
[297] = { 4, TP|TS, SEN(printargs), "64:rt_tgsigqueueinfo" },
|
||||
[295] = { 4, TD, SEN(printargs), "preadv#64" },
|
||||
[296] = { 4, TD, SEN(printargs), "pwritev#64" },
|
||||
[297] = { 4, TP|TS, SEN(printargs), "rt_tgsigqueueinfo#64" },
|
||||
[298] = { 5, TD, SEN(perf_event_open), "perf_event_open" },
|
||||
[299] = { 5, TN, SEN(printargs), "64:recvmmsg" },
|
||||
[299] = { 5, TN, SEN(printargs), "recvmmsg#64" },
|
||||
[300] = { 2, TD, SEN(fanotify_init), "fanotify_init" },
|
||||
[301] = { 5, TD|TF, SEN(fanotify_mark), "fanotify_mark" },
|
||||
[302] = { 4, 0, SEN(prlimit64), "prlimit64" },
|
||||
@ -305,11 +305,11 @@
|
||||
[304] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" },
|
||||
[305] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" },
|
||||
[306] = { 1, TD, SEN(syncfs), "syncfs" },
|
||||
[307] = { 4, TN, SEN(printargs), "64:sendmmsg" },
|
||||
[307] = { 4, TN, SEN(printargs), "sendmmsg#64" },
|
||||
[308] = { 2, TD, SEN(setns), "setns" },
|
||||
[309] = { 3, 0, SEN(getcpu), "getcpu" },
|
||||
[310] = { 6, 0, SEN(printargs), "64:process_vm_readv" },
|
||||
[311] = { 6, 0, SEN(printargs), "64:process_vm_writev" },
|
||||
[310] = { 6, 0, SEN(printargs), "process_vm_readv#64" },
|
||||
[311] = { 6, 0, SEN(printargs), "process_vm_writev#64" },
|
||||
[312] = { 5, 0, SEN(kcmp), "kcmp" },
|
||||
[313] = { 3, TD, SEN(finit_module), "finit_module" },
|
||||
[314] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
|
||||
@ -320,18 +320,19 @@
|
||||
[319] = { 2, TD, SEN(memfd_create), "memfd_create" },
|
||||
[320] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" },
|
||||
[321] = { 3, TD, SEN(bpf), "bpf" },
|
||||
[322] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "64:execveat" },
|
||||
[322] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "execveat#64" },
|
||||
[323] = { 1, TD, SEN(userfaultfd), "userfaultfd" },
|
||||
[324] = { 2, 0, SEN(membarrier), "membarrier" },
|
||||
[325] = { 3, TM, SEN(mlock2), "mlock2" },
|
||||
[326] = { 6, TD, SEN(copy_file_range), "copy_file_range" },
|
||||
[327] = { 6, TD, SEN(printargs), "64:preadv2" },
|
||||
[328] = { 6, TD, SEN(printargs), "64:pwritev2" },
|
||||
[327] = { 6, TD, SEN(printargs), "preadv2#64" },
|
||||
[328] = { 6, TD, SEN(printargs), "pwritev2#64" },
|
||||
[329] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" },
|
||||
[330] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[331] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[332] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[333 ... 511] = { },
|
||||
[333] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" },
|
||||
[334 ... 511] = { },
|
||||
/*
|
||||
* x32-specific system call numbers start at 512 to avoid cache impact
|
||||
* for native 64-bit operation.
|
||||
@ -372,3 +373,4 @@
|
||||
[545] = { 5, CST|TD|TF|TP|SE|SI, SEN(execveat), "execveat" },
|
||||
[546] = { 5, TD, SEN(preadv2), "preadv2" },
|
||||
[547] = { 5, TD, SEN(pwritev2), "pwritev2" },
|
||||
[334] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
@ -1,2 +0,0 @@
|
||||
/* i386 personality */
|
||||
#include "errnoent.h"
|
@ -1,2 +0,0 @@
|
||||
/* x32 personality */
|
||||
#include "errnoent.h"
|
@ -58,6 +58,7 @@
|
||||
{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_HYPERV_EVENTFD", _IOC_WRITE, 0xaebd, 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 },
|
||||
|
@ -1,2 +0,0 @@
|
||||
/* i386 personality */
|
||||
#include "signalent.h"
|
@ -1,2 +0,0 @@
|
||||
/* x32 personality */
|
||||
#include "signalent.h"
|
@ -331,3 +331,5 @@
|
||||
[330] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[331] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
[332] = { 5, TD|TF|TSTA, SEN(statx), "statx" },
|
||||
[333] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" },
|
||||
[334] = { 4, 0, SEN(rseq), "rseq" },
|
||||
|
28
m4/gen_bpf_attr_m4.awk
Normal file
28
m4/gen_bpf_attr_m4.awk
Normal file
@ -0,0 +1,28 @@
|
||||
/^struct ([^[:space:]]+)_struct([[:space:]]+\/\* ([^[:space:]]+) \*\/)?[[:space:]]+{/ {
|
||||
match($0, /^struct ([^[:space:]]+)_struct([[:space:]]+\/\* ([^[:space:]]+) \*\/)?[[:space:]]+{/, a)
|
||||
|
||||
struct_name = a[1]
|
||||
subtype_name = a[3]
|
||||
|
||||
if (struct_name ~ /^BPF_/)
|
||||
prefix = "union bpf_attr"
|
||||
else
|
||||
prefix = "struct " struct_name
|
||||
|
||||
if (subtype_name != "")
|
||||
prefix = prefix "." subtype_name
|
||||
|
||||
in_struct = 1
|
||||
next
|
||||
}
|
||||
|
||||
/^}( ATTRIBUTE_ALIGNED\(.*\))?;/ {
|
||||
in_struct = 0
|
||||
next
|
||||
}
|
||||
|
||||
(in_struct == 1) {
|
||||
if (match($0, /^[[:space:]]+[^;\[\]]+[[:space:]]+([^[:space:]\[\];]+)(\[[^;]*\])?;$/, a)) {
|
||||
print "\t\t" prefix "." a[1] ","
|
||||
}
|
||||
}
|
@ -34,37 +34,7 @@ AC_DEFUN([st_BPF_ATTR], [dnl
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
EOF
|
||||
|
||||
fetch_structs()
|
||||
{
|
||||
local name="${1:-}"
|
||||
local name_re=
|
||||
[ -z "$name" ] ||
|
||||
name_re='\/\* '"$name"' \*\/ '
|
||||
|
||||
sed -n '/^struct BPF_[^[:space:]]\+_struct '"$name_re"'{/,/^};/p' < "$input"
|
||||
}
|
||||
|
||||
filter_entries()
|
||||
{
|
||||
local name="${1:-}"
|
||||
local subtype=
|
||||
[ -z "$name" ] ||
|
||||
subtype=".$name"
|
||||
local search='^[[:space:]]\+[^;]*[[:space:]]\([^[:space:];]\+\);$'
|
||||
local replacement='\t\tunion bpf_attr'"$subtype"'.\1,'
|
||||
sed -n "s/$search/$replacement/p" |
|
||||
sort -u
|
||||
}
|
||||
|
||||
# nameless structures in union bpf_attr
|
||||
fetch_structs |
|
||||
filter_entries
|
||||
|
||||
# named structures in union bpf_attr
|
||||
for name in $(sed -n 's/^struct BPF_[^[:space:]]\+_struct \/\* \([^[:space:]]\+\) \*\/ {.*/\1/p' < "$input"); do
|
||||
fetch_structs "$name" |
|
||||
filter_entries "$name"
|
||||
done
|
||||
gawk -f "${0%/*}"/gen_bpf_attr_m4.awk < "$input" | sort -u
|
||||
|
||||
cat <<'EOF'
|
||||
union bpf_attr.dummy
|
||||
|
82
m4/st_demangle.m4
Normal file
82
m4/st_demangle.m4
Normal file
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/m4
|
||||
#
|
||||
# Copyright (c) 2017-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.
|
||||
|
||||
AC_DEFUN([st_DEMANGLE], [dnl
|
||||
|
||||
AC_ARG_WITH([libiberty],
|
||||
[AS_HELP_STRING([--with-libiberty],
|
||||
[use libiberty to demangle symbols in stack trace])],
|
||||
[case "${withval}" in
|
||||
yes|no|check) ;;
|
||||
*) with_libiberty=yes
|
||||
libiberty_CPPFLAGS="-I${withval}/include"
|
||||
libiberty_LDFLAGS="-L${withval}/lib" ;;
|
||||
esac],
|
||||
[with_libiberty=check]
|
||||
)
|
||||
|
||||
libiberty_CPPFLAGS=
|
||||
libiberty_LDFLAGS=
|
||||
libiberty_LIBS=
|
||||
use_libiberty=no
|
||||
|
||||
AS_IF([test "x$with_libiberty" != xno],
|
||||
[saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $libiberty_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([demangle.h libiberty/demangle.h],
|
||||
[saved_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $libiberty_LDFLAGS"
|
||||
AC_CHECK_LIB([iberty],[cplus_demangle],
|
||||
[libiberty_LIBS="-liberty"
|
||||
use_libiberty=yes
|
||||
],
|
||||
[if test "x$with_libiberty" != xcheck; then
|
||||
AC_MSG_FAILURE([failed to find cplus_demangle in libiberty])
|
||||
fi
|
||||
]
|
||||
)
|
||||
LDFLAGS="$saved_LDFLAGS"
|
||||
],
|
||||
[if test "x$with_libiberty" != xcheck; then
|
||||
AC_MSG_FAILURE([failed to find demangle.h])
|
||||
fi
|
||||
]
|
||||
)
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to enable symbols demangling in stack trace])
|
||||
if test "x$use_libiberty" = xyes; then
|
||||
AC_DEFINE([USE_DEMANGLE], 1, [Do symbols demangling in stack trace])
|
||||
AC_SUBST(libiberty_LIBS)
|
||||
AC_SUBST(libiberty_LDFLAGS)
|
||||
AC_SUBST(libiberty_CPPFLAGS)
|
||||
fi
|
||||
AC_MSG_RESULT([$use_libiberty])
|
||||
|
||||
])
|
113
m4/st_libdw.m4
Normal file
113
m4/st_libdw.m4
Normal file
@ -0,0 +1,113 @@
|
||||
#!/usr/bin/m4
|
||||
#
|
||||
# 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.
|
||||
|
||||
AC_DEFUN([st_ARG_LIBDW], [dnl
|
||||
|
||||
: ${libdw_CPPFLAGS=}
|
||||
: ${libdw_CFLAGS=}
|
||||
: ${libdw_LDFLAGS=}
|
||||
: ${libdw_LIBS=}
|
||||
|
||||
AC_ARG_WITH([libdw],
|
||||
[AS_HELP_STRING([--with-libdw],
|
||||
[use libdw to implement stack tracing support]
|
||||
)
|
||||
],
|
||||
[case "${withval}" in
|
||||
yes|no|check) ;;
|
||||
*) libdw_CPPFLAGS="-I${withval}/include"
|
||||
libdw_LDFLAGS="-L${withval}/lib"
|
||||
with_libdw=yes ;;
|
||||
esac
|
||||
],
|
||||
[with_libdw=check]
|
||||
)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([st_LIBDW], [dnl
|
||||
|
||||
have_libdw=
|
||||
|
||||
AS_IF([test "x$with_libdw" != xno && test "x$use_unwinder" = x],
|
||||
[saved_CPPFLAGS="$CPPFLAGS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $libdw_CPPFLAGS"
|
||||
CFLAGS="$CFLAGS $libdw_CFLAGS"
|
||||
|
||||
AC_CHECK_HEADERS([elfutils/libdwfl.h],
|
||||
[AC_CHECK_LIB([dw], [dwfl_linux_proc_attach],
|
||||
[libdw_LIBS="-ldw $libdw_LIBS"
|
||||
AC_CACHE_CHECK([for elfutils version],
|
||||
[st_cv_ELFUTILS_VERSION],
|
||||
[[st_cv_ELFUTILS_VERSION="$(echo _ELFUTILS_VERSION |
|
||||
$CPP $CPPFLAGS -P -imacros elfutils/version.h - |
|
||||
grep '^[0-9]')"
|
||||
test -n "$st_cv_ELFUTILS_VERSION" ||
|
||||
st_cv_ELFUTILS_VERSION=0
|
||||
]]
|
||||
)
|
||||
AS_IF([test "$st_cv_ELFUTILS_VERSION" -ge 164],
|
||||
[have_libdw=yes],
|
||||
[AS_IF([test "x$with_libdw" = xyes],
|
||||
[AC_MSG_ERROR([elfutils version >= 164 is required for stack tracing support])],
|
||||
[AC_MSG_WARN([elfutils version >= 164 is required for stack tracing support])]
|
||||
)
|
||||
]
|
||||
)
|
||||
],
|
||||
[AS_IF([test "x$with_libdw" = xyes],
|
||||
[AC_MSG_FAILURE([failed to find dwfl_linux_proc_attach in libdw])],
|
||||
)
|
||||
],
|
||||
[$libdw_LDFLAGS $libdw_LIBS]
|
||||
)
|
||||
],
|
||||
[AS_IF([test "x$with_libdw" = xyes],
|
||||
[AC_MSG_FAILURE([failed to find elfutils/libdwfl.h])]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
]
|
||||
)
|
||||
|
||||
AS_IF([test "x$have_libdw" = xyes],
|
||||
[use_unwinder=libdw
|
||||
AC_DEFINE([USE_LIBDW], 1,
|
||||
[Whether to use libdw for stack tracing]
|
||||
)
|
||||
AC_SUBST(libdw_CPPFLAGS)
|
||||
AC_SUBST(libdw_CFLAGS)
|
||||
AC_SUBST(libdw_LDFLAGS)
|
||||
AC_SUBST(libdw_LIBS)
|
||||
]
|
||||
)
|
||||
|
||||
])
|
119
m4/st_libunwind.m4
Normal file
119
m4/st_libunwind.m4
Normal file
@ -0,0 +1,119 @@
|
||||
#!/usr/bin/m4
|
||||
#
|
||||
# Copyright (c) 2013-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.
|
||||
|
||||
AC_DEFUN([st_ARG_LIBUNWIND], [dnl
|
||||
|
||||
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]
|
||||
)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([st_LIBUNWIND], [dnl
|
||||
|
||||
libunwind_CPPFLAGS=
|
||||
libunwind_LDFLAGS=
|
||||
libunwind_LIBS=
|
||||
|
||||
AS_IF([test "x$with_libunwind" != xno && test "x$use_unwinder" = x],
|
||||
[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_unwinder=libunwind
|
||||
],
|
||||
[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"
|
||||
]
|
||||
)
|
||||
|
||||
if test "x$use_unwinder" = xlibunwind; then
|
||||
AC_DEFINE([USE_LIBUNWIND], 1,
|
||||
[Whether to use libunwind for stack tracing])
|
||||
AC_SUBST(libunwind_LIBS)
|
||||
AC_SUBST(libunwind_LDFLAGS)
|
||||
AC_SUBST(libunwind_CPPFLAGS)
|
||||
fi
|
||||
|
||||
])
|
78
m4/st_stacktrace.m4
Normal file
78
m4/st_stacktrace.m4
Normal file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/m4
|
||||
#
|
||||
# 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.
|
||||
|
||||
AC_DEFUN([st_STACKTRACE], [dnl
|
||||
|
||||
AC_ARG_ENABLE([stacktrace],
|
||||
[AS_HELP_STRING([--enable-stacktrace=yes|no|check],
|
||||
[whether to enable stack tracing support, default is check])],
|
||||
[case "$enableval" in
|
||||
yes|no|check) enable_stacktrace="$enableval" ;;
|
||||
*) AC_MSG_ERROR([bad value $enableval for enable-stacktrace option.
|
||||
Valid options are: yes, no, check.])
|
||||
;;
|
||||
esac],
|
||||
[enable_stacktrace=check])
|
||||
|
||||
use_unwinder=
|
||||
dnl Whether to enable stack tracing support?
|
||||
|
||||
AS_IF([test x"$enable_stacktrace" != xno],
|
||||
[st_ARG_LIBDW
|
||||
st_ARG_LIBUNWIND
|
||||
AS_IF([test "x$with_libdw" = xyes && test "x$with_libunwind" = xyes],
|
||||
[AC_MSG_ERROR([--with-libdw=yes and --with-libunwind=yes are mutually exclusive])],
|
||||
[test "x$with_libdw" = xyes], [with_libunwind=no],
|
||||
[test "x$with_libunwind" = xyes], [with_libdw=no]
|
||||
)
|
||||
AS_IF([test "x$use_unwinder" = x], [st_LIBDW])
|
||||
AS_IF([test "x$use_unwinder" = x], [st_LIBUNWIND])
|
||||
AS_IF([test x"$enable_stacktrace$use_unwinder" = xyes],
|
||||
[AC_MSG_ERROR([stack tracing support requires an unwinder])]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to enable stack tracing support])
|
||||
AM_CONDITIONAL([ENABLE_STACKTRACE], [test "x$use_unwinder" != x])
|
||||
AM_CONDITIONAL([USE_LIBDW], [test "x$use_unwinder" = xlibdw])
|
||||
AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_unwinder" = xlibunwind])
|
||||
|
||||
use_libiberty=
|
||||
AS_IF([test "x$use_unwinder" != x],
|
||||
[AC_DEFINE([ENABLE_STACKTRACE], [1],
|
||||
[Define to enable stack tracing support])
|
||||
AC_DEFINE_UNQUOTED([USE_UNWINDER], ["$use_unwinder"],
|
||||
[The unwinder to use for stack tracing support])
|
||||
AC_MSG_RESULT([yes, using $use_unwinder])
|
||||
dnl As stack tracing support is enabled, check for a demangler.
|
||||
st_DEMANGLE],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
AM_CONDITIONAL([USE_DEMANGLE], [test "x$use_libiberty" = xyes])
|
||||
|
||||
])
|
2
macros.h
2
macros.h
@ -35,6 +35,8 @@
|
||||
|
||||
#define ARRAY_SIZE(a_) (sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
|
||||
|
||||
#define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
|
||||
|
||||
#define STRINGIFY(...) #__VA_ARGS__
|
||||
#define STRINGIFY_VAL(...) STRINGIFY(__VA_ARGS__)
|
||||
|
||||
|
21
maint/README-release
Normal file
21
maint/README-release
Normal file
@ -0,0 +1,21 @@
|
||||
* commit changes prepared by maint/update_copyright_years.sh
|
||||
* update copyright year number range in COPYING and debian/copyright
|
||||
* prepare NEWS for release
|
||||
* generate release notes for strace.io and git repository mirrors
|
||||
using maint/gen-release-notes.sh, maint/gen-release-github.sh
|
||||
and maint/gen-release-gitlab.sh
|
||||
* create a release tag using maint/gen-tag-message.sh
|
||||
* generate a release tarball using make-dist
|
||||
* send the tarball to release farms for the final testing
|
||||
* prepare and test package builds for ALT and Rawhide
|
||||
* generate a detached signature for the tarball using gpg -ab
|
||||
* push the release tag to all git repository mirrors
|
||||
* upload the tarball, it's signature and release notes to strace.io
|
||||
and all git repository mirrors
|
||||
* adjust the link to the latest release at strace.io
|
||||
* submit a release announce to strace-devel
|
||||
* update irc #strace topic using /topic #strace
|
||||
* update https://en.wikipedia.org/wiki/Strace
|
||||
* tweet the news
|
||||
* announce the new release at http://freshcode.club/projects/strace
|
||||
* announce the new release at other news-related sites
|
12
maint/gen-release-github.sh
Executable file
12
maint/gen-release-github.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
"$(dirname "$0")"/gen-tag-message.sh |
|
||||
sed 's/\([^[:space:]]\)\*/\1\\*/g'
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
Downloads
|
||||
=========
|
||||
|
||||
**Please ignore so called "Source code" links provided by github above, they are useless**.
|
||||
EOF
|
22
maint/gen-release-gitlab.sh
Executable file
22
maint/gen-release-gitlab.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
cat <<'EOF'
|
||||
Downloads
|
||||
=========
|
||||
|
||||
EOF
|
||||
|
||||
set +f
|
||||
set -- strace-*.tar.xz*
|
||||
set -f
|
||||
for f; do
|
||||
printf '[%s](/uploads/%s/%s)\n' "$f" "..." "$f"
|
||||
done
|
||||
|
||||
cat <<'EOF'
|
||||
**Please ignore so called "Source code" links provided by gitlab, they are useless**.
|
||||
|
||||
EOF
|
||||
|
||||
"$(dirname "$0")"/gen-tag-message.sh |
|
||||
sed 's/\([^[:space:]]\)\*/\1\\*/g'
|
5
maint/gen-release-notes.sh
Executable file
5
maint/gen-release-notes.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
echo '<pre>'
|
||||
"$(dirname "$0")"/gen-tag-message.sh
|
||||
echo '</pre>'
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh -efu
|
||||
# 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
|
||||
@ -65,4 +66,5 @@ changes or bug reports. These include:
|
||||
|
||||
__EOF__
|
||||
|
||||
"$(dirname "$0")"/gen-contributors-list.sh
|
||||
"$(dirname "$0")"/gen-contributors-list.sh |
|
||||
sed 's/^./* &/'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user