Re: [PATCH v2] vfs: fix fsconfig(2) LSM mount option handling for btrfs

2021-03-31 Thread Christoph Hellwig
On Mon, Mar 29, 2021 at 11:00:39AM +0200, Ondrej Mosnacek wrote: > After taking a closer look, it seems this won't actually work... The > problem is that since btrfs still uses the legacy mount API, it has no > way to get to fs_context in btrfs_mount() and thus both of your > suggestions aren't rea

Re: [PATCH v2] vfs: fix fsconfig(2) LSM mount option handling for btrfs

2021-03-29 Thread Ondrej Mosnacek
On Thu, Mar 18, 2021 at 10:42 AM Ondrej Mosnacek wrote: > On Tue, Mar 16, 2021 at 8:25 PM Al Viro wrote: > > On Tue, Mar 16, 2021 at 02:21:45PM -0400, Paul Moore wrote: > > > On Tue, Mar 16, 2021 at 10:48 AM Ondrej Mosnacek > > > wrote: > > > > > > > > When SELinux security options are passed t

Re: [PATCH v2] vfs: fix fsconfig(2) LSM mount option handling for btrfs

2021-03-18 Thread Ondrej Mosnacek
On Tue, Mar 16, 2021 at 8:25 PM Al Viro wrote: > On Tue, Mar 16, 2021 at 02:21:45PM -0400, Paul Moore wrote: > > On Tue, Mar 16, 2021 at 10:48 AM Ondrej Mosnacek > > wrote: > > > > > > When SELinux security options are passed to btrfs via fsconfig(2) rather > > > than via mount(2), the operation

Re: [PATCH v2] vfs: fix fsconfig(2) LSM mount option handling for btrfs

2021-03-16 Thread Al Viro
On Tue, Mar 16, 2021 at 02:21:45PM -0400, Paul Moore wrote: > On Tue, Mar 16, 2021 at 10:48 AM Ondrej Mosnacek wrote: > > > > When SELinux security options are passed to btrfs via fsconfig(2) rather > > than via mount(2), the operation aborts with an error. What happens is > > roughly this sequenc

Re: [PATCH v2] vfs: fix fsconfig(2) LSM mount option handling for btrfs

2021-03-16 Thread Paul Moore
On Tue, Mar 16, 2021 at 10:48 AM Ondrej Mosnacek wrote: > > When SELinux security options are passed to btrfs via fsconfig(2) rather > than via mount(2), the operation aborts with an error. What happens is > roughly this sequence: > > 1. vfs_parse_fs_param() eats away the LSM options and parses th