summaryrefslogtreecommitdiff
path: root/kernel/trace/bpf_trace.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-10-17 23:09:33 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-10-18 20:55:54 +0200
commitc108e3c1bdbd0783d7c19ee80abb0591f79029e8 (patch)
tree726b10886246a205b1bf14d0d5b87f8d7b2b971c /kernel/trace/bpf_trace.c
parent47a92ae074c3d166fa6476d1dfe581bc0356352e (diff)
downloadlinux-c108e3c1bdbd0783d7c19ee80abb0591f79029e8.tar.gz
linux-c108e3c1bdbd0783d7c19ee80abb0591f79029e8.tar.bz2
linux-c108e3c1bdbd0783d7c19ee80abb0591f79029e8.zip
bpf: Fix bpf_attr.attach_btf_id check
Only raw_tracepoint program type can have bpf_attr.attach_btf_id >= 0. Make sure to reject other program types that accidentally set it to non-zero. Fixes: ccfe29eb29c2 ("bpf: Add attach_btf_id attribute to program load") Reported-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20191018060933.2950231-1-ast@kernel.org
Diffstat (limited to 'kernel/trace/bpf_trace.c')
0 files changed, 0 insertions, 0 deletions