mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Aleksa Sarai <cyphar@cyphar.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] open: make RESOLVE_CACHED correctly test for O_TMPFILE
Date: Sat, 5 Aug 2023 19:21:41 +0200	[thread overview]
Message-ID: <20230805-hasen-unbefangen-1fa5538eb0fa@brauner> (raw)
In-Reply-To: <20230805-ignorant-kahlkopf-9749ac3cd20a@brauner>

On Sat, Aug 05, 2023 at 07:17:54PM +0200, Christian Brauner wrote:
> On Sun, 06 Aug 2023 02:11:58 +1000, Aleksa Sarai wrote:
> > O_TMPFILE is actually __O_TMPFILE|O_DIRECTORY. This means that the old
> > fast-path check for RESOLVE_CACHED would reject all users passing
> > O_DIRECTORY with -EAGAIN, when in fact the intended test was to check
> > for __O_TMPFILE.

And afaict, io_uring has the same problem in

static bool io_openat_force_async(struct io_open *open)
{
        /*
         * Don't bother trying for O_TRUNC, O_CREAT, or O_TMPFILE open,
         * it'll always -EAGAIN
         */
        return open->how.flags & (O_TRUNC | O_CREAT | O_TMPFILE);
}

always forcing O_DIRECTORY lookups to go async. So that needs another
fix.

      reply	other threads:[~2023-08-05 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 16:11 Aleksa Sarai
2023-08-05 17:17 ` Christian Brauner
2023-08-05 17:21   ` Christian Brauner [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=20230805-hasen-unbefangen-1fa5538eb0fa@brauner \
    --to=brauner@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cyphar@cyphar.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®