Commit f9c33dbd authored by Alexei Starovoitov's avatar Alexei Starovoitov Committed by Zheng Zengkai
Browse files

bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3



stable inclusion
from stable-5.10.17
commit 52d29b4783268df881b85e76f90da74fbeaa59eb
bugzilla: 48169

--------------------------------

[ Upstream commit 548f1191 ]

The commit 0d00449c ("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: 0d00449c ("x86: Replace ist_enter() with nmi_enter()")
Reported-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Tested-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/bpf/20210203070636.70926-1-alexei.starovoitov@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent a25e2924
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment