]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add override check to kprobe multi link attach
authorJiri Olsa <jolsa@kernel.org>
Thu, 7 Sep 2023 20:06:51 +0000 (22:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:57:04 +0000 (14:57 +0200)
commitb1041cab47260374f389de1e81dc9a4a3b2e4859
tree7f846e55426aafcb138708d2b8cb480b53413874
parent09635bf4cdd4adf2160198a6041bcc7ca46c0558
bpf: Add override check to kprobe multi link attach

commit 41bc46c12a8053a1b3279a379bd6b5e87b045b85 upstream.

Currently the multi_kprobe link attach does not check error
injection list for programs with bpf_override_return helper
and allows them to attach anywhere. Adding the missing check.

Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/bpf/20230907200652.926951-1-jolsa@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/bpf_trace.c