Skip to content

fscrypt: fscrypt_supported_policy() fixes and cleanups

Eric Biggers linux-fscrypt 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fscrypt: split up fscrypt_supported_policy() by policy versionfs/crypto/policy.c+59 -570 replies
2/4fscrypt: check for appropriate use of DIRECT_KEY flag earlierfs/crypto/fscrypt_private.h fs/crypto/keysetup.c fs/crypto/keysetup_v1.c +1 more+35 -300 replies
3/4fscrypt: move fscrypt_valid_enc_modes() to policy.cfs/crypto/fscrypt_private.h fs/crypto/policy.c+17 -180 replies
4/4fscrypt: remove fscrypt_is_direct_key_policy()fs/crypto/fscrypt_private.h+0 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] fscrypt: fscrypt_supported_policy() fixes and cleanups

Make FS_IOC_SET_ENCRYPTION_POLICY start rejecting the DIRECT_KEY flag when it's incompatible with the selected encryption modes, instead of delaying this check until later when actually trying to set up the directory's key.

Also make some related cleanups, such as splitting fscrypt_supported_policy() into a separate function for each encryption policy version.

Eric Biggers (4):
fscrypt: split up fscrypt_supported_policy() by policy version
fscrypt: check for appropriate use of DIRECT_KEY flag earlier
fscrypt: move fscrypt_valid_enc_modes() to policy.c
fscrypt: remove fscrypt_is_direct_key_policy()

 fs/crypto/fscrypt_private.h |  30 +------
 fs/crypto/keysetup.c        |  14 +---
 fs/crypto/keysetup_v1.c     |  15 ----
 fs/crypto/policy.c          | 163 +++++++++++++++++++++++-------------
 4 files changed, 111 insertions(+), 111 deletions(-)
Signature · 1 line
2.24.0.393.g34dc348eaf-goog