Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Tree-wide API change for `audit_syscall_entry()` missed several architectures, causing build failures due to an argument count mismatch.
--
--- Patch [4]: [PATCH 04/13] arm64: pass all six syscall args to audit_syscall_entry() ---
commit 5064bc40e84bac75de063321783c252440dbc0f5
Author: Ricardo Robaina <[email protected]>
arm64: pass all six syscall args to audit_syscall_entry()
This commit updates the arm64 syscall entry path to pass all six syscall
arguments to audit_syscall_entry(). This aligns with updates to the audit
core which now expects these additional arguments.
> diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
> index 4d08598e2891d..093c20bff38a9 100644
> --- a/arch/arm64/kernel/ptrace.c
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -2427,7 +2427,8 @@ int syscall_trace_enter(struct pt_regs *regs)
> trace_sys_enter(regs, regs->syscallno);
>
> audit_syscall_entry(regs->syscallno, regs->orig_x0, regs->regs[1],
> - regs->regs[2], regs->regs[3]);
> + regs->regs[2], regs->regs[3],
> + regs->regs[4], regs->regs[5]);
[Severity: Low]
Does this change need to be applied to other architectures as well to avoid
build failures?
It looks like several other architectures were not updated to match the new
7-argument signature of audit_syscall_entry(), which will cause them to fail
to compile due to 'too few arguments to function' errors.
For example, MIPS continues to pass only 5 arguments:
arch/mips/kernel/ptrace.c:syscall_trace_enter() {
...
audit_syscall_entry(current_thread_info()->syscall,
regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
...
}
Similar missing updates appear in C-Sky's syscall_trace_enter()
(arch/csky/kernel/ptrace.c), Microblaze's do_syscall_trace_enter()
(arch/microblaze/kernel/ptrace.c), and PowerPC's do_syscall_trace_enter()
(arch/powerpc/kernel/ptrace/ptrace.c).
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.