]> granicus.if.org Git - strace/commit
bpf: implement decoding of BPF_TASK_FD_QUERY command
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 13 Mar 2019 18:38:51 +0000 (18:38 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 13 Mar 2019 18:38:51 +0000 (18:38 +0000)
commit4207c1115d11f40a9cb045bb61128fe49ad760e7
treed3dc5eb01fdc10268802c4164c3e6bea81e30eb4
parent0373ab459fd1cd25c1c702b1094e517543a52cc9
bpf: implement decoding of BPF_TASK_FD_QUERY command

BPF_TASK_FD_QUERY command was introduced by Linux commit
v4.18-rc1~114^2~148^2~1^2~5.

* bpf_attr.h (struct BPF_TASK_FD_QUERY_struct): New type.
(BPF_TASK_FD_QUERY_struct_size,
expected_BPF_TASK_FD_QUERY_struct_size): New macros.
* bpf.c: Include "xlat/bpf_task_fd_type.h".
(BEGIN_BPF_CMD_DECODER(BPF_TASK_FD_QUERY)): New bpf command decoder.
(SYS_FUNC(bpf)) <bpf_cmd_decoders[]>: Add
BPF_CMD_ENTRY(BPF_TASK_FD_QUERY).
* xlat/bpf_task_fd_type.in: New file.
* tests/bpf.c (union bpf_attr_data): Add
BPF_ATTR_DATA_FIELD(BPF_TASK_FD_QUERY).
(BPF_TASK_FD_QUERY_checks): New checks array.
(main) <checks>: Add CHK(BPF_TASK_FD_QUERY).
bpf.c
bpf_attr.h
tests/bpf.c
xlat/bpf_task_fd_type.in [new file with mode: 0644]