lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 117/121] x86/traps: Mark do_int3() NOKPROBE_SYMBOL
    Date
    From: Li Huafei <lihuafei1@huawei.com>

    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 | 1 +
    1 file changed, 1 insertion(+)

    --- a/arch/x86/kernel/traps.c
    +++ b/arch/x86/kernel/traps.c
    @@ -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)
    {

    \
     
     \ /
      Last update: 2022-03-14 13:38    [W:4.657 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site