Thread (9 messages) 9 messages, 2 authors, 2019-05-28

Re: [PATCH] Smack: Restore the smackfsdef mount option

From: Casey Schaufler <casey@schaufler-ca.com>
Date: 2019-05-28 20:24:51
Also in: lkml

On 5/28/2019 12:57 PM, Casey Schaufler wrote:
On 5/28/2019 11:54 AM, David Howells wrote:
quoted
Casey Schaufler [off-list ref] wrote:
quoted
quoted
Casey Schaufler [off-list ref] wrote:
quoted
quoted
Also, should all of these be prefixed with "smack"?  So:

  	fsparam_string("smackfsdef",	Opt_fsdefault),
  	fsparam_string("smackfsfloor",	Opt_fsfloor),
  	fsparam_string("smackfshat",	Opt_fshat),	
No. smack_fs_parameters takes care of that.
It does?  *Blink*.
Well, something does. I can't say that I 100% understand all
of how the new mount code handles the mount options. Y'all made
sweeping changes, and the code works the way it used to except
for the awkward change from smackfsdef to smackfsdefault. It
took no small amount of head scratching and experimentation to
convince myself that the fix I proposed was correct.
Ah...  I suspect the issue is that smack_sb_eat_lsm_opts() strips the prefix
for an unconverted filesystem, but smack_fs_context_parse_param() doesn't
(which it shouldn't).

Can you try grabbing my mount-api-viro branch from:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git

and testing setting smack options on a tmpfs filesystem?
My fedora system won't boot because smackfsdef isn't recognized. :(
I will put in my fix and retry.
No joy there, either. Now it accepts smackfsdef, but doesn't
recognize smackfsroot. I don't have this problem with vanilla
5.1.
quoted
You might need to try modifying samples/vfs/test-fsmount.c to make it mount a
trmpfs filesystem through the new mount UAPI.

David
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help