]> granicus.if.org Git - strace/commit
bpf: implement decoding of BPF_BTF_LOAD 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)
commitbc4224a8fa641819d42639ac5b3252681304bfc3
treecbc7319b4f5b7b6860f9985b680b643ad6d26fc6
parent525638312734aacbc4bb226e614f3ec910adee9c
bpf: implement decoding of BPF_BTF_LOAD command

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

* bpf_attr.h (struct BPF_BTF_LOAD_struct): New type.
(BPF_BTF_LOAD_struct_size, expected_BPF_BTF_LOAD_struct_size): New
macros.
* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_BTF_LOAD)): New bpf command decoder.
(SYS_FUNC(bpf)) <bpf_cmd_decoders[]>: Add BPF_CMD_ENTRY(BPF_BTF_LOAD).
* tests/bpf.c (union bpf_attr_data): Add
BPF_ATTR_DATA_FIELD(BPF_BTF_LOAD).
(init_BPF_BTF_LOAD_attr): New function.
(BPF_BTF_LOAD_checks): New checks array.
(main) <checks>: Add CHK(BPF_BTF_LOAD).
bpf.c
bpf_attr.h
tests/bpf.c