|
|
Subscribe / Log in / New account

fs: provide per-filesystem options to disable fscrypt

From:  Niels de Vos <ndevos-AT-redhat.com>
To:  linux-fscrypt-AT-vger.kernel.org, linux-fsdevel-AT-vger.kernel.org
Subject:  [RFC 0/4] fs: provide per-filesystem options to disable fscrypt
Date:  Thu, 10 Nov 2022 15:12:21 +0100
Message-ID:  <20221110141225.2308856-1-ndevos@redhat.com>
Cc:  linux-kernel-AT-vger.kernel.org, Xiubo Li <xiubli-AT-redhat.com>, Marcel Lauhoff <marcel.lauhoff-AT-suse.com>, Niels de Vos <ndevos-AT-redhat.com>
Archive-link:  Article

While more filesystems are getting support for fscrypt, it is useful to
be able to disable fscrypt for a selection of filesystems, while
enabling it for others.

The new USE_FS_ENCRYPTION define gets picked up in
include/linux/fscrypt.h. This allows filesystems to choose to use the
empty function definitions, or the functional ones when fscrypt is to be
used with the filesystem.

Using USE_FS_ENCRYPTION is a relatively clean approach, and requires
minimal changes to the filesystems supporting fscrypt. This RFC is
mostly for checking the acceptance of this solution, or if an other
direction is preferred.

---

Niels de Vos (4):
  fscrypt: introduce USE_FS_ENCRYPTION
  fs: make fscrypt support an ext4 config option
  fs: make fscrypt support a f2fs config option
  fs: make fscrypt support a UBIFS config option

 Documentation/filesystems/fscrypt.rst |  2 +-
 fs/crypto/Kconfig                     |  3 +++
 fs/crypto/fscrypt_private.h           |  2 ++
 fs/ext4/Kconfig                       | 13 ++++++++++++-
 fs/ext4/Makefile                      |  2 +-
 fs/ext4/ext4.h                        | 12 ++++++++----
 fs/ext4/inode.c                       |  6 +++---
 fs/ext4/namei.c                       |  6 +++---
 fs/ext4/super.c                       |  6 +++---
 fs/ext4/sysfs.c                       |  8 ++++----
 fs/f2fs/Kconfig                       | 15 +++++++++++++--
 fs/f2fs/data.c                        |  2 +-
 fs/f2fs/dir.c                         |  6 +++---
 fs/f2fs/f2fs.h                        |  8 ++++++--
 fs/f2fs/super.c                       |  6 +++---
 fs/f2fs/sysfs.c                       |  8 ++++----
 fs/ubifs/Kconfig                      | 14 ++++++++++++--
 fs/ubifs/Makefile                     |  2 +-
 fs/ubifs/sb.c                         |  4 ++--
 fs/ubifs/ubifs.h                      |  7 +++++--
 include/linux/fscrypt.h               |  6 +++---
 21 files changed, 93 insertions(+), 45 deletions(-)

-- 
2.37.3



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