aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-17 17:16:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-17 17:16:21 -0500
commite0bcb42e602816415f6fe07313b6fc84932244b7 (patch)
tree36ece6403a56805a42332659f0762ce280bc936c /fs/ecryptfs/ecryptfs_kernel.h
parentb6b220b0c76f0aa9cb5efb882424a7acc109d898 (diff)
parent4670269faba728683f7250319a65390946c028e3 (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.h9
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
53void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok); 54void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok);
54extern void ecryptfs_to_hex(char *dst, char *src, size_t src_size); 55static inline void
56ecryptfs_to_hex(char *dst, char *src, size_t src_size)
57{
58 char *end = bin2hex(dst, src, src_size);
59 *end = '\0';
60}
61
55extern void ecryptfs_from_hex(char *dst, char *src, int dst_size); 62extern void ecryptfs_from_hex(char *dst, char *src, int dst_size);
56 63
57struct ecryptfs_key_record { 64struct ecryptfs_key_record {