]> git.ipfire.org Git - people/ms/linux.git/commitdiff
x86/traps: Mark do_int3() NOKPROBE_SYMBOL
authorLi Huafei <lihuafei1@huawei.com>
Thu, 10 Mar 2022 12:09:15 +0000 (20:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:23:45 +0000 (14:23 +0100)
commit a365a65f9ca1ceb9cf1ac29db4a4f51df7c507ad upstream.

Since kprobe_int3_handler() is called in do_int3(), probing do_int3()
can cause a breakpoint recursion and crash the kernel. Therefore,
do_int3() should be marked as NOKPROBE_SYMBOL.

Fixes: 21e28290b317 ("x86/traps: Split int3 handler up")
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220310120915.63349-1-lihuafei1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/traps.c

index 5b1984d468227be4662f25f0ba81c213041048a0..928e1ac820e67c871762dd927f71a037df7e80fe 100644 (file)
@@ -659,6 +659,7 @@ static bool do_int3(struct pt_regs *regs)
 
        return res == NOTIFY_STOP;
 }
+NOKPROBE_SYMBOL(do_int3);
 
 static void do_int3_user(struct pt_regs *regs)
 {