* [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return
@ 2025-11-26 22:31 Osama Abdelkader
2025-11-27 2:14 ` Masami Hiramatsu
2025-11-27 3:59 ` Anshuman Khandual
0 siblings, 2 replies; 3+ messages in thread
From: Osama Abdelkader @ 2025-11-26 22:31 UTC (permalink / raw)
To: mhiramat, oleg, peterz, catalin.marinas, will
Cc: linux-arm-kernel, linux-kernel, linux-trace-kernel,
Osama Abdelkader
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return
2025-11-26 22:31 [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return Osama Abdelkader
@ 2025-11-27 2:14 ` Masami Hiramatsu
2025-11-27 3:59 ` Anshuman Khandual
1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2025-11-27 2:14 UTC (permalink / raw)
To: Osama Abdelkader
Cc: oleg, peterz, catalin.marinas, will, linux-arm-kernel,
linux-kernel, linux-trace-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return
2025-11-26 22:31 [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return Osama Abdelkader
2025-11-27 2:14 ` Masami Hiramatsu
@ 2025-11-27 3:59 ` Anshuman Khandual
1 sibling, 0 replies; 3+ messages in thread
From: Anshuman Khandual @ 2025-11-27 3:59 UTC (permalink / raw)
To: Osama Abdelkader, mhiramat, oleg, peterz, catalin.marinas, will
Cc: linux-arm-kernel, linux-kernel, linux-trace-kernel
On 27/11/25 4:01 AM, Osama Abdelkader 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>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-27 3:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 22:31 [PATCH] arm64: simplify arch_uprobe_xol_was_trapped return Osama Abdelkader
2025-11-27 2:14 ` Masami Hiramatsu
2025-11-27 3:59 ` Anshuman Khandual
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).