]> granicus.if.org Git - strace/commit
bpf: improve handling of various sizes of BPF_MAP_CREATE attributes
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 5 Mar 2018 14:53:08 +0000 (15:53 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 12 Apr 2018 23:00:29 +0000 (23:00 +0000)
commitb20f7446626a16c8fa7d56abec026e93244000a5
tree6acfd74979758dcc80c0b988ac2c4ee9b67904cf
parentb8ed708a54f0595e1fffc6fac2e72bac28f6ea7b
bpf: improve handling of various sizes of BPF_MAP_CREATE attributes

* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_MAP_CREATE)): Skip printing
the rest of the structure if len is less than the offset of the end
of max_entries, map_flags, or inner_map_fd field.
* tests/bpf.c (BPF_MAP_CREATE_checks): Add two more checks.
bpf.c
tests/bpf.c