From: Jens Axboe <axboe@kernel.dk>
To: Dominik Maier <dmnk@google.com>
Cc: io-uring@vger.kernel.org, dmnk+artist@google.com
Subject: Re: [PATCH] io_uring/epoll: reject IOSQE_FIXED_FILE in io_epoll_ctl_prep()
Date: Thu, 19 Nov 2026 16:22:55 -0700 [thread overview]
Message-ID: <44e32552-98e2-4a4b-85fc-3aaa79033bd1@kernel.dk> (raw)
In-Reply-To: <20261119192223.2659961-1-dmnk@google.com>
On 11/19/26 12:22 PM, Dominik Maier wrote:
> IORING_OP_EPOLL_CTL does not set .needs_file in io_issue_defs[] and
> resolves both epfd and fd directly from the process file descriptor
> table via CLASS(fd, ...) in io_epoll_ctl().
>
> Unlike the other .needs_file = 0 operations (such as openat, statx,
> xattr, and fs helpers), io_epoll_ctl_prep() does not reject
> REQ_F_FIXED_FILE. On a ring configured with IORING_REGISTER_RESTRICTIONS
> requiring IOSQE_FIXED_FILE, submitting IORING_OP_EPOLL_CTL with
> IOSQE_FIXED_FILE set passes io_check_restriction() while operating on
> unregistered regular file descriptors.
>
> Reject REQ_F_FIXED_FILE with -EBADF in io_epoll_ctl_prep().
Seems like a case of too much LLM and too little actual thinking. The
better solution here would be to allow a fixed file, there are numerous
instances of exactly like that in io_uring. That would certainly be
worth doing, for the sake of consistency.
> This issue was discovered with an AI-assisted code review tool (ARTIST)
> and reproduced in QEMU/KVM on an unmodified v7.4-rc3 kernel without
> kernel modifications or error injection; a standalone reproducer is
> available upon maintainers' request. The fix was compile-tested with
> -Werror and checked with checkpatch.pl --strict; an equivalent fix was
> verified against the reproducer in QEMU/KVM.
Can we stop these silly disclaimers? If you insist on putting
advertisement in your emails, at least put them below the '---' so we
don't get them in the git log at least.
--
Jens Axboe
prev parent reply other threads:[~2026-11-19 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:22 [PATCH] io_uring/epoll: reject IOSQE_FIXED_FILE in io_epoll_ctl_prep() Dominik Maier
2026-11-19 23:22 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44e32552-98e2-4a4b-85fc-3aaa79033bd1@kernel.dk \
--to=axboe@kernel.dk \
--cc=dmnk+artist@google.com \
--cc=dmnk@google.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.