linux/fs
Linus Torvalds ecd7db2047 v6.6-vfs.tmpfs
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZOXTkgAKCRCRxhvAZXjc
 ouZsAPwNBHB2aPKtzWURuKx5RX02vXTzHX+A/LpuDz5WBFe8zQD+NlaBa4j0MBtS
 rVYM+CjOXnjnsLc8W0euMnfYNvViKgQ=
 =L2+2
 -----END PGP SIGNATURE-----

Merge tag 'v6.6-vfs.tmpfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull libfs and tmpfs updates from Christian Brauner:
 "This cycle saw a lot of work for tmpfs that required changes to the
  vfs layer. Andrew, Hugh, and I decided to take tmpfs through vfs this
  cycle. Things will go back to mm next cycle.

  Features
  ========

   - By far the biggest work is the quota support for tmpfs. New tmpfs
     quota infrastructure is added to support it and a new QFMT_SHMEM
     uapi option is exposed.

     This offers user and group quotas to tmpfs (project quotas will be
     added later). Similar to other filesystems tmpfs quota are not
     supported within user namespaces yet.

   - Add support for user xattrs. While tmpfs already supports security
     xattrs (security.*) and POSIX ACLs for a long time it lacked
     support for user xattrs (user.*). With this pull request tmpfs will
     be able to support a limited number of user xattrs.

     This is accompanied by a fix (see below) to limit persistent simple
     xattr allocations.

   - Add support for stable directory offsets. Currently tmpfs relies on
     the libfs provided cursor-based mechanism for readdir. This causes
     issues when a tmpfs filesystem is exported via NFS.

     NFS clients do not open directories. Instead, each server-side
     readdir operation opens the directory, reads it, and then closes
     it. Since the cursor state for that directory is associated with
     the opened file it is discarded after each readdir operation. Such
     directory offsets are not just cached by NFS clients but also
     various userspace libraries based on these clients.

     As it stands there is no way to invalidate the caches when
     directory offsets have changed and the whole application depends on
     unchanging directory offsets.

     At LSFMM we discussed how to solve this problem and decided to
     support stable directory offsets. libfs now allows filesystems like
     tmpfs to use an xarrary to map a directory offset to a dentry. This
     mechanism is currently only used by tmpfs but can be supported by
     others as well.

  Fixes
  =====

   - Change persistent simple xattrs allocations in libfs from
     GFP_KERNEL to GPF_KERNEL_ACCOUNT so they're subject to memory
     cgroup limits. Since this is a change to libfs it affects both
     tmpfs and kernfs.

   - Correctly verify {g,u}id mount options.

     A new filesystem context is created via fsopen() which records the
     namespace that becomes the owning namespace of the superblock when
     fsconfig(FSCONFIG_CMD_CREATE) is called for filesystems that are
     mountable in namespaces. However, fsconfig() calls can occur in a
     namespace different from the namespace where fsopen() has been
     called.

     Currently, when fsconfig() is called to set {g,u}id mount options
     the requested {g,u}id is mapped into a k{g,u}id according to the
     namespace where fsconfig() was called from. The resulting k{g,u}id
     is not guaranteed to be resolvable in the namespace of the
     filesystem (the one that fsopen() was called in).

     This means it's possible for an unprivileged user to create files
     owned by any group in a tmpfs mount since it's possible to set the
     setid bits on the tmpfs directory.

     The contract for {g,u}id mount options and {g,u}id values in
     general set from userspace has always been that they are translated
     according to the caller's idmapping. In so far, tmpfs has been
     doing the correct thing. But since tmpfs is mountable in
     unprivileged contexts it is also necessary to verify that the
     resulting {k,g}uid is representable in the namespace of the
     superblock to avoid such bugs.

     The new mount api's cross-namespace delegation abilities are
     already widely used. Having talked to a bunch of userspace this is
     the most faithful solution with minimal regression risks"

