]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: fix detection of corrupted BPF instructions section
authorAndrii Nakryiko <andriin@fb.com>
Wed, 29 May 2019 17:36:03 +0000 (10:36 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 May 2019 23:23:34 +0000 (01:23 +0200)
commitc69be5536c288b971e2de23f00a47e0ca5c1bb72
tree4a5d05ae4f807e0a9ac4a9ab5599f57e2adac9ff
parent37c0b000b3e6c9d9ceaa6be3d247226e05ac57fb
libbpf: fix detection of corrupted BPF instructions section

Ensure that size of a section w/ BPF instruction is exactly a multiple
of BPF instruction size.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c