Linux filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Subject: [git pull][6.17] vfs.git 5/9: securityfs
Date: Sat, 26 Jul 2025 09:05:13 +0100	[thread overview]
Message-ID: <20250726080513.GD1456602@ZenIV> (raw)
In-Reply-To: <20250726080119.GA222315@ZenIV>

The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:

  Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-securityfs

for you to fetch changes up to f42b8d78dee77107245ec5beee3eb01915bcae7f:

  tpm: don't bother with removal of files in directory we'll be removing (2025-06-17 18:11:01 -0400)

----------------------------------------------------------------
securityfs cleanups and fixes:

* one extra reference is enough to pin a dentry down; no need
for two.  Switch to regular scheme, similar to shmem, debugfs,
etc. - that fixes securityfs_recursive_remove() dentry leak,
among other things.

* we need to have the filesystem pinned to prevent the contents
disappearing; what we do not need is pinning it for each file.
Doing that only for files and directories in the root is enough.

* the previous two changes allow to get rid of the racy kludges
in efi_secret_unlink(), where we can use simple_unlink() instead
of securityfs_remove().  Which does not require unlocking and
relocking the parent, with all deadlocks that invites.

* Make securityfs_remove() take the entire subtree out, turning
securityfs_recursive_remove() into its alias.  Makes a lot more
sense for callers and fixes a mount leak, while we are at it.

* Making securityfs_remove() remove the entire subtree allows for
much simpler life in most of the users - efi_secret, ima_fs,
evm, ipe, tmp get cleaner.  I hadn't touched apparmor use of
securityfs, but I suspect that it would be useful there as well.

----------------------------------------------------------------
Al Viro (10):
      securityfs: don't pin dentries twice, once is enough...
      securityfs: pin filesystem only for objects directly in root
      fix locking in efi_secret_unlink()
      make securityfs_remove() remove the entire subtree
      efi_secret: clean securityfs use up
      ima_fs: don't bother with removal of files in directory we'll be removing
      ima_fs: get rid of lookup-by-dentry stuff
      evm_secfs: clear securityfs interactions
      ipe: don't bother with removal of files in directory we'll be removing
      tpm: don't bother with removal of files in directory we'll be removing

 drivers/char/tpm/eventlog/common.c        |  46 +++-------
 drivers/virt/coco/efi_secret/efi_secret.c |  47 ++--------
 include/linux/security.h                  |   3 +-
 include/linux/tpm.h                       |   2 +-
 security/inode.c                          |  62 +++++---------
 security/integrity/evm/evm_secfs.c        |  15 ++--
 security/integrity/ima/ima_fs.c           | 137 +++++++-----------------------
 security/ipe/fs.c                         |  32 +++----
 security/ipe/policy_fs.c                  |   4 +-
 9 files changed, 97 insertions(+), 251 deletions(-)

  parent reply	other threads:[~2025-07-26  8:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-26  8:01 [git pull][6.17] vfs.git 1/9: d_flags pile Al Viro
2025-07-26  8:02 ` [git pull][6.17] vfs.git 2/9: simple_recursive_removal Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:03 ` [git pull][6.17] vfs.git 3/9: rpc_pipefs Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:04 ` [git pull][6.17] vfs.git 4/9: asm/param.h pile Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:05 ` Al Viro [this message]
2025-07-28 23:41   ` [git pull][6.17] vfs.git 5/9: securityfs pr-tracker-bot
2025-07-26  8:05 ` [git pull][6.17] vfs.git 6/9: misc pile Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:08 ` [git pull][6.17] vfs.git 7/9: ceph d_name fixes Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:08 ` [git pull][6.17] vfs.git 8/9: CLASS(fd) followup Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-26  8:09 ` [git pull][6.17] vfs.git 9/9: mount pile Al Viro
2025-07-28 23:41   ` pr-tracker-bot
2025-07-28 23:41 ` [git pull][6.17] vfs.git 1/9: d_flags pile pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250726080513.GD1456602@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox