[PATCH v18 02/14] arm64: ptrace: Rework audit_syscall_entry()

Karl Mehltretter kmehltretter at gmail.com
Sat Sep 19 09:43:19 PDT 2026


> +	if (unlikely(audit_context()))
> +		syscall_enter_audit(regs);

With arm64 defconfig and CONFIG_AUDIT=n on v7.3-rc1, building
arch/arm64/kernel/ptrace.o after this patch fails with GCC 15.2.0:

arch/arm64/kernel/ptrace.c: In function ‘syscall_trace_enter’:
arch/arm64/kernel/ptrace.c:2491:17: error: implicit declaration of function ‘syscall_enter_audit’ [-Wimplicit-function-declaration]
 2491 |                 syscall_enter_audit(regs);
      |                 ^~~~~~~~~~~~~~~~~~~

The helper is defined only under CONFIG_AUDITSYSCALL, but this call
remains when auditing is disabled. The audit_context() check does not
avoid the missing declaration.

Could the helper get an audit-disabled stub, or could this call be
guarded as well?

The same object builds after patches 1 and 13. Patch 12 still fails
with the missing declaration. Patch 13 removes the affected code, but
the intermediate commits should remain buildable.

Thanks,
Karl



More information about the linux-arm-kernel mailing list