Skip to content

fscrypt: support for inline-encryption-optimized policies

Eric Biggers linux-ext4 linux-f2fs-devel linux-fscrypt linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fscrypt: add support for inline-encryption-optimized policiesDocumentation/filesystems/fscrypt.rst fs/crypto/crypto.c fs/crypto/fscrypt_private.h +5 more+155 -4211 replies
2/3ext4: add support for INLINE_CRYPT_OPTIMIZED encryption policiesfs/ext4/ext4.h fs/ext4/super.c+16 -02 replies
3/3f2fs: add support for INLINE_CRYPT_OPTIMIZED encryption policiesfs/f2fs/super.c+20 -61 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchTheodore Ts'oJaegeuk Kim
1/3
2/3R-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] fscrypt: support for inline-encryption-optimized policies

Hello,

In preparation for adding inline encryption support to fscrypt, this patchset adds a new fscrypt policy flag which modifies the encryption to be optimized for inline encryption hardware compliant with the UFS standard --- specifically, to use a smaller number of keys while still using at most 64 IV bits. This required adding the inode number to the IVs. For ext4, this precludes filesystem shrinking, so I've also added a compat feature which will prevent the filesystem from being shrunk.

I've separated this from the full "Inline Encryption Support" patchset
(https://lkml.kernel.org/linux-fsdevel/[email protected]/)
to avoid conflating an implementation (inline encryption) with a new on-disk format (INLINE_CRYPT_OPTIMIZED). This patchset purely adds support for INLINE_CRYPT_OPTIMIZED policies to fscrypt, but implements them using the existing filesystem layer crypto.

We're planning to make the *implementation* (filesystem layer or inline crypto) be controlled by a mount option '-o inlinecrypt'.

This patchset applies to fscrypt.git#master and can also be retrieved from
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=inline-crypt-optimized-v1

A ciphertext verification test for INLINE_CRYPT_OPTIMIZED policies can be found at
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/xfstests-dev.git/log/?h=inline-encryption

Work-in-progress patches for the inline encryption implementation of both INLINE_CRYPT_OPTIMIZED and regular policies can be found at
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=inline-encryption-wip

Eric Biggers (3):
fscrypt: add support for inline-encryption-optimized policies
ext4: add support for INLINE_CRYPT_OPTIMIZED encryption policies
f2fs: add support for INLINE_CRYPT_OPTIMIZED encryption policies

 Documentation/filesystems/fscrypt.rst | 53 +++++++++++++++++++--------
 fs/crypto/crypto.c                    | 11 +++++-
 fs/crypto/fscrypt_private.h           | 20 +++++++---
 fs/crypto/keyring.c                   |  6 ++-
 fs/crypto/keysetup.c                  | 47 +++++++++++++++++++-----
 fs/crypto/policy.c                    | 42 ++++++++++++++++++++-
 fs/ext4/ext4.h                        |  2 +
 fs/ext4/super.c                       | 14 +++++++
 fs/f2fs/super.c                       | 26 ++++++++++---
 include/linux/fscrypt.h               |  3 ++
 include/uapi/linux/fscrypt.h          | 15 ++++----
 11 files changed, 191 insertions(+), 48 deletions(-)
Signature · 1 line
2.23.0.866.gb869b98d4c-goog