Re: [PATCH] Revert "fs: move the bdex_statx call to vfs_getattr_nosec"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 24, 2025 at 11:04:44AM +0200, Christoph Hellwig wrote:
> On Thu, Apr 24, 2025 at 10:59:44AM +0200, Christian Brauner wrote:
> > This reverts commit 777d0961ff95b26d5887fdae69900374364976f3.
> > 
> > Now that we have fixed the original issue in devtmpfs we can revert this
> > commit because the bdev_statx() call in vfs_getattr_nosec() causes
> > issues with the lifetime logic of dm devices.
> 
> Umm, no.  We need this patch.  And the devtmpfs fixes the issue that
> it caused for devtmpfs.

For loop devices only afaict. The bdev_statx() implementation is
absolutely terrifying because it triggers all that block module
autoloading stuff and quite a few kernels still have that turned on. By
adding that to vfs_getattr_nosec() suddenly all kernel consumers are
able to do the same thing by accident. This already crapped devtmpfs. We
have no idea what else it will start breaking unless you audit every
single caller.

If this stays in then please figure out how to skip a call into
blkdev_get_no_open() unless it's explicitly requested. I don't care if
we have to add an in-kernel only request flag. We have one already
anyway.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux