LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: dhowells@redhat.com, James Morris <jmorris@namei.org>,
Linux Security Module list
<linux-security-module@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PULL] Smack: Restore the smackfsdef mount option
Date: Tue, 28 May 2019 21:18:46 +0100 [thread overview]
Message-ID: <15805.1559074726@warthog.procyon.org.uk> (raw)
In-Reply-To: <6e061326-5feb-5471-c0c0-a364af5e82c3@schaufler-ca.com>
Casey Schaufler <casey@schaufler-ca.com> wrote:
> > static const struct fs_parameter_spec smack_param_specs[] = {
> > + fsparam_string("fsdef", Opt_fsdefault),
> > fsparam_string("fsdefault", Opt_fsdefault),
> > fsparam_string("fsfloor", Opt_fsfloor),
> > fsparam_string("fshat", Opt_fshat),
> >
> > but that all the option names in that table *do* need prefixing with
> > "smack".
Actually, you're right, we do need to add that *and* prefix it with "smack".
> I'm not sure I follow the logic, because "mount -o smackfsdefault=Pop"
> does what I would expect it to.
Yes, I'm sure it does - for the cases you're testing - but it's filesystem and
syscall dependent. None of the filesystems currently ported to the mount API
upstream override ->parse_monolithic(), but that changes with nfs, shmem and
coda and will change with cifs too.
It also changes if you use fsconfig() to supply the options because that goes
through a different LSM hook (it uses fs_context_parse_param rather than
sb_eat_lsm_opts).
> > The way you enter the LSM is going to depend on whether
> > generic_parse_monolithic() is called. You're only going to enter this way
> > if mount(2) is the syscall of entry and the filesystem doesn't override
> > the ->parse_monolithic() option (none in the upstream kernel).
>
> So you're saying that the code works for the mount(2) case,
> but won't work for some other case? Are you planning a fix?
> Will that fix include restoration of smackfsdef?
I can do a fix, but testing it is a pain.
David
next prev parent reply other threads:[~2019-05-28 20:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 18:29 Casey Schaufler
2019-05-28 19:02 ` David Howells
2019-05-28 19:43 ` Casey Schaufler
2019-05-28 20:18 ` David Howells [this message]
2019-05-28 20:37 ` Casey Schaufler
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=15805.1559074726@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--subject='Re: [PULL] Smack: Restore the smackfsdef mount option' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).