Re: [PATCH 03/14] VFS: Implement a filesystem superblock creation/configuration context [ver #6]

From: David Howells
Date: Fri Oct 27 2017 - 12:03:12 EST


Miklos Szeredi <mszeredi@xxxxxxxxxx> wrote:

> Yes I did mean vfs_parse_sb_flag_option().
>
> Yes, I understand its purpose, but it would be cleaner if all the
> option parsing was done in fc->ops->parse_option().
>
> It might be worth introducing the vfs_parse_sb_flag_option(), to be
> called from ->parse_option().

I was trying to relieve the filesystem of the requirement to have to deal with
common stuff and also the need to talk directly to the LSM.

> > Btw, how would it affect the LSM?
>
> LSM would have to reject a "reset" if not enough privileges to
> *create* a new fs instance, since it essentially requires creating a
> new config, which is what is done when creating an fs instance.

That's not what I'm asking. Would the reset change LSM state? Reset security
labels and options?

> > Sorry, how does the new, clean one do it without handling these options?
> > There is no MS_* mask passed in, except to fsmount().
>
> The new one certainly should.

Should what?

> Ignoring unknown flags/options is generally a bad idea.

They're not unknown - just not of interest to the filesystem.

David