Skip to contentSkip to conversation

io_uring, audit: don't log IORING_OP_RECV_ZC

PATCH Applied Ricardo Robaina 3 participants 5 messages Jun 16 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_uring, audit: don't log IORING_OP_RECV_ZC

IORING_OP_RECV_ZC is a read operation. Audit only tracks file/socket creation, not subsequent reads. Set audit_skip to align with audit-userspace uringop_table.h.

Fixes 11ed914bbf94 ("io_uring/zcrx: add io_recvzc request")
---
 io_uring/opdef.c | 1 +
 1 file changed, 1 insertion(+)
io_uring/opdef.c +1 -0
index c3ef52b70811..fef134a21113 100644
@@ -519,6 +519,7 @@ const struct io_issue_def io_issue_defs[] = {
 #endif
 	},
 	[IORING_OP_RECV_ZC] = {
+		.audit_skip		= 1,
 		.needs_file		= 1,
 		.unbound_nonreg_file	= 1,
 		.pollin			= 1,
Signature · 1 line
2.53.0
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Ricardo Robaina

IORING_OP_RECV_ZC is a read operation. Audit only tracks file/socket creation ...

That's not strictly correct, audit tracks more than just socket creation. Connection events and connection-less writes are also of interest.

Quoted 2 lines

... not subsequent reads. Set audit_skip to align with audit-userspace uringop_table.h.

While the logic above is correct, IORING_OP_RECV_ZC should be "audit_skip", the reasoning is backwards: the audit userspace io_uring table is dependent on the kernel, not the other way around (for what should be obvious reasons).

Quoted 21 lines
Fixes 11ed914bbf94 ("io_uring/zcrx: add io_recvzc request")
---
 io_uring/opdef.c | 1 +
 1 file changed, 1 insertion(+)
io_uring/opdef.c +1 -1
index c3ef52b70811..fef134a21113 100644
@@ -519,6 +519,7 @@ const struct io_issue_def io_issue_defs[] = {
 #endif
        },
        [IORING_OP_RECV_ZC] = {
+               .audit_skip             = 1,
                .needs_file             = 1,
                .unbound_nonreg_file    = 1,
                .pollin                 = 1,
--

2.53.0

Signature · 1 line
paul-moore.com
#2 lore raw
Quoted 36 lines · Paul Moore
Quoted 3 lines · Ricardo Robaina

IORING_OP_RECV_ZC is a read operation. Audit only tracks file/socket creation ...

That's not strictly correct, audit tracks more than just socket creation. Connection events and connection-less writes are also of interest.

Quoted 2 lines

... not subsequent reads. Set audit_skip to align with audit-userspace uringop_table.h.

While the logic above is correct, IORING_OP_RECV_ZC should be "audit_skip", the reasoning is backwards: the audit userspace io_uring table is dependent on the kernel, not the other way around (for what should be obvious reasons).

Quoted 16 lines
Fixes 11ed914bbf94 ("io_uring/zcrx: add io_recvzc request")
---
 io_uring/opdef.c | 1 +
 1 file changed, 1 insertion(+)
io_uring/opdef.c +1 -0
index c3ef52b70811..fef134a21113 100644
@@ -519,6 +519,7 @@ const struct io_issue_def io_issue_defs[] = {
 #endif
        },
        [IORING_OP_RECV_ZC] = {
+               .audit_skip             = 1,
Quoted 9 lines
Quoted 5 lines
io_uring/opdef.c +0 -1
                .needs_file             = 1,
                .unbound_nonreg_file    = 1,
                .pollin                 = 1,
--

2.53.0

--
paul-moore.com

Thanks for reviewing the patch and the clarification, Paul!

-Ricardo

maintainer Applied
#3 lore raw
In reply to Ricardo Robaina
Quoted 3 lines · Ricardo Robaina

IORING_OP_RECV_ZC is a read operation. Audit only tracks file/socket creation, not subsequent reads. Set audit_skip to align with audit-userspace uringop_table.h.

Applied, thanks!

[1/1] io_uring, audit: don't log IORING_OP_RECV_ZC

      commit: bdc2fc388c348ee14b4f984ff75f2ea440cefd44

Best regards,

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 7 lines · Jens Axboe
Quoted 3 lines · Ricardo Robaina

IORING_OP_RECV_ZC is a read operation. Audit only tracks file/socket creation, not subsequent reads. Set audit_skip to align with audit-userspace uringop_table.h.

Quoted 11 lines

Applied, thanks!

[1/1] io_uring, audit: don't log IORING_OP_RECV_ZC

      commit: bdc2fc388c348ee14b4f984ff75f2ea440cefd44

Best regards,
--
Jens Axboe

Thanks, Jens!