On Sun, Apr 22, 2018 at 10:35 AM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > On Tue, Apr 17, 2018 at 10:51 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: [snip] > Is there a reason why the real file can't get the real path? It could, except for vma->vm_file. Now, we could have a separate realfile for mmap (with overlay path) and one for everything else (with real path). Maybe that's the way to go, to minimize the chance of trouble caused by this irregularity. > For current kernels, can you say what else can go wrong when filesystems > call mnt_want_write_file() on an overlay file on ioctl with filesystem > inode and why I couldn't reproduce readonly/freeze bypass? mnt_want_write_file() is overlayfs-aware in current kernels. We could fix it to use file_inode()->i_sb instead of f_path.dentry->d_sb after reverting the overlay specific hack, and that would fix the freeze bypass bug and would be correct for all filesystems. But I wonder how many such issues we have where discrepancy between f_path.dentry and file_inode() matters. Thanks, Miklos