mbox series

[v3,0/7] filesystem visibililty ioctls

Message ID 20240207025624.1019754-1-kent.overstreet@linux.dev (mailing list archive)
Headers show
Series filesystem visibililty ioctls | expand

Message

Kent Overstreet Feb. 7, 2024, 2:56 a.m. UTC
ok, any further bikeshedding better be along the lines of "this will
cause a gaping security hole unless addressed" ;)

changes since v2:
 - now using nak (0x15) ioctl range; documentation updated
 - new helpers for setting the sysfs name
 - sysfs name uuid now has a length field

other notes:
 - fscrypt usage of s_uuid has justification, so we don't need to be
   concerned about exporting that (more) to userspace
 - i haven't updated btrfs for FS_IOC_SYSFS_NAME, less familiar with
   their code so they are cc'd
   ext4 may want this too?

Kent Overstreet (7):
  fs: super_set_uuid()
  overlayfs: Convert to super_set_uuid()
  fs: FS_IOC_GETUUID
  fat: Hook up sb->s_uuid
  fs: FS_IOC_GETSYSFSNAME
  xfs: add support for FS_IOC_GETSYSFSNAME
  bcachefs: add support for FS_IOC_GETSYSFSNAME

 .../userspace-api/ioctl/ioctl-number.rst      |  3 +-
 fs/bcachefs/fs.c                              |  3 +-
 fs/ext4/super.c                               |  2 +-
 fs/f2fs/super.c                               |  2 +-
 fs/fat/inode.c                                |  3 ++
 fs/gfs2/ops_fstype.c                          |  2 +-
 fs/ioctl.c                                    | 33 ++++++++++++
 fs/kernfs/mount.c                             |  4 +-
 fs/ocfs2/super.c                              |  4 +-
 fs/overlayfs/util.c                           | 14 +++--
 fs/ubifs/super.c                              |  2 +-
 fs/xfs/xfs_mount.c                            |  4 +-
 include/linux/fs.h                            | 51 +++++++++++++++++++
 include/uapi/linux/fs.h                       | 27 ++++++++++
 mm/shmem.c                                    |  4 +-
 15 files changed, 142 insertions(+), 16 deletions(-)

Comments

Christian Brauner Feb. 8, 2024, 10:20 a.m. UTC | #1
On Tue, 06 Feb 2024 21:56:14 -0500, Kent Overstreet wrote:
> ok, any further bikeshedding better be along the lines of "this will
> cause a gaping security hole unless addressed" ;)
> 
> changes since v2:
>  - now using nak (0x15) ioctl range; documentation updated
>  - new helpers for setting the sysfs name
>  - sysfs name uuid now has a length field
> 
> [...]

I've merged that series and put it onto vfs.uuid. I think we should
really see some more ACKs from other filesystems maintainers for the
FS_IOC_GETFSSYSFSPATH bits. Once we have that we can declare that branch
stable.

Note, I dropped the bcachefs changes because they're not upstream yet.
But once this is a stable branch you can just pull in vfs.uuid and rely
on that.

---

Applied to the vfs.uuid branch of the vfs/vfs.git tree.
Patches in the vfs.uuid branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.uuid

[1/6] fs: super_set_uuid()
      https://git.kernel.org/vfs/vfs/c/4d451351605f
[2/6] overlayfs: Convert to super_set_uuid()
      https://git.kernel.org/vfs/vfs/c/5ad6ddd9c998
[3/6] fs: FS_IOC_GETUUID
      https://git.kernel.org/vfs/vfs/c/51ee9232f372
[4/6] fat: Hook up sb->s_uuid
      https://git.kernel.org/vfs/vfs/c/05dc73e146be
[5/6] fs: add FS_IOC_GETFSSYSFSPATH
      https://git.kernel.org/vfs/vfs/c/3dad731c7a45
[6/6] xfs: add support for FS_IOC_GETFSSYSFSPATH
      https://git.kernel.org/vfs/vfs/c/aa4386d4df60