From: Linus Torvalds <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [GIT PULL] io_uring fixes for 5.10-rc
Date: Fri, 20 Nov 2020 12:02:47 -0800 [thread overview]
Message-ID: <CAHk-=wjrayP=rOB+v+2eTP8micykkM76t=6vp-hyy+vWYkL8=A@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Fri, Nov 20, 2020 at 10:45 AM Jens Axboe <[email protected]> wrote:
> Jens Axboe (4):
> proc: don't allow async path resolution of /proc/self components
This one is ok.
> io_uring: handle -EOPNOTSUPP on path resolution
But this one smells. It talks about how it shouldn't block, but the
fact is, it can easily block when the path going through another
filesystem (think ".." to get to root before even hitting /proc/self,
but also think /proc/self/cwd/randompathgoeshere).
The whole concept seems entirely broken anyway. Why would you retry
the failure after doing it asynchronously? If it really doesn't block,
then it shouldn't have been done async in the first place.
IMNSHO, the openat logic is just wrong. And that "ignore_nonblock"
thing is a disgusting hack that is everything that is wrong with
io_uring. Stop doing these kinds of hacky things that will just cause
problems down the line.
I think the correct thing to do is to just start the open
synchronously with an RCU lookup, and if that fails, go to the async
one. And if the async one fails because it's /proc/self, then it just
fails. None of this kind of "it should be ok" stuff.
And that would likely be the faster model anyway - do it synchronously
and immediately for the easy cases.
And if it really is something like "/proc/self/cwd/randompathgoeshere"
that actually will block, maybe io_uring just shouldn't support it?
I've pulled this, but I really object to how io_uring keeps having
subtle bugs, and then they get worked around with this kind of hackery
which really smells like "this will be a subtle bug some time in the
future".
Linus
next prev parent reply other threads:[~2020-11-20 20:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 18:45 [GIT PULL] io_uring fixes for 5.10-rc Jens Axboe
2020-11-20 20:02 ` Linus Torvalds [this message]
2020-11-20 21:36 ` Jens Axboe
2020-11-21 0:23 ` Linus Torvalds
2020-11-21 2:41 ` Jens Axboe
2020-11-21 3:00 ` Jens Axboe
2020-11-21 18:07 ` Linus Torvalds
2020-11-21 22:58 ` Jens Axboe
2020-12-10 17:32 ` namei.c LOOKUP_NONBLOCK (was "Re: [GIT PULL] io_uring fixes for 5.10-rc") Jens Axboe
2020-12-10 18:55 ` Linus Torvalds
2020-12-10 19:21 ` Jens Axboe
2020-11-21 0:29 ` [GIT PULL] io_uring fixes for 5.10-rc pr-tracker-bot
-- strict thread matches above, loose matches on Subject: below --
2020-11-27 20:47 Jens Axboe
2020-11-27 21:21 ` pr-tracker-bot
2020-11-13 21:18 Jens Axboe
2020-11-14 0:15 ` pr-tracker-bot
2020-11-07 20:13 Jens Axboe
2020-11-07 22:08 ` pr-tracker-bot
2020-10-30 17:09 Jens Axboe
2020-10-30 22:10 ` pr-tracker-bot
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='CAHk-=wjrayP=rOB+v+2eTP8micykkM76t=6vp-hyy+vWYkL8=A@mail.gmail.com' \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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