Skip to content

Commit 52d29b4

Browse files
Alexei Starovoitovgregkh
authored andcommitted
bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3
[ Upstream commit 548f119 ] The commit 0d00449 ("x86: Replace ist_enter() with nmi_enter()") converted do_int3 handler to be "NMI-like". That made old if (in_nmi()) check abort execution of bpf programs attached to kprobe when kprobe is firing via int3 (For example when kprobe is placed in the middle of the function). Remove the check to restore user visible behavior. Fixes: 0d00449 ("x86: Replace ist_enter() with nmi_enter()") Reported-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Link: https://lore.kernel.org/bpf/20210203070636.70926-1-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 40e3b5c commit 52d29b4

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎kernel/trace/bpf_trace.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ unsigned int trace_call_bpf(struct trace_event_call *call, void *ctx)
9393
{
9494
unsigned int ret;
9595

96-
if (in_nmi()) /* not supported yet */
97-
return 1;
98-
9996
cant_sleep();
10097

10198
if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1)) {

0 commit comments

Comments
 (0)