* [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat
@ 2026-07-14 3:03 Yi Xie
2026-07-14 19:00 ` Gabriel Krisman Bertazi
2026-07-14 19:18 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Yi Xie @ 2026-07-14 3:03 UTC (permalink / raw)
To: axboe; +Cc: io-uring, linux-kernel, Yi Xie
Zero check unused SQE fields addr3 and pad2 for unlinkat. They're
not needed now, but could be used sometime in the future.
Signed-off-by: Yi Xie <xieyi@kylinos.cn>
---
io_uring/fs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/io_uring/fs.c b/io_uring/fs.c
index d0580c754bf8..26ea841a22e7 100644
--- a/io_uring/fs.c
+++ b/io_uring/fs.c
@@ -110,7 +110,8 @@ int io_unlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
const char __user *fname;
int err;
- if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in)
+ if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in ||
+ sqe->addr3 || sqe->__pad2[0])
return -EINVAL;
if (unlikely(req->flags & REQ_F_FIXED_FILE))
return -EBADF;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat
2026-07-14 3:03 [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat Yi Xie
@ 2026-07-14 19:00 ` Gabriel Krisman Bertazi
2026-07-14 19:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Gabriel Krisman Bertazi @ 2026-07-14 19:00 UTC (permalink / raw)
To: Yi Xie, axboe; +Cc: io-uring, linux-kernel, Yi Xie
Yi Xie <xieyi@kylinos.cn> writes:
> Zero check unused SQE fields addr3 and pad2 for unlinkat. They're
> not needed now, but could be used sometime in the future.
>
> Signed-off-by: Yi Xie <xieyi@kylinos.cn>
Arguably, this is a common issue across many operations. I'd love
to have a more automated way to write these checks.
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
> ---
> io_uring/fs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/io_uring/fs.c b/io_uring/fs.c
> index d0580c754bf8..26ea841a22e7 100644
> --- a/io_uring/fs.c
> +++ b/io_uring/fs.c
> @@ -110,7 +110,8 @@ int io_unlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
> const char __user *fname;
> int err;
>
> - if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in)
> + if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in ||
> + sqe->addr3 || sqe->__pad2[0])
> return -EINVAL;
> if (unlikely(req->flags & REQ_F_FIXED_FILE))
> return -EBADF;
> --
> 2.25.1
>
--
Gabriel Krisman Bertazi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat
2026-07-14 3:03 [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat Yi Xie
2026-07-14 19:00 ` Gabriel Krisman Bertazi
@ 2026-07-14 19:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-07-14 19:18 UTC (permalink / raw)
To: Yi Xie; +Cc: io-uring, linux-kernel
On Tue, 14 Jul 2026 11:03:06 +0800, Yi Xie wrote:
> Zero check unused SQE fields addr3 and pad2 for unlinkat. They're
> not needed now, but could be used sometime in the future.
Applied, thanks!
[1/5] io_uring/fs: check unused sqe fields for unlinkat
commit: cc609376e9a43166a2fba2aef6c5f9ea262ce722
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-14 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 3:03 [PATCH 1/5] io_uring/fs: check unused sqe fields for unlinkat Yi Xie
2026-07-14 19:00 ` Gabriel Krisman Bertazi
2026-07-14 19:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox