generic: test revalidation of encrypted dentries

Add a test which verifies that dentries in an encrypted directory
are invalidated when an encryption key is added --- which should
cause the plaintext filenames to be visible and accessible,
replacing the encoded ciphertext filenames and any negative dentries
for the plaintext names.  This primarily tests for a bug which was
fixed in the v4.5 kernel, plus a v4.6 fix for incorrect RCU usage in
the earlier fix.

Cc: linux-fscrypt@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Eric Biggers
2017-05-04 14:55:48 -07:00
committed by Eryu Guan
parent 54ac0dd308
commit 52f9ebbda9
7 changed files with 349 additions and 10 deletions
+1
View File
@@ -112,6 +112,7 @@
/src/t_dir_offset
/src/t_dir_offset2
/src/t_dir_type
/src/t_encrypted_d_revalidate
/src/t_futimens
/src/t_getcwd
/src/t_holes