fscrypt: add some higher-level helper functions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 1 replyIn review
- v125 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- Added Dave Chinner's patch to make fscrypt.h include fscrypt_supp.h or fscrypt_notsupp.h, then reorganized the helpers so that most are defined in fscrypt.h.
- As noted above, for now omitted the patches to switch the individual filesystems over to the new helpers.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | fscrypt: clean up include file messfs/ fs/ fs/ +4 more | +49 | 0 replies | |
| 2/11 | fs, fscrypt: add an S_ENCRYPTED inode flagfs/ fs/ fs/ +4 more | +23 | 0 replies | |
| 3/11 | fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()fs/ fs/ fs/ +2 more | +7 | 0 replies | |
| 4/11 | fscrypt: remove ->is_encrypted()fs/ fs/ fs/ +3 more | +2 | 0 replies | |
| 5/11 | fscrypt: remove unneeded empty fscrypt_operations structsfs/ fs/ fs/ | +6 | 0 replies | |
| 6/11 | fscrypt: new helper function - fscrypt_require_key()include/ | +25 | 0 replies | |
| 7/11 | fscrypt: new helper function - fscrypt_file_open()fs/ fs/ include/ +1 more | +62 | 0 replies | |
| 8/11 | fscrypt: new helper function - fscrypt_prepare_link()fs/ include/ include/ +1 more | +49 | 0 replies | |
| 9/11 | fscrypt: new helper function - fscrypt_prepare_rename()fs/ include/ include/ +1 more | +77 | 0 replies | |
| 10/11 | fscrypt: new helper function - fscrypt_prepare_lookup()fs/ include/ include/ +1 more | +53 | 0 replies | |
| 11/11 | fscrypt: new helper function - fscrypt_prepare_setattr()include/ | +25 | 0 replies |
Reviews trailers per patch
10 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Chao Yu | Dave Chinner |
|---|---|---|
| 1/11 | ||
| 2/11 | R-b | A-b |
| 3/11 | A-b | |
| 4/11 | R-b | A-b |
| 5/11 | R-b | A-b |
| 6/11 | A-b | |
| 7/11 | A-b | |
| 8/11 | A-b | |
| 9/11 | A-b | |
| 10/11 | A-b | |
| 11/11 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/11] fscrypt: add some higher-level helper functions
From: Eric Biggers <[email protected]>
This series prepares to reduce code duplication among ext4, f2fs, and ubifs by introducing a S_ENCRYPTED inode flag (so we don't have to call back into the filesystem to test the filesystem-specific inode flag), then introducing new helper functions that are called at the beginning of the open, link, rename, lookup, and setattr operations.
In the future we maybe should even call these new helpers from the VFS so that each individual filesystem doesn't have to do it. But that's not possible currently because fs/crypto/ can be built as a module.
The patches to switch the filesystems over to use the helper functions were included in v1 of this patchset. They are not included now since I'm planning to get them picked up by the individual filesystem maintainers after this goes in.
Changes since v1:
- Added Dave Chinner's patch to make fscrypt.h include fscrypt_supp.h or fscrypt_notsupp.h, then reorganized the helpers so that most are defined in fscrypt.h.
- As noted above, for now omitted the patches to switch the individual filesystems over to the new helpers.
Dave Chinner (1):
fscrypt: clean up include file mess
Eric Biggers (10):
fs, fscrypt: add an S_ENCRYPTED inode flag
fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()
fscrypt: remove ->is_encrypted()
fscrypt: remove unneeded empty fscrypt_operations structs
fscrypt: new helper function - fscrypt_require_key()
fscrypt: new helper function - fscrypt_file_open()
fscrypt: new helper function - fscrypt_prepare_link()
fscrypt: new helper function - fscrypt_prepare_rename()
fscrypt: new helper function - fscrypt_prepare_lookup()
fscrypt: new helper function - fscrypt_prepare_setattr()
fs/crypto/Makefile | 2 +- fs/crypto/crypto.c | 2 +- fs/crypto/fname.c | 3 +- fs/crypto/fscrypt_private.h | 3 +- fs/crypto/hooks.c | 112 +++++++++++++++ fs/crypto/keyinfo.c | 2 +- fs/crypto/policy.c | 6 +- fs/ext4/ext4.h | 8 +- fs/ext4/inode.c | 7 +- fs/ext4/super.c | 15 +- fs/f2fs/f2fs.h | 9 +- fs/f2fs/inode.c | 5 +- fs/f2fs/super.c | 7 +- fs/ubifs/crypto.c | 1 - fs/ubifs/ioctl.c | 5 +- fs/ubifs/super.c | 8 +- fs/ubifs/ubifs.h | 18 +-- fs/ubifs/xattr.c | 1 + include/linux/fs.h | 2 + include/linux/fscrypt.h | 293 ++++++++++++++++++++++++++++++++++++++++ include/linux/fscrypt_common.h | 141 ------------------- include/linux/fscrypt_notsupp.h | 39 +++++- include/linux/fscrypt_supp.h | 17 ++- 23 files changed, 505 insertions(+), 201 deletions(-) create mode 100644 fs/crypto/hooks.c create mode 100644 include/linux/fscrypt.h delete mode 100644 include/linux/fscrypt_common.h
Signature · 1 line
2.14.2.920.gcf0c67979c-goog