summaryrefslogtreecommitdiff
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorGilad Broner <gbroner@codeaurora.org>2016-01-11 14:07:26 +0200
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-25 16:04:06 -0700
commitf50a4a1dc7a0196eb94bfaa18abb95dd387fee1e (patch)
tree46e88594582b5b69030c0eb224eca30a53f81da5 /fs/ecryptfs/ecryptfs_kernel.h
parent53db8d989d8f077a5c8b2e41370449004b1c9199 (diff)
eCryptfs: fixed bug in cipher handling
Cipher was sometimes not treated properly, causing valid requests belonging to eCryptfs to be treated as regular. Change-Id: Iabfb93cc4c9e9e167901043482eb99613ed70343 Signed-off-by: Andrey Markovytch <andreym@codeaurora.org> Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index f5c96ed40805..89e7aa5f178a 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -624,7 +624,10 @@ int ecryptfs_encrypt_and_encode_filename(
const char *name, size_t name_size);
struct dentry *ecryptfs_lower_dentry(struct dentry *this_dentry);
void ecryptfs_dump_hex(char *data, int bytes);
-void ecryptfs_dump_salt_hex(char *data, int key_size, char *cipher);
+void ecryptfs_dump_salt_hex(char *data, int key_size,
+ const struct ecryptfs_crypt_stat *crypt_stat);
+extern void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat);
+
int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg,
int sg_size);
int ecryptfs_compute_root_iv(struct ecryptfs_crypt_stat *crypt_stat);
@@ -779,16 +782,20 @@ void ecryptfs_freepage(struct page *page);
struct ecryptfs_events *get_events(void);
-size_t ecryptfs_get_salt_size_for_cipher(const char *cipher);
+size_t ecryptfs_get_salt_size_for_cipher(
+ const struct ecryptfs_crypt_stat *crypt_stat);
+
+size_t ecryptfs_get_salt_size_for_cipher_mount(
+ const struct ecryptfs_mount_crypt_stat *mount_crypt_stat);
size_t ecryptfs_get_key_size_to_enc_data(
- struct ecryptfs_crypt_stat *crypt_stat);
+ const struct ecryptfs_crypt_stat *crypt_stat);
size_t ecryptfs_get_key_size_to_store_key(
- struct ecryptfs_crypt_stat *crypt_stat);
+ const struct ecryptfs_crypt_stat *crypt_stat);
size_t ecryptfs_get_key_size_to_restore_key(size_t stored_key_size,
- const char *cipher);
+ const struct ecryptfs_crypt_stat *crypt_stat);
bool ecryptfs_check_space_for_salt(const size_t key_size,
const size_t salt_size);