mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
tracing/kprobe: bpf: Check error injectable event is on function entry
Check whether error injectable event is on function entry or not. Currently it checks the event is ftrace-based kprobes or not, but that is wrong. It should check if the event is on the entry of target function. Since error injection will override a function to just return with modified return value, that operation must be done before the target function starts making stackframe. As a side effect, bpf error injection is no need to depend on function-tracer. It can work with sw-breakpoint based kprobe events too. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
daaf24c634
commit
b4da3340ea
@@ -533,9 +533,7 @@ config FUNCTION_PROFILER
|
||||
config BPF_KPROBE_OVERRIDE
|
||||
bool "Enable BPF programs to override a kprobed function"
|
||||
depends on BPF_EVENTS
|
||||
depends on KPROBES_ON_FTRACE
|
||||
depends on HAVE_KPROBE_OVERRIDE
|
||||
depends on DYNAMIC_FTRACE_WITH_REGS
|
||||
default n
|
||||
help
|
||||
Allows BPF to override the execution of a probed function and
|
||||
|
||||
Reference in New Issue
Block a user