Whamcloud - gitweb
AOSP: ANDROID: e2fsck: Handle casefolded encryption
authorDaniel Rosenberg <drosen@google.com>
Fri, 13 Mar 2020 23:08:52 +0000 (16:08 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Jan 2021 04:53:36 +0000 (23:53 -0500)
commit61421ee58861f7f637e1087d67be400294dae199
tree308cbe24c2d10170f11cca665787fdbd4a0df9fd
parentb22c36e60cddc7c11bc8071a8390f98347b98052
AOSP: ANDROID: e2fsck: Handle casefolded encryption

Adds support for EXT2_HASH_SIPHASH, and reading the hash from disk in
that case. We cannot compute the siphash without the key, so we must
not modify the names of any encrypted and casefolded directories,
which limits some recovery options, and we must assume the hashes
stored in dirents are correct.
This is in preparation for upcoming kernel support for encryption and
casefolding at the same time.

Google-Bug-Id: 138322712
Test: Create fs with casefold and encryption enabled via mke2fs and
      tune2fs, run fsck after creating casefolded + encrypted folder

Change-Id: Icca32d7d9dd3c7f52da03d60e4d89273cbec0a7d
From AOSP commit: 67eae926bdac1a54dbb8335731c5e1581f93e4bb
e2fsck/e2fsck.c
e2fsck/e2fsck.h
e2fsck/pass1.c
e2fsck/pass2.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/rehash.c
lib/ext2fs/ext2_fs.h