lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250926-vfs-inode-be4062725b4f@brauner>
Date: Fri, 26 Sep 2025 16:18:57 +0200
From: Christian Brauner <brauner@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [GIT PULL 03/12 for v6.18] inode

Hey Linus,

/* Summary */
This contains a series I originally wrote and that Eric brought over the
finish line. It moves out the i_crypt_info and i_verity_info pointers
out of 'struct inode' and into the fs-specific part of the inode.

So now the few filesytems that actually make use of this pay the price
in their own private inode storage instead of forcing it upon every user
of struct inode.

The pointer for the crypt and verity info is simply found by storing an
offset to its address in struct fsverity_operations and struct
fscrypt_operations. This shrinks struct inode by 16 bytes.

I hope to move a lot more out of it in the future so that struct inode
becomes really just about very core stuff that we need, much like struct
dentry and struct file, instead of the dumping ground it has become over
the years.

On top of this are a various changes associated with the ongoing inode
lifetime handling rework that multiple people are pushing forward:

* Stop accessing inode->i_count directly in f2fs and gfs2. They simply
  should use the __iget() and iput() helpers.

* Make the i_state flags an enum.

* Rework the iput() logic

  Currently, if we are the last iput, and we have the I_DIRTY_TIME bit
  set, we will grab a reference on the inode again and then mark it
  dirty and then redo the put.  This is to make sure we delay the time
  update for as long as possible.

  We can rework this logic to simply dec i_count if it is not 1, and if
  it is do the time update while still holding the i_count reference.

  Then we can replace the atomic_dec_and_lock with locking the ->i_lock
  and doing atomic_dec_and_test, since we did the atomic_add_unless
  above.

* Add an icount_read() helper and convert everyone that accesses
  inode->i_count directly for this purpose to use the helper.

* Expand dump_inode() to dump more information about an inode helping in
  debugging.

* Add some might_sleep() annotations to iput() and associated helpers.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

[1] This will have a merge conflict with the vfs-6.18-rc1.misc pull request.
    The conflict resolution is to simply use exactly what the tag here
    brings in.

The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:

  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.inode

for you to fetch changes up to c3c616c53dbabddf32a0485bd133d8d3b9f6656a:

  Merge branch 'vfs-6.18.inode.refcount.preliminaries' (2025-09-19 16:46:02 +0200)

Please consider pulling these changes from the signed vfs-6.18-rc1.inode tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.18-rc1.inode

----------------------------------------------------------------
Christian Brauner (3):
      Merge patch series "Move fscrypt and fsverity info out of struct inode"
      inode: fix whitespace issues
      Merge branch 'vfs-6.18.inode.refcount.preliminaries'

Eric Biggers (13):
      fscrypt: replace raw loads of info pointer with helper function
      fscrypt: add support for info in fs-specific part of inode
      ext4: move crypt info pointer to fs-specific part of inode
      f2fs: move crypt info pointer to fs-specific part of inode
      ubifs: move crypt info pointer to fs-specific part of inode
      ceph: move crypt info pointer to fs-specific part of inode
      fs: remove inode::i_crypt_info
      fsverity: add support for info in fs-specific part of inode
      ext4: move verity info pointer to fs-specific part of inode
      f2fs: move verity info pointer to fs-specific part of inode
      btrfs: move verity info pointer to fs-specific part of inode
      fs: remove inode::i_verity_info
      fsverity: check IS_VERITY() in fsverity_cleanup_inode()

Josef Bacik (4):
      fs: stop accessing ->i_count directly in f2fs and gfs2
      fs: make the i_state flags an enum
      fs: rework iput logic
      fs: add an icount_read helper

Mateusz Guzik (1):
      fs: expand dump_inode()

Max Kellermann (1):
      fs: add might_sleep() annotation to iput() and more

 arch/powerpc/platforms/cell/spufs/file.c |   2 +-
 fs/btrfs/btrfs_inode.h                   |   5 +
 fs/btrfs/inode.c                         |   5 +-
 fs/btrfs/verity.c                        |   2 +
 fs/ceph/crypto.c                         |   2 +
 fs/ceph/inode.c                          |   1 +
 fs/ceph/mds_client.c                     |   2 +-
 fs/ceph/super.h                          |   1 +
 fs/crypto/bio.c                          |   2 +-
 fs/crypto/crypto.c                       |  14 +-
 fs/crypto/fname.c                        |  11 +-
 fs/crypto/fscrypt_private.h              |   4 +-
 fs/crypto/hooks.c                        |   2 +-
 fs/crypto/inline_crypt.c                 |  12 +-
 fs/crypto/keysetup.c                     |  43 +++---
 fs/crypto/policy.c                       |   7 +-
 fs/ext4/crypto.c                         |   2 +
 fs/ext4/ext4.h                           |   8 +
 fs/ext4/ialloc.c                         |   4 +-
 fs/ext4/super.c                          |   6 +
 fs/ext4/verity.c                         |   2 +
 fs/f2fs/f2fs.h                           |   6 +
 fs/f2fs/super.c                          |  14 +-
 fs/f2fs/verity.c                         |   2 +
 fs/fs-writeback.c                        |   2 +-
 fs/gfs2/ops_fstype.c                     |   2 +-
 fs/hpfs/inode.c                          |   2 +-
 fs/inode.c                               |  90 ++++++++---
 fs/nfs/inode.c                           |   4 +-
 fs/notify/fsnotify.c                     |   2 +-
 fs/smb/client/inode.c                    |   2 +-
 fs/ubifs/crypto.c                        |   2 +
 fs/ubifs/super.c                         |   2 +-
 fs/ubifs/ubifs.h                         |   4 +
 fs/verity/enable.c                       |   6 +-
 fs/verity/fsverity_private.h             |   9 +-
 fs/verity/open.c                         |  23 +--
 fs/verity/verify.c                       |   2 +-
 fs/xfs/xfs_inode.c                       |   2 +-
 fs/xfs/xfs_trace.h                       |   2 +-
 include/linux/fs.h                       | 246 ++++++++++++++++---------------
 include/linux/fscrypt.h                  |  40 ++++-
 include/linux/fsverity.h                 |  57 +++++--
 include/trace/events/filelock.h          |   2 +-
 security/landlock/fs.c                   |   2 +-
 45 files changed, 428 insertions(+), 234 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