fscrypt: symlink helpers and fscrypt.h cleanup
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 8 repliesIn review
- v124 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Fixed __fscrypt_prepare_symlink() to work correctly with test_dummy_encryption mode in the case where the directory is unencrypted and has not yet had its ->i_crypt_info set up.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headersinclude/ include/ include/ | +10 | 0 replies | |
| 2/11 | fscrypt: move fscrypt_control_page() to supp/notsupp headersinclude/ include/ include/ | +13 | 0 replies | |
| 3/11 | fscrypt: move fscrypt_info_cachep declaration to fscrypt_private.hfs/ include/ | +1 | 0 replies | |
| 4/11 | fscrypt: move fscrypt_ctx declaration to fscrypt_supp.hinclude/ include/ | +16 | 0 replies | |
| 5/11 | fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp versionsinclude/ include/ include/ | +11 | 6 replies | |
| 6/11 | fscrypt: move fscrypt_operations declaration to fscrypt_supp.hinclude/ include/ | +18 | 0 replies | |
| 7/11 | fscrypt: move fscrypt_valid_enc_modes() to fscrypt_private.hfs/ include/ | +14 | 0 replies | |
| 8/11 | fscrypt: move fscrypt_is_dot_dotdot() to fs/crypto/fname.cfs/ include/ | +11 | 0 replies | |
| 9/11 | fscrypt: trim down fscrypt.h includesfs/ fs/ fs/ +2 more | +6 | 0 replies | |
| 10/11 | fscrypt: new helper functions for ->symlink()fs/ fs/ fs/ +3 more | +185 | 0 replies | |
| 11/11 | fscrypt: new helper function - fscrypt_get_symlink()fs/ include/ include/ | +84 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/11] fscrypt: symlink helpers and fscrypt.h cleanup
From: Eric Biggers <[email protected]>
This series introduces helper functions in fscrypt that filesystems can call to simplify handling of encrypted symlinks. The helpers also fix a couple subtle bugs, such as incorrectly rejecting symlinks that are very close to the maximum length, and accidentally leaving the "." and ".." symlink targets unencrypted (they need to be special in directory entries, but not in symlink targets).
Patches 1-9 are mostly cleanup to trim down fscrypt.h, moving stuff into more appropriate places depending on whether it is needed only internally by fscrypt, or only by filesystems supporting encryption, etc. I was going to send these out as a separate series, but there is a dependency because the symlink helpers depend on fscrypt_dummy_context_enabled() having been fixed to work correctly in the "notsupp" case.
Patch 10 introduces the helpers for ->symlink() and patch 11 introduces a helper for ->get_link().
The patches to switch ext4, f2fs, and ubifs over to use the helper functions were included in v1 of this patchset
(https://marc.info/?l=linux-ext4&m=151336000031869). They are not included now since I'm planning to get them picked up by the individual filesystem maintainers after this goes in.
Changed since v1:
- Fixed __fscrypt_prepare_symlink() to work correctly with test_dummy_encryption mode in the case where the directory is unencrypted and has not yet had its ->i_crypt_info set up.
Eric Biggers (11):
fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headers
fscrypt: move fscrypt_control_page() to supp/notsupp headers
fscrypt: move fscrypt_info_cachep declaration to fscrypt_private.h
fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h
fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp
versions
fscrypt: move fscrypt_operations declaration to fscrypt_supp.h
fscrypt: move fscrypt_valid_enc_modes() to fscrypt_private.h
fscrypt: move fscrypt_is_dot_dotdot() to fs/crypto/fname.c
fscrypt: trim down fscrypt.h includes
fscrypt: new helper functions for ->symlink()
fscrypt: new helper function - fscrypt_get_symlink()
fs/crypto/crypto.c | 1 + fs/crypto/fname.c | 20 ++++- fs/crypto/fscrypt_private.h | 19 +++++ fs/crypto/hooks.c | 163 +++++++++++++++++++++++++++++++++++++++ fs/crypto/keyinfo.c | 1 + include/linux/fscrypt.h | 165 ++++++++++++++++------------------------ include/linux/fscrypt_notsupp.h | 39 ++++++++++ include/linux/fscrypt_supp.h | 63 ++++++++++++++- 8 files changed, 369 insertions(+), 102 deletions(-)
Signature · 6 lines
2.16.0.rc0.223.g4a4ac83678-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot