Re: [PATCH v13 RESEND 04/14] arm64/ptrace: Use syscall_get_arguments() helper for audit

From: Linus Walleij

Date: Thu Mar 19 2026 - 10:18:17 EST


On Tue, Mar 17, 2026 at 9:20 AM Jinjie Ruan <ruanjinjie@xxxxxxxxxx> wrote:

> Extract syscall_enter_audit() helper and use syscall_get_arguments()
> to get syscall arguments, matching the generic entry implementation.
>
> The new code:
> - Checks audit_context() first to avoid unnecessary memcpy when audit
> is not active.
> - Uses syscall_get_arguments() helper instead of directly accessing
> regs fields.
> - Is now exactly equivalent to generic entry's syscall_enter_audit().
>
> No functional changes.
>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> Reviewed-by: Kevin Brodsky <kevin.brodsky@xxxxxxx>
> Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij