Re: [PATCH v15 02/11] arm64/ptrace: Refactor syscall_trace_enter/exit() to accept flags parameter

From: Ada Couprie Diaz

Date: Wed Jun 24 2026 - 09:39:24 EST


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@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Reviewed-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
Reviewed-by: Kevin Brodsky <kevin.brodsky@xxxxxxx>
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
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@xxxxxxx>