From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Osama Abdelkader <osama.abdelkader@gmail.com>
Cc: oleg@redhat.com, peterz@infradead.org, catalin.marinas@arm.com,
will@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return
Date: Thu, 27 Nov 2025 11:14:02 +0900 [thread overview]
Message-ID: <20251127111402.c228292177bbd2b8e88c8629@kernel.org> (raw)
In-Reply-To: <20251126223130.216302-1-osama.abdelkader@gmail.com>
On Thu, 27 Nov 2025 00:31:30 +0200
Osama Abdelkader <osama.abdelkader@gmail.com> wrote:
> convert arch_uprobe_xol_was_trapped() from explicit if/return true
> return false pattern to direct boolean expression return in
> arch/arm64/kernel/probes/uprobes.c
>
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks!
> ---
> arch/arm64/kernel/probes/uprobes.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/arm64/kernel/probes/uprobes.c b/arch/arm64/kernel/probes/uprobes.c
> index 2799bdb2fb82..b38c1dab7eb4 100644
> --- a/arch/arm64/kernel/probes/uprobes.c
> +++ b/arch/arm64/kernel/probes/uprobes.c
> @@ -103,10 +103,7 @@ bool arch_uprobe_xol_was_trapped(struct task_struct *t)
> * insn itself is trapped, then detect the case with the help of
> * invalid fault code which is being set in arch_uprobe_pre_xol
> */
> - if (t->thread.fault_code != UPROBE_INV_FAULT_CODE)
> - return true;
> -
> - return false;
> + return t->thread.fault_code != UPROBE_INV_FAULT_CODE;
> }
>
> bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
> --
> 2.43.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2025-11-27 2:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 22:31 [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return Osama Abdelkader
2025-11-27 2:14 ` Masami Hiramatsu [this message]
2025-11-27 3:59 ` Anshuman Khandual
2026-01-05 22:58 ` Will Deacon
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=20251127111402.c228292177bbd2b8e88c8629@kernel.org \
--to=mhiramat@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=osama.abdelkader@gmail.com \
--cc=peterz@infradead.org \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).