Re: [PATCH] make new mount API honour SB_NOUSER (was Re: [PATCH] block: Avoid mounting the bdev pseudo-filesystem in userspace)
From: Jan Kara
Date: Mon Jun 08 2026 - 06:36:39 EST
On Tue 02-06-26 15:07:51, Al Viro wrote:
> On Tue, Jun 02, 2026 at 11:11:11AM +0200, Jan Kara wrote:
> > On Tue 02-06-26 03:04:44, Al Viro wrote:
> > > one should *not* be allowed to mount one of those, new API or not.
> > >
> > > Reported-by: Denis Arefev <arefev@xxxxxxxxx>
> > > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> >
> > Won't it make sense to actually check fc->sb_flags before we call
> > vfs_create_mount()? Otherwise it looks good to me.
>
> Interpretation of fc->sb_flags is up to your ->get_tree(). What matters
> is ->s_flags in the resulting superblock; that's type-independent and
> that's what we ought to check...
Ah, right. Thanks for explanation!
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR