]> granicus.if.org Git - strace/commit
bpf: implement decoding of BPF_MAP_FREEZE command
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 2 Jul 2019 11:49:15 +0000 (11:49 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 2 Jul 2019 11:49:15 +0000 (11:49 +0000)
commitaf02a147ba5a56d61fe6248ea453472dfefcec3a
tree3556c0ddec3562c5e713afe72d9cabb6baaae4dc
parentf02f985e2155f609285b4f3a0e4f5117a39cb133
bpf: implement decoding of BPF_MAP_FREEZE command

BPF_MAP_FREEZE command was introduced by Linux commit
v5.2-rc1~133^2~193^2~12^2~12.

* bpf_attr.h (struct BPF_MAP_FREEZE_struct): New type.
(BPF_MAP_FREEZE_struct_size, expected_BPF_MAP_FREEZE_struct_size): New
macros.
* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_MAP_FREEZE)): New bpf command
decoder.
(SYS_FUNC(bpf)) <bpf_cmd_decoders[]>: Add BPF_CMD_ENTRY(BPF_MAP_FREEZE).
* NEWS: Mention this.
* tests/bpf.c (union bpf_attr_data): Add
BPF_ATTR_DATA_FIELD(BPF_MAP_FREEZE).
(BPF_MAP_FREEZE_checks): New checks array.
(main) <checks>: Add CHK(BPF_MAP_FREEZE).
NEWS
bpf.c
bpf_attr.h
tests/bpf.c