aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index ce7a5d4aec36..5007f788da01 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -234,10 +234,11 @@ struct ecryptfs_crypt_stat {
234#define ECRYPTFS_KEY_VALID 0x00000080 234#define ECRYPTFS_KEY_VALID 0x00000080
235#define ECRYPTFS_METADATA_IN_XATTR 0x00000100 235#define ECRYPTFS_METADATA_IN_XATTR 0x00000100
236#define ECRYPTFS_VIEW_AS_ENCRYPTED 0x00000200 236#define ECRYPTFS_VIEW_AS_ENCRYPTED 0x00000200
237#define ECRYPTFS_KEY_SET 0x00000400
237 u32 flags; 238 u32 flags;
238 unsigned int file_version; 239 unsigned int file_version;
239 size_t iv_bytes; 240 size_t iv_bytes;
240 size_t num_header_extents_at_front; 241 size_t num_header_bytes_at_front;
241 size_t extent_size; /* Data extent size; default is 4096 */ 242 size_t extent_size; /* Data extent size; default is 4096 */
242 size_t key_size; 243 size_t key_size;
243 size_t extent_shift; 244 size_t extent_shift;
@@ -322,7 +323,6 @@ struct ecryptfs_key_tfm {
322 unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; 323 unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1];
323}; 324};
324 325
325extern struct list_head key_tfm_list;
326extern struct mutex key_tfm_list_mutex; 326extern struct mutex key_tfm_list_mutex;
327 327
328/** 328/**
@@ -521,11 +521,9 @@ extern struct kmem_cache *ecryptfs_file_info_cache;
521extern struct kmem_cache *ecryptfs_dentry_info_cache; 521extern struct kmem_cache *ecryptfs_dentry_info_cache;
522extern struct kmem_cache *ecryptfs_inode_info_cache; 522extern struct kmem_cache *ecryptfs_inode_info_cache;
523extern struct kmem_cache *ecryptfs_sb_info_cache; 523extern struct kmem_cache *ecryptfs_sb_info_cache;
524extern struct kmem_cache *ecryptfs_header_cache_0;
525extern struct kmem_cache *ecryptfs_header_cache_1; 524extern struct kmem_cache *ecryptfs_header_cache_1;
526extern struct kmem_cache *ecryptfs_header_cache_2; 525extern struct kmem_cache *ecryptfs_header_cache_2;
527extern struct kmem_cache *ecryptfs_xattr_cache; 526extern struct kmem_cache *ecryptfs_xattr_cache;
528extern struct kmem_cache *ecryptfs_lower_page_cache;
529extern struct kmem_cache *ecryptfs_key_record_cache; 527extern struct kmem_cache *ecryptfs_key_record_cache;
530extern struct kmem_cache *ecryptfs_key_sig_cache; 528extern struct kmem_cache *ecryptfs_key_sig_cache;
531extern struct kmem_cache *ecryptfs_global_auth_tok_cache; 529extern struct kmem_cache *ecryptfs_global_auth_tok_cache;
@@ -562,8 +560,8 @@ int ecryptfs_read_and_validate_header_region(char *data,
562 struct inode *ecryptfs_inode); 560 struct inode *ecryptfs_inode);
563int ecryptfs_read_and_validate_xattr_region(char *page_virt, 561int ecryptfs_read_and_validate_xattr_region(char *page_virt,
564 struct dentry *ecryptfs_dentry); 562 struct dentry *ecryptfs_dentry);
565u16 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat); 563u8 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat);
566int ecryptfs_cipher_code_to_string(char *str, u16 cipher_code); 564int ecryptfs_cipher_code_to_string(char *str, u8 cipher_code);
567void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat); 565void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat);
568int ecryptfs_generate_key_packet_set(char *dest_base, 566int ecryptfs_generate_key_packet_set(char *dest_base,
569 struct ecryptfs_crypt_stat *crypt_stat, 567 struct ecryptfs_crypt_stat *crypt_stat,
@@ -576,8 +574,6 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length);
576int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode); 574int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode);
577int ecryptfs_inode_set(struct inode *inode, void *lower_inode); 575int ecryptfs_inode_set(struct inode *inode, void *lower_inode);
578void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode); 576void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode);
579ssize_t ecryptfs_getxattr(struct dentry *dentry, const char *name, void *value,
580 size_t size);
581ssize_t 577ssize_t
582ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, 578ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name,
583 void *value, size_t size); 579 void *value, size_t size);
@@ -623,6 +619,7 @@ ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name,
623 size_t key_size); 619 size_t key_size);
624int ecryptfs_init_crypto(void); 620int ecryptfs_init_crypto(void);
625int ecryptfs_destroy_crypto(void); 621int ecryptfs_destroy_crypto(void);
622int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm);
626int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, 623int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm,
627 struct mutex **tfm_mutex, 624 struct mutex **tfm_mutex,
628 char *cipher_name); 625 char *cipher_name);
@@ -631,8 +628,6 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,
631 char *sig); 628 char *sig);
632int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, 629int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start,
633 int num_zeros); 630 int num_zeros);
634void ecryptfs_lower_offset_for_extent(loff_t *offset, loff_t extent_num,
635 struct ecryptfs_crypt_stat *crypt_stat);
636int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, 631int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
637 loff_t offset, size_t size); 632 loff_t offset, size_t size);
638int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, 633int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode,
@@ -646,8 +641,6 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
646 pgoff_t page_index, 641 pgoff_t page_index,
647 size_t offset_in_page, size_t size, 642 size_t offset_in_page, size_t size,
648 struct inode *ecryptfs_inode); 643 struct inode *ecryptfs_inode);
649int ecryptfs_read(char *data, loff_t offset, size_t size,
650 struct file *ecryptfs_file);
651struct page *ecryptfs_get_locked_page(struct file *file, loff_t index); 644struct page *ecryptfs_get_locked_page(struct file *file, loff_t index);
652 645
653#endif /* #ifndef ECRYPTFS_KERNEL_H */ 646#endif /* #ifndef ECRYPTFS_KERNEL_H */