From: Masami Hiramatsu <mhiramat@kernel.org>
To: zhouchuangao <zhouchuangao@vivo.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
Qais Yousef <qais.yousef@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.
Date: Fri, 2 Apr 2021 06:21:49 +0900 [thread overview]
Message-ID: <20210402062149.98ad11a0ec940cef86122fc2@kernel.org> (raw)
In-Reply-To: <1617105472-6081-1-git-send-email-zhouchuangao@vivo.com>
On Tue, 30 Mar 2021 04:57:50 -0700
zhouchuangao <zhouchuangao@vivo.com> wrote:
> It can be optimized at compile time.
>
Anyway, this seems to make the code simpler.
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
> Signed-off-by: zhouchuangao <zhouchuangao@vivo.com>
> ---
> arch/arm64/kernel/probes/kprobes.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
> index 66aac28..ecf0f61 100644
> --- a/arch/arm64/kernel/probes/kprobes.c
> +++ b/arch/arm64/kernel/probes/kprobes.c
> @@ -264,8 +264,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
> * normal page fault.
> */
> instruction_pointer_set(regs, (unsigned long) cur->addr);
> - if (!instruction_pointer(regs))
> - BUG();
> + BUG_ON(!instruction_pointer(regs));
>
> if (kcb->kprobe_status == KPROBE_REENTER)
> restore_previous_kprobe(kcb);
> --
> 2.7.4
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2021-04-01 21:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 11:57 zhouchuangao
2021-03-30 12:08 ` Will Deacon
2021-04-01 10:49 ` 周传高
2021-04-01 21:21 ` Masami Hiramatsu [this message]
2021-04-14 10:07 ` Catalin Marinas
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=20210402062149.98ad11a0ec940cef86122fc2@kernel.org \
--to=mhiramat@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=jean-philippe@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qais.yousef@arm.com \
--cc=will@kernel.org \
--cc=zhouchuangao@vivo.com \
/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®