ext4 crypto: optimize filename encryption
authorTheodore Ts'o <tytso@google.com>
Mon, 4 May 2015 23:35:03 +0000 (19:35 -0400)
committerIan Chang <ianc@nvidia.com>
Wed, 1 Jun 2016 05:00:02 +0000 (13:00 +0800)
commit5ef8e78d7f47668694cb0d06de6efdfcef33bf92
treecc3674940a542f3155a6343e83c457caae8f6205
parent4884446dd6d1a458095efd5a3748dd240cd3a4a3
ext4 crypto: optimize filename encryption

Encrypt the filename as soon it is passed in by the user.  This avoids
our needing to encrypt the filename 2 or 3 times while in the process
of creating a filename.

Similarly, when looking up a directory entry, encrypt the filename
early, or if the encryption key is not available, base-64 decode the
file syystem so that the hash value and the last 16 bytes of the
encrypted filename is available in the new struct ext4_filename data
structure.

Change-Id: Ia76a5e51770840c57a53180cd89476f2e9b8c966
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
fs/ext4/crypto_fname.c
fs/ext4/ext4.h
fs/ext4/inline.c
fs/ext4/namei.c