Re: [f2fs-dev] [PATCH] fscrypt: split up FS_CRYPTO_BLOCK_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 04, 2022 at 06:09:14PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux