Skip to content

backport some more fscrypt fixes to 4.19

Eric Biggers linux-ext4 linux-f2fs-devel linux-fscrypt linux-mtd stable 1 version Applied

Status from this message: This is a note to let you know that I've just added the patch titled

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5fscrypt: clean up and improve dentry revalidationfs/crypto/crypto.c fs/crypto/hooks.c include/linux/dcache.h +1 more+35 -351 reply
2/5fscrypt: fix race allowing rename() and link() of ciphertext dentriesfs/crypto/hooks.c include/linux/fscrypt.h include/linux/fscrypt_notsupp.h +1 more+16 -51 reply
3/5fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directoryfs/dcache.c+15 -01 reply
4/5fscrypt: only set dentry_operations on ciphertext dentriesfs/crypto/hooks.c+1 -21 reply
5/5fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertextfs/crypto/fname.c fs/crypto/hooks.c fs/ext4/ext4.h +6 more+139 -661 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 4.19 0/5] backport some more fscrypt fixes to 4.19

Backport some fscrypt fixes from upstream 5.2 to 4.19-stable.

This is needed to get 'kvm-xfstests -c ext4,f2fs,ubifs -g encrypt' to fully pass on 4.19-stable. Before, generic/397 and generic/429 failed on UBIFS due to missing "fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext".

This also fixes some bugs that aren't yet covered by the xfstests. E.g., "fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory" fixes a bug that caused real-world problems on Chrome OS.

Some relatively straightforward adjustments were needed to the patches, mainly due to the refactoring of fscrypt.h that was done in 5.1.

Eric Biggers (5):
fscrypt: clean up and improve dentry revalidation
fscrypt: fix race allowing rename() and link() of ciphertext dentries fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory
fscrypt: only set dentry_operations on ciphertext dentries
fscrypt: fix race where ->lookup() marks plaintext dentry as
ciphertext

 fs/crypto/crypto.c              | 58 +++++++++++++------------
 fs/crypto/fname.c               |  1 +
 fs/crypto/hooks.c               | 28 ++++++++----
 fs/dcache.c                     | 15 +++++++
 fs/ext4/ext4.h                  | 62 ++++++++++++++++++++-------
 fs/ext4/namei.c                 | 76 ++++++++++++++++++++++-----------
 fs/f2fs/namei.c                 | 17 +++++---
 fs/ubifs/dir.c                  |  8 ++--
 include/linux/dcache.h          |  2 +-
 include/linux/fscrypt.h         | 30 +++++++------
 include/linux/fscrypt_notsupp.h |  9 ++--
 include/linux/fscrypt_supp.h    |  6 ++-
 12 files changed, 205 insertions(+), 107 deletions(-)
Signature · 1 line
2.29.1