[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7aa197c5-d69a-64e9-55c7-fef9cb9954e8@huawei.com>
Date: Fri, 11 Mar 2022 18:21:03 +0800
From: Li Huafei <lihuafei1@...wei.com>
To: Masami Hiramatsu <mhiramat@...nel.org>
CC: <peterz@...radead.org>, <tglx@...utronix.de>,
<alexandre.chartre@...cle.com>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <x86@...nel.org>, <hpa@...or.com>,
<laijs@...ux.alibaba.com>, <chang.seok.bae@...el.com>,
<fenghua.yu@...el.com>, <thomas.tai@...cle.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/traps: Mark do_int3() NOKPROBE_SYMBOL
On 2022/3/10 22:04, Masami Hiramatsu wrote:
> On Thu, 10 Mar 2022 20:09:15 +0800
> Li Huafei <lihuafei1@...wei.com> wrote:
>
>> 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@...wei.com>
> Good catch!
> This should be backported to stable kernel.
>
> Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
> Cc: stable@...r.kernel.org
Thanks,
Huafei
>
>
> Thank you,
>
>> ---
>> arch/x86/kernel/traps.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
>> index c9d566dcf89a..8143693a7ea6 100644
>> --- 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)
>> {
>> --
>> 2.17.1
>>
>
Powered by blists - more mailing lists