diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 17:16:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 17:16:21 -0500 |
commit | e0bcb42e602816415f6fe07313b6fc84932244b7 (patch) | |
tree | 36ece6403a56805a42332659f0762ce280bc936c /fs/ecryptfs/ecryptfs_kernel.h | |
parent | b6b220b0c76f0aa9cb5efb882424a7acc109d898 (diff) | |
parent | 4670269faba728683f7250319a65390946c028e3 (diff) |
Merge tag 'ecryptfs-4.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
Pull eCryptfs updates from Tyler Hicks:
- miscellaneous code cleanups and refactoring
- fix a possible use after free bug when unloading the module
* tag 'ecryptfs-4.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
eCryptfs: constify attribute_group structures.
ecryptfs: remove unnecessary i_version bump
ecryptfs: use ARRAY_SIZE
ecryptfs: Adjust four checks for null pointers
ecryptfs: Return an error code only as a constant in ecryptfs_add_global_auth_tok()
ecryptfs: Delete 21 error messages for a failed memory allocation
eCryptfs: use after free in ecryptfs_release_messaging()
ecryptfs: remove private bin2hex implementation
ecryptfs: add missing \n to end of various error messages
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 3fbc0ff79699..e74cb2a0b299 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <crypto/skcipher.h> | 31 | #include <crypto/skcipher.h> |
32 | #include <keys/user-type.h> | 32 | #include <keys/user-type.h> |
33 | #include <keys/encrypted-type.h> | 33 | #include <keys/encrypted-type.h> |
34 | #include <linux/kernel.h> | ||
34 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
35 | #include <linux/fs_stack.h> | 36 | #include <linux/fs_stack.h> |
36 | #include <linux/namei.h> | 37 | #include <linux/namei.h> |
@@ -51,7 +52,13 @@ | |||
51 | #define ECRYPTFS_XATTR_NAME "user.ecryptfs" | 52 | #define ECRYPTFS_XATTR_NAME "user.ecryptfs" |
52 | 53 | ||
53 | void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok); | 54 | void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok); |
54 | extern void ecryptfs_to_hex(char *dst, char *src, size_t src_size); | 55 | static inline void |
56 | ecryptfs_to_hex(char *dst, char *src, size_t src_size) | ||
57 | { | ||
58 | char *end = bin2hex(dst, src, src_size); | ||
59 | *end = '\0'; | ||
60 | } | ||
61 | |||
55 | extern void ecryptfs_from_hex(char *dst, char *src, int dst_size); | 62 | extern void ecryptfs_from_hex(char *dst, char *src, int dst_size); |
56 | 63 | ||
57 | struct ecryptfs_key_record { | 64 | struct ecryptfs_key_record { |