diff options
Diffstat (limited to 'fs/ext4/ext4_crypto.h')
-rw-r--r-- | fs/ext4/ext4_crypto.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/ext4/ext4_crypto.h b/fs/ext4/ext4_crypto.h index 552424ae3ab3..deecbe8968d1 100644 --- a/fs/ext4/ext4_crypto.h +++ b/fs/ext4/ext4_crypto.h @@ -66,10 +66,17 @@ struct ext4_encryption_context { #define EXT4_KEY_DESC_PREFIX "ext4:" #define EXT4_KEY_DESC_PREFIX_SIZE 5 +/* This is passed in from userspace into the kernel keyring */ struct ext4_encryption_key { - uint32_t mode; - char raw[EXT4_MAX_KEY_SIZE]; - uint32_t size; + __u32 mode; + char raw[EXT4_MAX_KEY_SIZE]; + __u32 size; +} __attribute__((__packed__)); + +struct ext4_crypt_info { + unsigned char ci_mode; + unsigned char ci_size; + char ci_raw[EXT4_MAX_KEY_SIZE]; }; #define EXT4_CTX_REQUIRES_FREE_ENCRYPT_FL 0x00000001 @@ -125,7 +132,7 @@ struct ext4_fname_crypto_ctx { u32 lim; struct crypto_ablkcipher *ctfm; struct crypto_hash *htfm; - struct ext4_encryption_key key; + struct ext4_crypt_info ci; unsigned flags : 8; unsigned has_valid_key : 1; unsigned ctfm_key_is_ready : 1; |