From: Jens Axboe <axboe@kernel.dk>
To: Max Kellermann <mk@cm4all.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx
Date: Fri, 8 May 2020 09:29:52 -0600 [thread overview]
Message-ID: <f1f9d108-7f31-c586-330a-ce5a2f1e5bc2@kernel.dk> (raw)
In-Reply-To: <20200508064056.GA21129@rabbit.intern.cm-ag>
On 5/8/20 12:40 AM, Max Kellermann wrote:
> On 2020/05/08 08:38, Max Kellermann <mk@cm4all.com> wrote:
>> This fails for `O_PATH` file descriptors, because io_file_get() calls
>> fget(), which rejects `O_PATH` file descriptors. To support `O_PATH`,
>> fdget_raw() must be used (like path_init() in `fs/namei.c` does).
>> This rejection causes io_req_set_file() to throw `-EBADF`. This
>> breaks the operations `openat`, `openat2` and `statx`, where `O_PATH`
>> file descriptors are commonly used.
>
> Code is the same as in v1, but I investigated the root cause of the
> problem and updated the patch description.
>
> Jens, I believe this should be a separate trivial commit just removing
> those flags, to allow Greg to backport this to stable easily.
I'd prefer just to keep the single patch, the stable backports tend to
throw rejects anyway, and it's quick enough for me to just provide a
tested backport. The single version I posted also gets rid of the
extra sqe read, where we really should be doing just one, for example.
--
Jens Axboe
next prev parent reply other threads:[~2020-05-08 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 6:38 Max Kellermann
2020-05-08 6:38 ` [PATCH v2 2/2] fs/io_uring: remove unused flag fd_non_neg Max Kellermann
2020-05-08 6:40 ` [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx Max Kellermann
2020-05-08 15:29 ` Jens Axboe [this message]
2020-05-09 12:30 ` Sasha Levin
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=f1f9d108-7f31-c586-330a-ce5a2f1e5bc2@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mk@cm4all.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®