[PATCH] arm64: simplify arch_uprobe_xol_was_trapped return
Anshuman Khandual
anshuman.khandual at arm.com
Wed Nov 26 19:59:15 PST 2025
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 at gmail.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual at 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)
More information about the linux-arm-kernel
mailing list