From: Masami Hiramatsu <mhiramat@kernel.org>
To: Li Huafei <lihuafei1@huawei.com>
Cc: <peterz@infradead.org>, <tglx@linutronix.de>,
<alexandre.chartre@oracle.com>, <mhiramat@kernel.org>,
<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
<x86@kernel.org>, <hpa@zytor.com>, <laijs@linux.alibaba.com>,
<chang.seok.bae@intel.com>, <fenghua.yu@intel.com>,
<thomas.tai@oracle.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/traps: Mark do_int3() NOKPROBE_SYMBOL
Date: Thu, 10 Mar 2022 23:04:24 +0900 [thread overview]
Message-ID: <20220310230424.b1f3ad6987d5aafc8b339e98@kernel.org> (raw)
In-Reply-To: <20220310120915.63349-1-lihuafei1@huawei.com>
On Thu, 10 Mar 2022 20:09:15 +0800
Li Huafei <lihuafei1@huawei.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@huawei.com>
Good catch!
This should be backported to stable kernel.
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
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
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2022-03-10 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 12:09 Li Huafei
2022-03-10 14:04 ` Masami Hiramatsu [this message]
2022-03-11 10:21 ` Li Huafei
2022-03-11 18:30 ` [tip: x86/urgent] " tip-bot2 for Li Huafei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220310230424.b1f3ad6987d5aafc8b339e98@kernel.org \
--to=mhiramat@kernel.org \
--cc=alexandre.chartre@oracle.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=laijs@linux.alibaba.com \
--cc=lihuafei1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=thomas.tai@oracle.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®