|
|
Subscribe / Log in / New account

fscrypt: rework filesystem-level keyring

From:  Eric Biggers <ebiggers-AT-kernel.org>
To:  linux-fscrypt-AT-vger.kernel.org
Subject:  [PATCH v2 0/2] fscrypt: rework filesystem-level keyring
Date:  Sat, 20 Aug 2022 12:02:08 -0700
Message-ID:  <20220820190210.169734-1-ebiggers@kernel.org>
Cc:  linux-fsdevel-AT-vger.kernel.org, linux-block-AT-vger.kernel.org, linux-ext4-AT-vger.kernel.org, linux-f2fs-devel-AT-lists.sourceforge.net, Christoph Hellwig <hch-AT-lst.de>
Archive-link:  Article

This series reworks the filesystem-level keyring to not use the keyrings
subsystem as part of its internal implementation (except for ->mk_users,
which remains unchanged for now).  This fixes several issues, described
in the first patch.  This is also a prerequisite for removing the direct
use of struct request_queue from filesystem code, as discussed at
https://lore.kernel.org/linux-fscrypt/20220721125929.1866...

Changed v1 => v2:
    - Don't compare uninitialized bytes of struct fscrypt_key_specifier
    - Don't use refcount_dec_and_lock() unnecessarily
    - Other minor cleanups

Eric Biggers (2):
  fscrypt: stop using keyrings subsystem for fscrypt_master_key
  fscrypt: stop holding extra request_queue references

 fs/crypto/fscrypt_private.h |  74 ++++--
 fs/crypto/hooks.c           |  10 +-
 fs/crypto/inline_crypt.c    |  83 +++---
 fs/crypto/keyring.c         | 495 +++++++++++++++++++-----------------
 fs/crypto/keysetup.c        |  89 +++----
 fs/crypto/keysetup_v1.c     |   4 +-
 fs/crypto/policy.c          |   8 +-
 fs/super.c                  |   2 +-
 include/linux/fs.h          |   2 +-
 include/linux/fscrypt.h     |   4 +-
 10 files changed, 406 insertions(+), 365 deletions(-)


base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
-- 
2.37.1



Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds