> - The hooks consistently take struct path rather than struct file.  The
>   VFS call sites involved (chmod(2), chown(2), utimensat(2), xattr(2)
>   and ACL syscalls) operate on paths, and several of them (lstat(2),
>   lchown(2), llistxattr(2), ...) have no struct file to begin with.
> 
> - struct inode_operations->setattr still receives (idmap, dentry, attr).
>   Only the VFS boundary (notify_change()) and the LSM hook layer see the
>   path, which keeps the refactor contained to fs/attr.c and the LSM
>   infrastructure instead of touching every filesystem.

I have no problem with that provided:

* all hooks take a const struct path argument
* idmaps are passed separately so that VFS and filesystems are
  guaranteed to see the same idmap
* nobody gets any guarantees whatsoever wrt to path->mnt aka vfsmount

  layout and implementation details might change tomorrow and mounts are
  subtle beasts so the security layer gets to keep pieces if it does
  things that the VFS hasn't explicitly sanctioned as a guaranteed
  property. Things continue to be in flux.

Reply via email to