From: Al Viro <viro@zeniv.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>,
Casey Schaufler <casey@schaufler-ca.com>,
"Christian Brauner (Microsoft)" <brauner@kernel.org>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>,
Scott Mayhew <smayhew@redhat.com>,
Paul Moore <paul@paul-moore.com>,
linux-nfs@vger.kernel.org, selinux@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
Date: Sat, 19 Nov 2022 08:48:20 +0000 [thread overview]
Message-ID: <Y3iYVFT40L0+/MzO@ZenIV> (raw)
In-Reply-To: <166807856758.2972602.14175912201162072721.stgit@warthog.procyon.org.uk>
On Thu, Nov 10, 2022 at 11:09:27AM +0000, David Howells wrote:
> When NFS superblocks are created by automounting, their LSM parameters
> aren't set in the fs_context struct prior to sget_fc() being called,
> leading to failure to match existing superblocks.
>
> Fix this by adding a new LSM hook to load fc->security for submount
> creation when alloc_fs_context() is creating the fs_context for it.
FWIW, it feels like security_sb_mnt_opts_compat() would be a saner place
for that. It would need to get struct dentry *reference passed to it,
but that should be it...
next prev parent reply other threads:[~2022-11-19 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 11:09 [PATCH v5] vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing David Howells
2022-11-11 17:40 ` Paul Moore
2022-11-11 17:43 ` Paul Moore
2022-11-19 8:48 ` Al Viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-01 12:02 David Howells
2022-09-01 14:13 ` Christian Brauner
2022-09-06 15:48 ` Jeff Layton
2022-09-06 16:01 ` David Howells
2022-09-06 16:02 ` 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=Y3iYVFT40L0+/MzO@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=casey@schaufler-ca.com \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=smayhew@redhat.com \
--cc=trond.myklebust@hammerspace.com \
/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