[PATCH v15 02/11] arm64/ptrace: Refactor syscall_trace_enter/exit() to accept flags parameter
Ada Couprie Diaz
ada.coupriediaz at arm.com
Wed Jun 24 06:38:41 PDT 2026
On 11/05/2026 10:20, Jinjie Ruan wrote:
> Refactor syscall_trace_enter() and syscall_trace_exit() to move thread
> flag reading to the caller. This aligns arm64's syscall trace enter/exit
> function signature with generic entry framework.
>
> [Changes]
> 1. Function signature changes:
> - syscall_trace_enter(regs) → syscall_trace_enter(regs, flags)
> - syscall_trace_exit(regs) → syscall_trace_exit(regs, flags)
>
> 2. Move flags reading to caller:
> - Previously: read_thread_flags() called inside each function.
> - Now: caller (like el0_svc_common) passes flags as parameter.
>
> 3. Update syscall.c:
> - el0_svc_common() now passes flags to tracing functions and
> re-fetches flags before entry/exit to handle potential TIF
> updates.
>
> [Why this matters]
> - Aligns arm64 with the generic entry interface.
> - Makes future migration to generic entry framework.
>
> No functional changes intended.
>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Reviewed-by: Linus Walleij <linusw at kernel.org>
> Reviewed-by: Yeoreum Yun <yeoreum.yun at arm.com>
> Reviewed-by: Kevin Brodsky <kevin.brodsky at arm.com>
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
> ---
I was a bit confused with some parts, but those changes were made to align
exactly on the generic entry code, so makes sense !
Reviewed-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
More information about the linux-arm-kernel
mailing list