Skip to content

Reconcile Encryption and Casefolding in Ext4

Daniel Rosenberg linux-ext4 linux-fsdevel lkml 2 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied
  2. v12 patches 10 repliesSuperseded

Changes in v2 from the cover letter

When checking for 'fake' entries (which do not include the extra hash bytes) -Check for . and .. using names instead of position
-Check for csum entries via file_type instead of position
-Assume last entry in directory will be csum for __ext4_check_entry if csum enabled

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2ext4: Handle casefolding with encryptionDocumentation/filesystems/ext4/directory.rst fs/ext4/dir.c fs/ext4/ext4.h +4 more+285 -892 replies
2/2ext4: Optimize match for casefolded encrypted dirsfs/ext4/ext4.h fs/ext4/namei.c+38 -341 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndreas Dilger
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Reconcile Encryption and Casefolding in Ext4

These patches add support for ext4 encryption and casefolding at the same time. Since the hash for encrypted casefolded directory names cannot be computed without the key, we need to store the hash on disk. We only do so for encrypted and casefolded directories to avoid on disk format changes.

e2fsprogs has already been updated with support for casefolding and encryption.

v2 changes:
When checking for 'fake' entries (which do not include the extra hash bytes) -Check for . and .. using names instead of position
-Check for csum entries via file_type instead of position
-Assume last entry in directory will be csum for __ext4_check_entry if csum enabled

This means we don't need to pass along lblk all over the place

-Don't use siphash value for find_group_orlov, just use regular hash

Daniel Rosenberg (2):
ext4: Handle casefolding with encryption
ext4: Optimize match for casefolded encrypted dirs

 Documentation/filesystems/ext4/directory.rst |  27 +++
 fs/ext4/dir.c                                |  37 +++-
 fs/ext4/ext4.h                               |  73 +++++--
 fs/ext4/hash.c                               |  25 ++-
 fs/ext4/inline.c                             |  25 ++-
 fs/ext4/namei.c                              | 213 ++++++++++++++-----
 fs/ext4/super.c                              |   6 -
 7 files changed, 303 insertions(+), 103 deletions(-)

base-commit: f296bfd5cd04cbb49b8fc9585adc280ab2b58624

Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog