All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Askar Safin <safinaskar@zohomail.com>
Cc: Aleksa Sarai <cyphar@cyphar.com>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	Jan Kara <jack@suse.cz>, Ian Kent <raven@themaw.net>,
	 linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	 autofs mailing list <autofs@vger.kernel.org>,
	patches <patches@lists.linux.dev>
Subject: Re: [PATCH 0/4] vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts
Date: Mon, 25 Aug 2025 15:14:49 +0200	[thread overview]
Message-ID: <20250825-wimpel-umschalten-e1159287e5b4@brauner> (raw)
In-Reply-To: <198e1441f72.ff66ccf525195.4502015239657084211@zohomail.com>

On Mon, Aug 25, 2025 at 04:46:34PM +0400, Askar Safin wrote:
> 
>  ---- On Tue, 19 Aug 2025 12:21:33 +0400  Christian Brauner <brauner@kernel.org> wrote --- 
>  > On Mon, Aug 18, 2025 at 03:31:27PM +1000, Aleksa Sarai wrote:
>  > > I would merge the first three patches -- adding and removing code like
>  > Agreed.
> 
> May I still not merge these patches?
> 
> All they may (hypothetically) fail on their own.
> 
> If they do, then it will be valuable to know from bisection which of them failed.
> 
> Let's discuss them one-by-one.
> 
> The first patch moves checks from handle_mounts to traverse_mounts.
> But handle_mounts is not the only caller of traverse_mounts.
> traverse_mounts is also called by follow_down.
> I. e. theoretically follow_down-related code paths can lead to problems.
> I just checked all them, none of them set LOOKUP_NO_XDEV.
> So, they should not lead to problems. But in kernel we, of course, never
> can be sure. They should not lead to problems, but still can.
> 
> The second patch removes LOOKUP_NO_XDEV check.
> This is okay, because if "jumped" is set and "LOOKUP_NO_XDEV" is set, then
> this means that we already set error, and thus ND_JUMPED should
> not be read, because it is not read in error path. But this is not obvious, and
> so Al asked me add comment (
> https://lore.kernel.org/linux-fsdevel/20250817180057.GA222315@ZenIV/
> ), and, of course, I will add it in the second version in any case.
> So, ND_JUMPED should not be checked in error path, and thus this should
> not lead to problems. But still can.
> 
> The third patch makes traverse_mounts fail
> immidiately after first mount-crossing
> (if LOOKUP_NO_XDEV is set). As opposed to very end.
> This should not lead to problems. But can.
> 
> So, again, any of these 3 patches can (hypothetically)
> lead to its own problems.

You can send them separately if you like but I'll still reserve the
right to squash them when applying. I don't see the value in these
minimal changes yet and the regression potential is completely
theoretical so far.

  reply	other threads:[~2025-08-25 13:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-17 17:15 [PATCH 0/4] vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:15 ` [PATCH 1/4] vfs: fs/namei.c: move cross-device check to traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 2/4] vfs: fs/namei.c: remove LOOKUP_NO_XDEV check from handle_mounts Askar Safin
2025-08-17 18:00   ` Al Viro
2025-08-17 17:15 ` [PATCH 3/4] vfs: fs/namei.c: move cross-device check to __traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 4/4] vfs: fs/namei.c: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:53   ` Al Viro
2025-08-17 17:54     ` Al Viro
2025-08-18  5:17   ` Aleksa Sarai
2025-08-18  7:15     ` Aleksa Sarai
2025-08-25 17:48       ` Askar Safin
2025-08-18  5:31 ` [PATCH 0/4] vfs: " Aleksa Sarai
2025-08-19  8:21   ` Christian Brauner
2025-08-25 12:46     ` Askar Safin
2025-08-25 13:14       ` Christian Brauner [this message]
2025-08-19  8:24 ` Christian Brauner
2025-08-20 18:04   ` Askar Safin

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=20250825-wimpel-umschalten-e1159287e5b4@brauner \
    --to=brauner@kernel.org \
    --cc=autofs@vger.kernel.org \
    --cc=cyphar@cyphar.com \
    --cc=dhowells@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=raven@themaw.net \
    --cc=safinaskar@zohomail.com \
    --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 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.