From: David Sterba <dsterba@suse.cz>
To: Christian Brauner <brauner@kernel.org>
Cc: David Sterba <dsterba@suse.cz>,
Bernd Schubert <bschubert@ddn.com>,
linux-fsdevel@vger.kernel.org, bernd.schubert@fastmail.fm,
miklos@szeredi.hu, dsingh@ddn.com,
Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH v2 0/2] Use exclusive lock for file_remove_privs
Date: Thu, 7 Sep 2023 16:00:14 +0200 [thread overview]
Message-ID: <20230907140014.GP3159@twin.jikos.cz> (raw)
In-Reply-To: <20230906-teeservice-erbfolge-a23bfa3180eb@brauner>
On Wed, Sep 06, 2023 at 04:43:22PM +0200, Christian Brauner wrote:
> On Tue, Sep 05, 2023 at 08:02:59PM +0200, David Sterba wrote:
> > On Thu, Aug 31, 2023 at 01:24:29PM +0200, Bernd Schubert wrote:
> > > While adding shared direct IO write locks to fuse Miklos noticed
> > > that file_remove_privs() needs an exclusive lock. I then
> > > noticed that btrfs actually has the same issue as I had in my patch,
> > > it was calling into that function with a shared lock.
> > > This series adds a new exported function file_needs_remove_privs(),
> > > which used by the follow up btrfs patch and will be used by the
> > > DIO code path in fuse as well. If that function returns any mask
> > > the shared lock needs to be dropped and replaced by the exclusive
> > > variant.
> > >
> > > Note: Compilation tested only.
> >
> > The fix makes sense, there should be no noticeable performance impact,
> > basically the same check is done in the newly exported helper for the
> > IS_NOSEC bit. I can give it a test locally for the default case, I'm
> > not sure if we have specific tests for the security layers in fstests.
> >
> > Regarding merge, I can take the two patches via btrfs tree or can wait
> > until the export is present in Linus' tree in case FUSE needs it
> > independently.
>
> Both fuse and btrfs need it afaict. We can grab it and provide a tag
> post -rc1? Whatever works best.
Git tree sync won't be needed, Bernd sent the fix within btrfs code.
prev parent reply other threads:[~2023-09-07 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 11:24 [PATCH v2 0/2] Use exclusive lock for file_remove_privs Bernd Schubert
2023-08-31 11:24 ` [PATCH 1/2] fs: Add and export file_needs_remove_privs Bernd Schubert
2023-08-31 13:16 ` Christian Brauner
2023-08-31 13:40 ` Christian Brauner
2023-08-31 14:17 ` Bernd Schubert
2023-09-01 12:50 ` Christian Brauner
2023-08-31 11:24 ` [PATCH 2/2] btrfs: file_remove_privs needs an exclusive lock Bernd Schubert
2023-09-05 18:02 ` [PATCH v2 0/2] Use exclusive lock for file_remove_privs David Sterba
2023-09-06 14:43 ` Christian Brauner
2023-09-06 14:51 ` Bernd Schubert
2023-09-06 15:07 ` Christian Brauner
2023-09-07 14:00 ` David Sterba [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=20230907140014.GP3159@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=bernd.schubert@fastmail.fm \
--cc=brauner@kernel.org \
--cc=bschubert@ddn.com \
--cc=dsingh@ddn.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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