Re: [PATCH 05/13] csky: pass all six syscall args to audit_syscall_entry()

[email protected]
Newsgroups org.kernel.vger.audit,org.kernel.vger.bpf
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a compile error by accessing `a4` and `a5` members of `struct pt_regs`, which do not exist on the csky architecture.
--

--- Patch [5]: [PATCH 05/13] csky: pass all six syscall args to audit_syscall_entry() ---
commit 048151cce10f914f8f5068a59ec81b9462f22b0f
Author: Ricardo Robaina <[email protected]>

csky: pass all six syscall args to audit_syscall_entry()

This commit updates the audit_syscall_entry() call in the csky architecture to
pass the 5th and 6th syscall arguments. It attempts to access these arguments
via the pt_regs structure.

> diff --git a/arch/csky/kernel/ptrace.c b/arch/csky/kernel/ptrace.c
> index 6bb685a2646b5..562eaf23be82d 100644
> --- a/arch/csky/kernel/ptrace.c
> +++ b/arch/csky/kernel/ptrace.c
> @@ -329,7 +329,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
>  	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
>  		trace_sys_enter(regs, syscall_get_nr(current, regs));
>  
> -	audit_syscall_entry(regs_syscallid(regs), regs->a0, regs->a1, regs->a2, regs->a3);
> +	audit_syscall_entry(regs_syscallid(regs), regs->a0, regs->a1,
> +			    regs->a2, regs->a3, regs->a4, regs->a5);

[Severity: Low]
Will this cause a build failure? Looking at struct pt_regs for csky, it
appears the a4 and a5 members do not exist. Accessing regs->a4 and regs->a5
here in syscall_trace_enter() seems like it will prevent the csky
architecture from compiling.

>  	return 0;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
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.