Re: [PATCH] fuse: don't truncate cached, mutated symlink

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

 



On Sun, 23 Feb 2025 at 01:28, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Feb 20, 2025 at 11:02:58AM +0100, Miklos Szeredi wrote:
>
> > The solution is to just remove this truncation.  This can cause a
> > regression in a filesystem that relies on supplying a symlink larger than
> > the file size, but this is unlikely.  If that happens we'd need to make
> > this behavior conditional.
>
> Note, BTW, that page *contents* must not change at all, so truncation is
> only safe if we have ->i_size guaranteed to be stable.
>
> Core pathwalk really counts upon the string remaining immutable, and that
> does include the string returned by ->get_link().

Page contents will not change after initial readlink, but page could
get invalidated and a fresh page filled with new value for the same
object.

It's weird behavior all right, but seems to be useful in a couple of
cases where invalidating the dentry wouldn't work (I don't remember
the details, cvmfs folks can help with that).

Thanks,
Miklos




[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