All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Christian Brauner <brauner@kernel.org>,
	Jeff Layton <jlayton@kernel.org>,
	Erin Shepherd <erin.shepherd@e43.eu>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nfs@vger.kernel.org, stable <stable@kernel.org>
Subject: Re: [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting file handles
Date: Fri, 6 Dec 2024 08:03:58 -0800	[thread overview]
Message-ID: <20241206160358.GC7820@frogsfrogsfrogs> (raw)
In-Reply-To: <CAOQ4uxjPSmrvy44AdahKjzFOcydKN8t=xBnS_bhV-vC+UBdPUg@mail.gmail.com>

On Thu, Dec 05, 2024 at 12:57:28PM +0100, Amir Goldstein wrote:
> On Thu, Dec 5, 2024 at 1:38 AM Christoph Hellwig <hch@infradead.org> wrote:
> >
> > On Sun, Dec 01, 2024 at 02:12:24PM +0100, Christian Brauner wrote:
> > > Hey,
> > >
> > > Some filesystems like kernfs and pidfs support file handles as a
> > > convenience to enable the use of name_to_handle_at(2) and
> > > open_by_handle_at(2) but don't want to and cannot be reliably exported.
> > > Add a flag that allows them to mark their export operations accordingly
> > > and make NFS check for its presence.
> > >
> > > @Amir, I'll reorder the patches such that this series comes prior to the
> > > pidfs file handle series. Doing it that way will mean that there's never
> > > a state where pidfs supports file handles while also being exportable.
> > > It's probably not a big deal but it's definitely cleaner. It also means
> > > the last patch in this series to mark pidfs as non-exportable can be
> > > dropped. Instead pidfs export operations will be marked as
> > > non-exportable in the patch that they are added in.
> >
> > Can you please invert the polarity?  Marking something as not supporting
> > is always awkward.  Clearly marking it as supporting something (and
> > writing down in detail what is required for that) is much better, even
> > it might cause a little more churn initially.
> >
> 
> Churn would be a bit annoying, but I guess it makes sense.
> I agree with Christian that it should be done as cleanup to allow for
> easier backport.
> 
> Please suggest a name for this opt-in flag.
> EXPORT_OP_NFS_EXPORT???

That's probably too specific to NFS--

AFAICT the goal here is to prevent exporting {pid,kern}fs file handles
to other nodes, correct?  Because we don't want to allow a process on
another computer to mess around with processes on the local computer?

How about:

/* file handles can be used by a process on another node */
#define EXPORT_OP_ALLOW_REMOTE_NODES	(...)

--D

> Thanks,
> Amir.
> 

  reply	other threads:[~2024-12-06 16:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-01 13:12 [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting file handles Christian Brauner
2024-12-01 13:12 ` [PATCH 1/4] exportfs: add flag to indicate local " Christian Brauner
2024-12-01 13:44   ` Amir Goldstein
2024-12-01 16:01   ` kernel test robot
2024-12-01 23:12   ` Dave Chinner
2024-12-02  9:19     ` Christian Brauner
2024-12-01 13:12 ` [PATCH 2/4] kernfs: restrict to " Christian Brauner
2024-12-01 13:12 ` [PATCH 3/4] ovl: restrict to exportable " Christian Brauner
2024-12-01 13:12 ` [PATCH 4/4] pidfs: restrict to local " Christian Brauner
2024-12-01 13:28 ` [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting " Jeff Layton
2024-12-01 16:22   ` Chuck Lever III
2024-12-03  9:08     ` Christian Brauner
2024-12-03 14:32       ` Jeff Layton
2024-12-01 13:44 ` Amir Goldstein
2024-12-05  0:38 ` Christoph Hellwig
2024-12-05 10:53   ` Christian Brauner
2024-12-05 11:57   ` Amir Goldstein
2024-12-06 16:03     ` Darrick J. Wong [this message]
2024-12-07  8:49       ` Amir Goldstein
2024-12-09  7:49         ` Christoph Hellwig
2024-12-09  8:58           ` Amir Goldstein
2024-12-09  9:16             ` Greg KH
2024-12-09 10:02               ` Amir Goldstein
2024-12-09 13:45               ` Christoph Hellwig
2024-12-09 13:46             ` Christoph Hellwig
2024-12-09 16:30               ` Amir Goldstein
2024-12-09 16:35                 ` Chuck Lever
2024-12-09 17:15                   ` Jeff Layton
2024-12-09 17:20                     ` Chuck Lever
2024-12-10 10:13                       ` Christian Brauner
2024-12-10 10:34                         ` Christian Brauner
2024-12-10 11:10                         ` Christoph Hellwig
2024-12-10 12:44                         ` Jeff Layton

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=20241206160358.GC7820@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=erin.shepherd@e43.eu \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stable@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.