linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/14] New uid & gid mount option parsing helpers
@ 2024-06-28  0:24 Eric Sandeen
  2024-06-28  0:26 ` [PATCH 01/14] fs_parse: add uid & gid option " Eric Sandeen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Eric Sandeen @ 2024-06-28  0:24 UTC (permalink / raw)
  To: linux-fsdevel, Christian Brauner
  Cc: autofs, Rafael J. Wysocki, linux-efi, Namjae Jeon, linux-ext4,
	Miklos Szeredi, linux-mm, Jan Kara, ntfs3, linux-mm, linux-cifs,
	linux-trace-kernel, Hans Caniullan

Multiple filesystems take uid and gid as options, and the code to
create the ID from an integer and validate it is standard boilerplate
that can be moved into common helper functions, so do that for
consistency and less cut&paste.

This also helps avoid the buggy pattern noted by Seth Jenkins at
https://lore.kernel.org/lkml/CALxfFW4BXhEwxR0Q5LSkg-8Vb4r2MONKCcUCVioehXQKr35eHg@mail.gmail.com/
because uid/gid parsing will fail before any assignment in most
filesystems.

Net effect is a bit of code removal, as well.

Patch 1 is the infrastructure change, then per-fs conversions follow,
cc'd as appropriate.

This series is also at
https://git.kernel.org/pub/scm/linux/kernel/git/sandeen/linux.git/log/?h=mount-api-uid-helper

Thanks,
-Eric

 Documentation/filesystems/mount_api.rst |    9 +++++++--
 fs/autofs/inode.c                       |   16 ++++------------
 fs/debugfs/inode.c                      |   16 ++++------------
 fs/efivarfs/super.c                     |   12 ++++--------
 fs/exfat/super.c                        |    8 ++++----
 fs/ext4/super.c                         |   22 ++++------------------
 fs/fs_parser.c                          |   34 ++++++++++++++++++++++++++++++++++
 fs/fuse/inode.c                         |   12 ++++--------
 fs/hugetlbfs/inode.c                    |   12 ++++--------
 fs/isofs/inode.c                        |   16 ++++------------
 fs/ntfs3/super.c                        |   12 ++++--------
 fs/smb/client/fs_context.c              |   39 ++++++++++++---------------------------
 fs/tracefs/inode.c                      |   16 ++++------------
 include/linux/fs_parser.h               |    6 +++++-
 mm/shmem.c                              |   12 ++++--------
 15 files changed, 102 insertions(+), 140 deletions(-)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-02  4:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28  0:24 [PATCH 0/14] New uid & gid mount option parsing helpers Eric Sandeen
2024-06-28  0:26 ` [PATCH 01/14] fs_parse: add uid & gid option " Eric Sandeen
2024-06-28  9:45   ` Jan Kara
2024-06-28 12:23     ` Christian Brauner
2024-07-01  9:34       ` Jan Kara
2024-06-28 13:44     ` Eric Sandeen
2024-06-28  0:35 ` [PATCH 08/14] hugetlbfs: Convert to new uid/gid " Eric Sandeen
2024-06-28  0:38 ` [PATCH 11/14] tmpfs: " Eric Sandeen
2024-06-28 11:51 ` [PATCH 0/14] New uid & gid mount " Christian Brauner
2024-07-02  4:25 ` (subset) " Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).