* [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record
@ 2026-08-13 17:02 Ricardo Robaina
2026-08-13 17:02 ` [PATCH 01/13] " Ricardo Robaina
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
The SYSCALL record currently logs only four of the six syscall
arguments (a0-a3), silently discarding the remaining two. This
leads to the need for auxiliary records when audit-relevant
data lands in the 5th or 6th argument of a syscall.
This series extends the SYSCALL record to log all six arguments,
by adding arguments a4 and a5 inline within the existing record.
The audit testsuite runs successfully:
# make test
make -C tests test
chmod +x */test
Running as user root
with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
on system Fedora
amcast_joinpart/test ................. ok
backlog_wait_time_actual_reset/test .. ok
bpf/test ............................. ok
coredump/test ........................ ok
exec_execve/test ..................... ok
exec_name/test ....................... ok
fanotify/test ........................ ok
field_compare/test ................... ok
file_create/test ..................... ok
file_delete/test ..................... ok
file_permission/test ................. ok
file_rename/test ..................... ok
filter_device/test ................... ok
filter_exclude/test .................. ok
filter_exit/test ..................... ok
filter_inode/test .................... ok
filter_saddr_fam/test ................ ok
filter_sessionid/test ................ ok
io_uring/test ........................ ok
login_tty/test ....................... ok
lost_reset/test ...................... ok
netfilter_pkt/test ................... ok
signal/test .......................... ok
syscalls_file/test ................... ok
syscall_module/test .................. ok
syscall_socketcall/test .............. ok
time_change/test ..................... ok
user_msg/test ........................ ok
All tests successful.
Result: PASS
Ricardo Robaina (13):
audit: log all six syscall arguments in the SYSCALL record
alpha: pass all six syscall args to audit_syscall_entry()
arm: pass all six syscall args to audit_syscall_entry()
arm64: pass all six syscall args to audit_syscall_entry()
csky: pass all six syscall args to audit_syscall_entry()
microblaze: pass all six syscall args to audit_syscall_entry()
mips: pass all six syscall args to audit_syscall_entry()
openrisc: pass all six syscall args to audit_syscall_entry()
parisc: pass all six syscall args to audit_syscall_entry()
sh: pass all six syscall args to audit_syscall_entry()
sparc64: pass all six syscall args to audit_syscall_entry()
um: pass all six syscall args to audit_syscall_entry()
xtensa: pass all six syscall args to audit_syscall_entry()
arch/alpha/kernel/ptrace.c | 3 ++-
arch/arm/kernel/ptrace.c | 2 +-
arch/arm64/kernel/ptrace.c | 3 ++-
arch/csky/kernel/ptrace.c | 3 ++-
arch/microblaze/kernel/ptrace.c | 3 ++-
arch/mips/kernel/ptrace.c | 11 ++++++++---
arch/openrisc/kernel/ptrace.c | 3 ++-
arch/parisc/kernel/ptrace.c | 7 +++++--
arch/sh/kernel/ptrace_32.c | 3 ++-
arch/sparc/kernel/ptrace_64.c | 3 ++-
arch/um/kernel/ptrace.c | 4 +++-
arch/xtensa/kernel/ptrace.c | 3 ++-
include/linux/audit.h | 11 +++++++----
include/linux/entry-common.h | 3 ++-
include/uapi/linux/audit.h | 2 ++
kernel/audit.h | 2 +-
kernel/auditfilter.c | 2 ++
kernel/auditsc.c | 31 ++++++++++++++++++++-----------
18 files changed, 67 insertions(+), 32 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 01/13] audit: log all six syscall arguments in the SYSCALL record
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 02/13] alpha: pass all six syscall args to audit_syscall_entry() Ricardo Robaina
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
The SYSCALL record currently logs only four of the six syscall
arguments (a0-a3). The remaining two are captured but silently
discarded before reaching the audit context. This leads to the
need for auxiliary records when audit-relevant data lands in
the 5th or 6th argument of a syscall.
Extend the SYSCALL record to log all six arguments, by adding
arguments a4 and a5 (5th and 6th syscall argument respectively)
inline within the existing record. Additionally, add the two
new args to audit rules switch case, so audit rules can filter
on them. Lastly, as a minor cleanup, rename params from (a1-a4)
to (a0-a5) in __audit_syscall_entry(), for consistency.
type=SYSCALL ... syscall=openat ... a3=0x0 a4=0 a5=0 ...
type=SYSCALL ... syscall=sendto ... a3=0x0 a4=7fff68843bcc a5=c ...
Link: https://lore.kernel.org/audit/CAHC9VhSjEt_-Bsra4AEqWv+Daw5Ff=gqy7dX4Ah11RVhdyCBUQ@mail.gmail.com/T/#t
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
include/linux/audit.h | 11 +++++++----
include/linux/entry-common.h | 3 ++-
include/uapi/linux/audit.h | 2 ++
kernel/audit.h | 2 +-
kernel/auditfilter.c | 2 ++
kernel/auditsc.c | 31 ++++++++++++++++++++-----------
6 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 45abb3722d30..7306d7861159 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -324,7 +324,8 @@ extern void __audit_free(struct task_struct *task);
extern void __audit_uring_entry(u8 op);
extern void __audit_uring_exit(int success, long code);
extern void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1,
- unsigned long a2, unsigned long a3);
+ unsigned long a2, unsigned long a3,
+ unsigned long a4, unsigned long a5);
extern void __audit_syscall_exit(int ret_success, long ret_value);
extern void __audit_getname(struct filename *name);
extern void __audit_inode(struct filename *name, const struct dentry *dentry,
@@ -375,10 +376,11 @@ static inline void audit_uring_exit(int success, long code)
}
static inline void audit_syscall_entry(int major, unsigned long a0,
unsigned long a1, unsigned long a2,
- unsigned long a3)
+ unsigned long a3, unsigned long a4,
+ unsigned long a5)
{
if (unlikely(audit_context()))
- __audit_syscall_entry(major, a0, a1, a2, a3);
+ __audit_syscall_entry(major, a0, a1, a2, a3, a4, a5);
}
static inline void audit_syscall_exit(void *pt_regs)
{
@@ -613,7 +615,8 @@ static inline void audit_uring_exit(int success, long code)
{ }
static inline void audit_syscall_entry(int major, unsigned long a0,
unsigned long a1, unsigned long a2,
- unsigned long a3)
+ unsigned long a3, unsigned long a4,
+ unsigned long a5)
{ }
static inline void audit_syscall_exit(void *pt_regs)
{ }
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index 416a3352261f..cf2d9989e3fe 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -65,7 +65,8 @@ static inline void syscall_enter_audit(struct pt_regs *regs, long syscall)
unsigned long args[6];
syscall_get_arguments(current, regs, args);
- audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]);
+ audit_syscall_entry(syscall, args[0], args[1], args[2], args[3],
+ args[4], args[5]);
}
}
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index e8f5ce677df7..6726059d6df1 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -303,6 +303,8 @@
#define AUDIT_ARG1 (AUDIT_ARG0+1)
#define AUDIT_ARG2 (AUDIT_ARG0+2)
#define AUDIT_ARG3 (AUDIT_ARG0+3)
+#define AUDIT_ARG4 (AUDIT_ARG0+4)
+#define AUDIT_ARG5 (AUDIT_ARG0+5)
#define AUDIT_FILTERKEY 210
diff --git a/kernel/audit.h b/kernel/audit.h
index 92d5e723d570..83011b14af18 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -117,7 +117,7 @@ struct audit_context {
struct audit_stamp stamp; /* event identifier */
int major; /* syscall number */
int uring_op; /* uring operation */
- unsigned long argv[4]; /* syscall arguments */
+ unsigned long argv[6]; /* syscall arguments */
long return_code;/* syscall return code */
u64 prio;
int return_valid; /* return code is valid */
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 7f791afe5791..4bf539d6937d 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -358,6 +358,8 @@ static int audit_field_valid(struct audit_entry *entry, struct audit_field *f)
case AUDIT_ARG1:
case AUDIT_ARG2:
case AUDIT_ARG3:
+ case AUDIT_ARG4:
+ case AUDIT_ARG5:
case AUDIT_PERS: /* <uapi/linux/personality.h> */
case AUDIT_DEVMINOR:
/* all ops are valid */
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 6610e667c728..7a9d65a6b1cc 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -728,6 +728,8 @@ static int audit_filter_rules(struct task_struct *tsk,
case AUDIT_ARG1:
case AUDIT_ARG2:
case AUDIT_ARG3:
+ case AUDIT_ARG4:
+ case AUDIT_ARG5:
if (ctx)
result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val);
break;
@@ -1674,11 +1676,13 @@ static void audit_log_exit(void)
AUDITSC_SUCCESS),
context->return_code);
audit_log_format(ab,
- " a0=%lx a1=%lx a2=%lx a3=%lx items=%d",
+ " a0=%lx a1=%lx a2=%lx a3=%lx a4=%lx a5=%lx items=%d",
context->argv[0],
context->argv[1],
context->argv[2],
context->argv[3],
+ context->argv[4],
+ context->argv[5],
context->name_count);
audit_log_task_info(ab);
audit_log_key(ab, context->filterkey);
@@ -1970,10 +1974,12 @@ void __audit_uring_exit(int success, long code)
/**
* __audit_syscall_entry - fill in an audit record at syscall entry
* @major: major syscall type (function)
- * @a1: additional syscall register 1
- * @a2: additional syscall register 2
- * @a3: additional syscall register 3
- * @a4: additional syscall register 4
+ * @a0: additional syscall register 1
+ * @a1: additional syscall register 2
+ * @a2: additional syscall register 3
+ * @a3: additional syscall register 4
+ * @a4: additional syscall register 5
+ * @a5: additional syscall register 6
*
* Fill in audit context at syscall entry. This only happens if the
* audit context was created when the task was created and the state or
@@ -1983,8 +1989,9 @@ void __audit_uring_exit(int success, long code)
* will only be written if another part of the kernel requests that it
* be written).
*/
-void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2,
- unsigned long a3, unsigned long a4)
+void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1,
+ unsigned long a2, unsigned long a3,
+ unsigned long a4, unsigned long a5)
{
struct audit_context *context = audit_context();
enum audit_state state;
@@ -2012,10 +2019,12 @@ void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2,
context->arch = syscall_get_arch(current);
context->major = major;
- context->argv[0] = a1;
- context->argv[1] = a2;
- context->argv[2] = a3;
- context->argv[3] = a4;
+ context->argv[0] = a0;
+ context->argv[1] = a1;
+ context->argv[2] = a2;
+ context->argv[3] = a3;
+ context->argv[4] = a4;
+ context->argv[5] = a5;
context->context = AUDIT_CTX_SYSCALL;
context->current_state = state;
ktime_get_coarse_real_ts64(&context->stamp.ctime);
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/13] alpha: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
2026-08-13 17:02 ` [PATCH 01/13] " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 03/13] arm: " Ricardo Robaina
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (r20, r21) now that the audit core logs all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/alpha/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 0687760ea466..d90e2194b528 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -396,7 +396,8 @@ asmlinkage unsigned long syscall_trace_enter(void)
#ifdef CONFIG_AUDITSYSCALL
audit_syscall_entry(syscall_get_nr(current, regs),
- regs->r16, regs->r17, regs->r18, regs->r19);
+ regs->r16, regs->r17, regs->r18, regs->r19,
+ regs->r20, regs->r21);
#endif
return syscall_get_nr(current, regs);
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/13] arm: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
2026-08-13 17:02 ` [PATCH 01/13] " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 02/13] alpha: pass all six syscall args to audit_syscall_entry() Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 04/13] arm64: " Ricardo Robaina
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (ARM_r4, ARM_r5) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/arm/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 7951b2c06fec..ace74207738d 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -869,7 +869,7 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
trace_sys_enter(regs, scno);
audit_syscall_entry(scno, regs->ARM_r0, regs->ARM_r1, regs->ARM_r2,
- regs->ARM_r3);
+ regs->ARM_r3, regs->ARM_r4, regs->ARM_r5);
return scno;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/13] arm64: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (2 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 03/13] arm: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 05/13] csky: " Ricardo Robaina
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (regs[4], regs[5]) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/arm64/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index 4d08598e2891..093c20bff38a 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]);
return regs->syscallno;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/13] csky: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (3 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 04/13] arm64: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 06/13] microblaze: " Ricardo Robaina
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (a4, a5) now that the audit core logs all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/csky/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/ptrace.c b/arch/csky/kernel/ptrace.c
index 6bb685a2646b..562eaf23be82 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);
return 0;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/13] microblaze: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (4 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 05/13] csky: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 07/13] mips: " Ricardo Robaina
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (r9, r10) now that the audit core logs all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/microblaze/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index 5234d0c1dcaa..21bcd8dfe42d 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -147,7 +147,8 @@ asmlinkage unsigned long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;
- audit_syscall_entry(regs->r12, regs->r5, regs->r6, regs->r7, regs->r8);
+ audit_syscall_entry(regs->r12, regs->r5, regs->r6, regs->r7,
+ regs->r8, regs->r9, regs->r10);
return ret ?: regs->r12;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/13] mips: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (5 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 06/13] microblaze: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 08/13] openrisc: " Ricardo Robaina
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Use syscall_get_arguments() to retrieve all six arguments portably.
On 32-bit MIPS (O32 ABI), arguments 5 and 6 live on the user stack
rather than in registers, so direct register access would be wrong.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/mips/kernel/ptrace.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 3f4c94c88124..9e6f9accdb41 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -1334,9 +1334,14 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->regs[2]);
- audit_syscall_entry(current_thread_info()->syscall,
- regs->regs[4], regs->regs[5],
- regs->regs[6], regs->regs[7]);
+ {
+ unsigned long args[6];
+
+ syscall_get_arguments(current, regs, args);
+ audit_syscall_entry(current_thread_info()->syscall,
+ args[0], args[1], args[2], args[3],
+ args[4], args[5]);
+ }
/*
* Negative syscall numbers are mistaken for rejected syscalls, but
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/13] openrisc: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (6 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 07/13] mips: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:02 ` [PATCH 09/13] parisc: " Ricardo Robaina
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (gpr[7], gpr[8]) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/openrisc/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
index 552489b24855..197a616d6c65 100644
--- a/arch/openrisc/kernel/ptrace.c
+++ b/arch/openrisc/kernel/ptrace.c
@@ -302,7 +302,8 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
ret = -1L;
audit_syscall_entry(regs->gpr[11], regs->gpr[3], regs->gpr[4],
- regs->gpr[5], regs->gpr[6]);
+ regs->gpr[5], regs->gpr[6],
+ regs->gpr[7], regs->gpr[8]);
return ret ? : regs->gpr[11];
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/13] parisc: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (7 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 08/13] openrisc: " Ricardo Robaina
@ 2026-08-13 17:02 ` Ricardo Robaina
2026-08-13 17:03 ` [PATCH 10/13] sh: " Ricardo Robaina
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:02 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update both the native and compat audit_syscall_entry() calls to
forward the 5th and 6th syscall arguments (gr[22], gr[21]) now
that the audit core logs all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/parisc/kernel/ptrace.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 8a17ab7e6e0b..75e74d214a3b 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -362,14 +362,17 @@ long do_syscall_trace_enter(struct pt_regs *regs)
#ifdef CONFIG_64BIT
if (!is_compat_task())
audit_syscall_entry(regs->gr[20], regs->gr[26], regs->gr[25],
- regs->gr[24], regs->gr[23]);
+ regs->gr[24], regs->gr[23],
+ regs->gr[22], regs->gr[21]);
else
#endif
audit_syscall_entry(regs->gr[20] & 0xffffffff,
regs->gr[26] & 0xffffffff,
regs->gr[25] & 0xffffffff,
regs->gr[24] & 0xffffffff,
- regs->gr[23] & 0xffffffff);
+ regs->gr[23] & 0xffffffff,
+ regs->gr[22] & 0xffffffff,
+ regs->gr[21] & 0xffffffff);
/*
* Sign extend the syscall number to 64bit since it may have been
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/13] sh: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (8 preceding siblings ...)
2026-08-13 17:02 ` [PATCH 09/13] parisc: " Ricardo Robaina
@ 2026-08-13 17:03 ` Ricardo Robaina
2026-08-13 17:03 ` [PATCH 11/13] sparc64: " Ricardo Robaina
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:03 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (regs[0], regs[1]) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/sh/kernel/ptrace_32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 06f765d71a29..3efefd67b457 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -467,7 +467,8 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
trace_sys_enter(regs, regs->regs[0]);
audit_syscall_entry(regs->regs[3], regs->regs[4], regs->regs[5],
- regs->regs[6], regs->regs[7]);
+ regs->regs[6], regs->regs[7],
+ regs->regs[0], regs->regs[1]);
return 0;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 11/13] sparc64: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (9 preceding siblings ...)
2026-08-13 17:03 ` [PATCH 10/13] sh: " Ricardo Robaina
@ 2026-08-13 17:03 ` Ricardo Robaina
2026-08-13 17:03 ` [PATCH 12/13] um: " Ricardo Robaina
2026-08-13 17:03 ` [PATCH 13/13] xtensa: " Ricardo Robaina
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:03 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (UREG_I4, UREG_I5) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/sparc/kernel/ptrace_64.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 9fc67fa9336f..d0ad3200d789 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -1100,7 +1100,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
audit_syscall_entry(regs->u_regs[UREG_G1], regs->u_regs[UREG_I0],
regs->u_regs[UREG_I1], regs->u_regs[UREG_I2],
- regs->u_regs[UREG_I3]);
+ regs->u_regs[UREG_I3], regs->u_regs[UREG_I4],
+ regs->u_regs[UREG_I5]);
return ret;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 12/13] um: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (10 preceding siblings ...)
2026-08-13 17:03 ` [PATCH 11/13] sparc64: " Ricardo Robaina
@ 2026-08-13 17:03 ` Ricardo Robaina
2026-08-13 17:03 ` [PATCH 13/13] xtensa: " Ricardo Robaina
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:03 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (UPT_SYSCALL_ARG5, UPT_SYSCALL_ARG6) now that
the audit core logs all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/um/kernel/ptrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index fdbb37b5c399..c597a368592d 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -127,7 +127,9 @@ int syscall_trace_enter(struct pt_regs *regs)
UPT_SYSCALL_ARG1(®s->regs),
UPT_SYSCALL_ARG2(®s->regs),
UPT_SYSCALL_ARG3(®s->regs),
- UPT_SYSCALL_ARG4(®s->regs));
+ UPT_SYSCALL_ARG4(®s->regs),
+ UPT_SYSCALL_ARG5(®s->regs),
+ UPT_SYSCALL_ARG6(®s->regs));
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
trace_sys_enter(regs, UPT_SYSCALL_NR(®s->regs));
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 13/13] xtensa: pass all six syscall args to audit_syscall_entry()
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
` (11 preceding siblings ...)
2026-08-13 17:03 ` [PATCH 12/13] um: " Ricardo Robaina
@ 2026-08-13 17:03 ` Ricardo Robaina
12 siblings, 0 replies; 14+ messages in thread
From: Ricardo Robaina @ 2026-08-13 17:03 UTC (permalink / raw)
To: audit, linux-kernel, linux-alpha, linux-arm-kernel, linux-csky,
linux-mips, linux-openrisc, linux-parisc, linux-sh, sparclinux,
linux-um, bpf
Cc: paul, eparis, sgrubb, oleg, richard.henderson, mattst88, linmag7,
linux, catalin.marinas, will, guoren, monstr, tsbogend, jonas,
stefan.kristiansson, shorne, James.Bottomley, deller, ysato,
dalias, glaubitz, davem, andreas, richard, anton.ivanov, johannes,
chris, jcmvbkbc, tglx, peterz, luto, Ricardo Robaina
Update the audit_syscall_entry() call to forward the 5th and 6th
syscall arguments (areg[8], areg[9]) now that the audit core logs
all six.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
arch/xtensa/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index b80d54b2ea34..122a6ffc0757 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -564,7 +564,8 @@ int do_syscall_trace_enter(struct pt_regs *regs)
audit_syscall_entry(regs->syscall, regs->areg[6],
regs->areg[3], regs->areg[4],
- regs->areg[5]);
+ regs->areg[5], regs->areg[8],
+ regs->areg[9]);
return 1;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-08-13 17:06 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 17:02 [PATCH 00/13] audit: log all six syscall arguments in the SYSCALL record Ricardo Robaina
2026-08-13 17:02 ` [PATCH 01/13] " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 02/13] alpha: pass all six syscall args to audit_syscall_entry() Ricardo Robaina
2026-08-13 17:02 ` [PATCH 03/13] arm: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 04/13] arm64: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 05/13] csky: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 06/13] microblaze: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 07/13] mips: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 08/13] openrisc: " Ricardo Robaina
2026-08-13 17:02 ` [PATCH 09/13] parisc: " Ricardo Robaina
2026-08-13 17:03 ` [PATCH 10/13] sh: " Ricardo Robaina
2026-08-13 17:03 ` [PATCH 11/13] sparc64: " Ricardo Robaina
2026-08-13 17:03 ` [PATCH 12/13] um: " Ricardo Robaina
2026-08-13 17:03 ` [PATCH 13/13] xtensa: " Ricardo Robaina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).