diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-01-12 18:54:33 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-01-13 02:33:38 +0100 |
commit | 66665ad2f1023d3ffb0c12eea9e0a6d0b613ecb3 (patch) | |
tree | 2ccb32066d1acf7d5d9f56d881cd80133dba8f15 /kernel/trace/bpf_trace.c | |
parent | tracing/kprobe: bpf: Check error injectable event is on function entry (diff) | |
download | linux-66665ad2f1023d3ffb0c12eea9e0a6d0b613ecb3.tar.xz linux-66665ad2f1023d3ffb0c12eea9e0a6d0b613ecb3.zip |
tracing/kprobe: bpf: Compare instruction pointer with original one
Compare instruction pointer with original one on the
stack instead using per-cpu bpf_kprobe_override flag.
This patch also consolidates reset_current_kprobe() and
preempt_enable_no_resched() blocks. Those can be done
in one place.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r-- | kernel/trace/bpf_trace.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 1966ad3bf3e0..24ed6363e00f 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -83,7 +83,6 @@ EXPORT_SYMBOL_GPL(trace_call_bpf); #ifdef CONFIG_BPF_KPROBE_OVERRIDE BPF_CALL_2(bpf_override_return, struct pt_regs *, regs, unsigned long, rc) { - __this_cpu_write(bpf_kprobe_override, 1); regs_set_return_value(regs, rc); arch_kprobe_override_function(regs); return 0; |