[f2fs-dev] [PATCH] fscrypt: split up FS_CRYPTO_BLOCK_SIZE
Eric Biggers
ebiggers at kernel.org
Wed Apr 13 22:31:33 PDT 2022
On Mon, Apr 04, 2022 at 06:09:14PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers at google.com>
>
> FS_CRYPTO_BLOCK_SIZE is neither the filesystem block size nor the
> granularity of encryption. Rather, it defines two logically separate
> constraints that both arise from the block size of the AES cipher:
>
> - The alignment required for the lengths of file contents blocks
> - The minimum input/output length for the filenames encryption modes
>
> Since there are way too many things called the "block size", and the
> connection with the AES block size is not easily understood, split
> FS_CRYPTO_BLOCK_SIZE into two constants FSCRYPT_CONTENTS_ALIGNMENT and
> FSCRYPT_FNAME_MIN_MSG_LEN that more clearly describe what they are.
>
> Signed-off-by: Eric Biggers <ebiggers at google.com>
> ---
> fs/crypto/crypto.c | 10 +++++-----
> fs/crypto/fname.c | 11 +++++++++--
> fs/ubifs/ubifs.h | 2 +-
> include/linux/fscrypt.h | 12 +++++++++++-
> 4 files changed, 26 insertions(+), 9 deletions(-)
Applied to fscrypt.git#master for 5.19.
- Eric
More information about the linux-mtd
mailing list