* tag 'v6.6-vfs.tmpfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  tmpfs,xattr: GFP_KERNEL_ACCOUNT for simple xattrs
  mm: invalidation check mapping before folio_contains
  tmpfs: trivial support for direct IO
  tmpfs,xattr: enable limited user extended attributes
  tmpfs: track free_ispace instead of free_inodes
  xattr: simple_xattr_set() return old_xattr to be freed
  tmpfs: verify {g,u}id mount options correctly
  shmem: move spinlock into shmem_recalc_inode() to fix quota support
  libfs: Remove parent dentry locking in offset_iterate_dir()
  libfs: Add a lock class for the offset map's xa_lock
  shmem: stable directory offsets
  shmem: Refactor shmem_symlink()
  libfs: Add directory operations for stable offsets
  shmem: fix quota lock nesting in huge hole handling
  shmem: Add default quota limit mount options
  shmem: quota support
  shmem: prepare shmem quota infrastructure
  quota: Check presence of quota operation structures instead of ->quota_read and ->quota_write callbacks
  shmem: make shmem_get_inode() return ERR_PTR instead of NULL
  shmem: make shmem_inode_acct_block() return error
2023-08-28 09:55:25 -07:00
..
9p v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
adfs adfs: convert to ctime accessor functions 2023-07-13 10:28:03 +02:00
affs affs: convert to ctime accessor functions 2023-07-13 10:28:03 +02:00
afs fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
autofs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
befs befs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
bfs bfs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
btrfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
cachefiles v6.5/vfs.file 2023-06-26 10:14:36 -07:00
ceph v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
coda v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
configfs configfs: convert to ctime accessor functions 2023-07-13 10:28:05 +02:00
cramfs cramfs: convert to ctime accessor functions 2023-07-13 10:28:05 +02:00
crypto
debugfs debugfs: convert to ctime accessor functions 2023-07-13 10:28:05 +02:00
devpts devpts: convert to ctime accessor functions 2023-07-13 10:28:06 +02:00
dlm dlm for 6.5 2023-06-29 13:27:50 -07:00
ecryptfs fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
efivarfs efivarfs: convert to ctime accessor functions 2023-07-13 10:28:06 +02:00
efs efs: convert to ctime accessor functions 2023-07-13 10:28:06 +02:00
erofs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
exfat v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
exportfs vfs: get rid of old '->iterate' directory operation 2023-08-06 15:08:35 +02:00
ext2 fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
ext4 v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
f2fs fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
fat fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
freevxfs freevxfs: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
fscache
fuse v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
gfs2 v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
hfs hfs: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
hfsplus fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
hostfs hostfs: convert to ctime accessor functions 2023-07-24 10:30:00 +02:00
hpfs hpfs: convert to ctime accessor functions 2023-07-24 10:30:00 +02:00
hugetlbfs hugetlbfs: convert to ctime accessor functions 2023-07-24 10:30:00 +02:00
iomap iomap: micro optimize the ki_pos assignment in iomap_file_buffered_write 2023-07-17 08:49:57 -07:00
isofs isofs: convert to ctime accessor functions 2023-07-24 10:30:00 +02:00
jbd2 jbd2: remove __journal_try_to_free_buffer() 2023-07-10 23:09:21 -04:00
jffs2 jffs2: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
jfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
kernfs v6.6-vfs.tmpfs 2023-08-28 09:55:25 -07:00
lockd NFS client updates for Linux 6.5 2023-07-01 14:38:25 -07:00
minix fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
netfs
nfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
nfs_common
nfsd v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
nilfs2 v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
nls fs/nls: make load_nls() take a const parameter 2023-07-25 00:30:02 -05:00
notify fanotify: disallow mount/sb marks on kernel internal pseudo fs 2023-07-04 13:29:29 +02:00
ntfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
ntfs3 fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
ocfs2 v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
omfs omfs: convert to ctime accessor functions 2023-07-24 10:30:02 +02:00
openpromfs openpromfs: convert to ctime accessor functions 2023-07-24 10:30:03 +02:00
orangefs fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
overlayfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
proc v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
pstore pstore: convert to ctime accessor functions 2023-07-24 10:30:03 +02:00
qnx4 qnx4: convert to ctime accessor functions 2023-07-24 10:30:04 +02:00
qnx6 qnx6: convert to ctime accessor functions 2023-07-24 10:30:04 +02:00
quota quota: Check presence of quota operation structures instead of ->quota_read and ->quota_write callbacks 2023-08-09 09:15:39 +02:00
ramfs ramfs: convert to ctime accessor functions 2023-07-24 10:30:04 +02:00
reiserfs reiserfs: convert to ctime accessor functions 2023-07-24 10:30:04 +02:00
romfs romfs: convert to ctime accessor functions 2023-07-24 10:30:04 +02:00
smb v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
squashfs squashfs: convert to ctime accessor functions 2023-07-24 10:30:05 +02:00
sysfs sysfs: Skip empty folders creation 2023-06-15 13:37:53 +02:00
sysv fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
tracefs tracefs: convert to ctime accessor functions 2023-07-24 10:30:05 +02:00
ubifs fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
udf fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
ufs ufs: convert to ctime accessor functions 2023-07-24 10:30:06 +02:00
unicode
vboxsf v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
verity fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
xfs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
zonefs v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
aio.c fs/aio: Stop allocating aio rings from HIGHMEM 2023-06-15 09:22:23 +02:00
anon_inodes.c
attr.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
bad_inode.c fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_elf.c Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
binfmt_flat.c
binfmt_misc.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
binfmt_script.c
buffer.c \n 2023-06-29 13:39:51 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c v6.5/vfs.misc 2023-06-26 09:50:21 -07:00
d_path.c
dax.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00
dcache.c
direct-io.c - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
drop_caches.c
eventfd.c eventfd: show the EFD_SEMAPHORE flag in fdinfo 2023-06-15 09:22:23 +02:00
eventpoll.c v6.5/vfs.misc 2023-06-26 09:50:21 -07:00
exec.c \n 2023-06-29 13:31:44 -07:00
fcntl.c
fhandle.c
file_table.c fs: move cleanup from init_file() into its callers 2023-07-02 13:15:49 +02:00
file.c fs: rely on ->iterate_shared to determine f_pos locking 2023-08-06 15:08:36 +02:00
filesystems.c
fs_context.c fs: add FSCONFIG_CMD_CREATE_EXCL 2023-08-14 18:48:02 +02:00
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c
fsopen.c fs: add FSCONFIG_CMD_CREATE_EXCL 2023-08-14 18:48:02 +02:00
init.c
inode.c v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
internal.h v6.5/vfs.file 2023-06-26 10:14:36 -07:00
ioctl.c
Kconfig tmpfs,xattr: enable limited user extended attributes 2023-08-10 12:06:04 +02:00
Kconfig.binfmt
kernel_read_file.c
libfs.c v6.6-vfs.tmpfs 2023-08-28 09:55:25 -07:00
locks.c
Makefile for-6.5/block-2023-06-23 2023-06-26 12:47:20 -07:00
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c fs: no need to check source 2023-07-04 10:20:29 +02:00
namespace.c v6.5/vfs.mount 2023-06-26 10:27:04 -07:00
nsfs.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
open.c open: make RESOLVE_CACHED correctly test for O_TMPFILE 2023-08-06 15:08:35 +02:00
pipe.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
pnode.c
pnode.h
posix_acl.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
proc_namespace.c
read_write.c
readdir.c vfs: get rid of old '->iterate' directory operation 2023-08-06 15:08:35 +02:00
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c splice, net: Fix splice_to_socket() for O_NONBLOCK socket 2023-07-26 21:56:06 -07:00
stack.c fs: convert to ctime accessor functions 2023-07-13 10:28:04 +02:00
stat.c fs: add infrastructure for multigrain timestamps 2023-08-11 09:04:57 +02:00
statfs.c
super.c fs: add FSCONFIG_CMD_CREATE_EXCL 2023-08-14 18:48:02 +02:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c Merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes. 2023-06-23 16:58:19 -07:00
utimes.c
xattr.c tmpfs,xattr: GFP_KERNEL_ACCOUNT for simple xattrs 2023-08-22 10:57:46 +02:00