diff options
| author | Andrei Matei <[email protected]> | 2020-12-03 04:34:10 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2020-12-03 19:37:05 +0000 |
| commit | 80b2b5c3a701d56de98d00d99bc9cc384fb316d9 (patch) | |
| tree | de3e4fcc2771f5974b06446cb2decd09c28ebf22 /tools/lib/bpf/bpf.c | |
| parent | Merge branch 'Fixes for ima selftest' (diff) | |
| download | kernel-80b2b5c3a701d56de98d00d99bc9cc384fb316d9.tar.gz kernel-80b2b5c3a701d56de98d00d99bc9cc384fb316d9.zip | |
libbpf: Fail early when loading programs with unspecified type
Before this patch, a program with unspecified type
(BPF_PROG_TYPE_UNSPEC) would be passed to the BPF syscall, only to have
the kernel reject it with an opaque invalid argument error. This patch
makes libbpf reject such programs with a nicer error message - in
particular libbpf now tries to diagnose bad ELF section names at both
open time and load time.
Signed-off-by: Andrei Matei <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf.c')
0 files changed, 0 insertions, 0 deletions
