Skip to content

fscrypt: make '-o test_dummy_encryption' support v2 policies

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4linux/parser.h: add include guardsinclude/linux/parser.h+4 -12 replies
2/4fscrypt: add fscrypt_add_test_dummy_key()fs/crypto/fscrypt_private.h fs/crypto/keyring.c+77 -432 replies
3/4fscrypt: support test_dummy_encryption=v2Documentation/filesystems/f2fs.rst fs/crypto/keysetup.c fs/crypto/policy.c +5 more+302 -606 replies
4/4fscrypt: make test_dummy_encryption use v2 by defaultfs/crypto/policy.c+1 -12 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchTheodore Ts'oJaegeuk Kim
1/4R-b R-b
2/4R-b R-b
3/4R-b A-b
4/4R-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/4] fscrypt: make '-o test_dummy_encryption' support v2 policies

v1 encryption policies are deprecated in favor of v2, and some new features (e.g. encryption+casefolding) are only being added for v2.

As a result, the "test_dummy_encryption" mount option (which is used for encryption I/O testing with xfstests) needs to support v2 policies.

Therefore, this patchset adds support for specifying "test_dummy_encryption=v2" (or "test_dummy_encryption=v1"). To make this possible, it reworks the way the test_dummy_encryption mount option is handled to make it more flexible than a flag, and to automatically add the test dummy key to the filesystem's keyring.

Patch 4 additionally changes the default to "v2".

This patchset applies to v5.7-rc4.

Eric Biggers (4):
linux/parser.h: add include guards
fscrypt: add fscrypt_add_test_dummy_key()
fscrypt: support test_dummy_encryption=v2
fscrypt: make test_dummy_encryption use v2 by default

 Documentation/filesystems/f2fs.rst |   6 +-
 fs/crypto/fscrypt_private.h        |   3 +
 fs/crypto/keyring.c                | 117 +++++++++++++++++----------
 fs/crypto/keysetup.c               |  15 ++--
 fs/crypto/policy.c                 | 125 +++++++++++++++++++++++++++++
 fs/ext4/ext4.h                     |   7 +-
 fs/ext4/super.c                    |  68 ++++++++++++----
 fs/f2fs/f2fs.h                     |   4 +-
 fs/f2fs/super.c                    |  85 ++++++++++++++------
 include/linux/fscrypt.h            |  52 ++++++++++--
 include/linux/parser.h             |   5 +-
 11 files changed, 383 insertions(+), 104 deletions(-)
Signature · 1 line
2.26.2