linux/tools/lib/bpf
Jakub Kicinski 1e960043e8 tools: libbpf: handle NULL program gracefully in bpf_program__nth_fd()
bpf_map__fd() handles NULL map gracefully and returns -EINVAL.
bpf_program__fd() and bpf_program__nth_fd() crash in this case.
Make the behaviour more consistent by validating prog pointer
as well.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-27 07:18:44 +02:00
..
.gitignore tools lib bpf: Change FEATURE-DUMP to FEATURE-DUMP.libbpf 2015-11-05 12:47:51 -03:00
bpf.c tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf 2018-05-24 18:18:19 -07:00
bpf.h tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf 2018-05-24 18:18:19 -07:00
btf.c bpf: btf: export btf types and name by offset from lib 2018-07-14 13:00:40 +02:00
btf.h bpf: btf: export btf types and name by offset from lib 2018-07-14 13:00:40 +02:00
Build tools: libbpf: move library error code into a separate file 2018-07-11 22:13:34 +02:00
libbpf_errno.c tools: libbpf: move library error code into a separate file 2018-07-11 22:13:34 +02:00
libbpf.c tools: libbpf: handle NULL program gracefully in bpf_program__nth_fd() 2018-07-27 07:18:44 +02:00
libbpf.h tools: libbpf: allow map reuse 2018-07-11 22:13:34 +02:00
Makefile tools: libbpf: remove libelf-getphdrnum feature detection 2018-07-16 16:36:49 -07:00
nlattr.c libbpf: add error reporting in XDP 2018-02-02 17:53:48 -08:00
nlattr.h libbpf: add error reporting in XDP 2018-02-02 17:53:48 -08:00