summaryrefslogtreecommitdiffstats
path: root/tools/lib/vsprintf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko2019-08-01 09:24:05 +0200
committerAlexei Starovoitov2019-08-01 22:10:45 +0200
commit3415ec643e7bd644b03026efbe2f2b36cbe9b34b (patch)
tree61ba0d59447f209b532a7a5481c202209d75d278 /tools/lib/vsprintf.c
parentlibbpf : make libbpf_num_possible_cpus function thread safe (diff)
downloadkernel-qcow2-linux-3415ec643e7bd644b03026efbe2f2b36cbe9b34b.tar.gz
kernel-qcow2-linux-3415ec643e7bd644b03026efbe2f2b36cbe9b34b.tar.xz
kernel-qcow2-linux-3415ec643e7bd644b03026efbe2f2b36cbe9b34b.zip
libbpf: set BTF FD for prog only when there is supported .BTF.ext data
5d01ab7bac46 ("libbpf: fix erroneous multi-closing of BTF FD") introduced backwards-compatibility issue, manifesting itself as -E2BIG error returned on program load due to unknown non-zero btf_fd attribute value for BPF_PROG_LOAD sys_bpf() sub-command. This patch fixes bug by ensuring that we only ever associate BTF FD with program if there is a BTF.ext data that was successfully loaded into kernel, which automatically means kernel supports func_info/line_info and associated BTF FD for progs (checked and ensured also by BTF sanitization code). Fixes: 5d01ab7bac46 ("libbpf: fix erroneous multi-closing of BTF FD") Reported-by: Andrey Ignatov <rdna@fb.com> Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/vsprintf.c')
0 files changed, 0 insertions, 0 deletions