summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs_crypto.h
diff options
context:
space:
mode:
authorJaegeuk Kim2015-04-22 01:23:47 +0200
committerJaegeuk Kim2015-05-29 00:41:49 +0200
commit0adda907f23df2e19355b58a20f0a7ff76587c6a (patch)
tree1ab172e639f055eddf80b6e679ba07445625e8c9 /fs/f2fs/f2fs_crypto.h
parentf2fs crypto: add f2fs encryption facilities (diff)
downloadkernel-qcow2-linux-0adda907f23df2e19355b58a20f0a7ff76587c6a.tar.gz
kernel-qcow2-linux-0adda907f23df2e19355b58a20f0a7ff76587c6a.tar.xz
kernel-qcow2-linux-0adda907f23df2e19355b58a20f0a7ff76587c6a.zip
f2fs crypto: add encryption key management facilities
This patch copies from encrypt_key.c in ext4, and modifies for f2fs. Use GFP_NOFS, since _f2fs_get_encryption_info is called under f2fs_lock_op. Signed-off-by: Michael Halcrow <mhalcrow@google.com> Signed-off-by: Ildar Muslukhov <muslukhovi@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs_crypto.h')
-rw-r--r--fs/f2fs/f2fs_crypto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs_crypto.h b/fs/f2fs/f2fs_crypto.h
index 3323266e7e2b..6e4139493ba5 100644
--- a/fs/f2fs/f2fs_crypto.h
+++ b/fs/f2fs/f2fs_crypto.h
@@ -65,6 +65,9 @@ struct f2fs_encryption_context {
#define F2FS_AES_256_XTS_KEY_SIZE 64
#define F2FS_MAX_KEY_SIZE 64
+#define F2FS_KEY_DESC_PREFIX "f2fs:"
+#define F2FS_KEY_DESC_PREFIX_SIZE 5
+
struct f2fs_encryption_key {
__u32 mode;
char raw[F2FS_MAX_KEY_SIZE];