diff options
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 17 |
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 | ||
325 | extern struct list_head key_tfm_list; | ||
326 | extern struct mutex key_tfm_list_mutex; | 326 | extern struct mutex key_tfm_list_mutex; |
327 | 327 | ||
328 | /** | 328 | /** |
@@ -521,11 +521,9 @@ extern struct kmem_cache *ecryptfs_file_info_cache; | |||
521 | extern struct kmem_cache *ecryptfs_dentry_info_cache; | 521 | extern struct kmem_cache *ecryptfs_dentry_info_cache; |
522 | extern struct kmem_cache *ecryptfs_inode_info_cache; | 522 | extern struct kmem_cache *ecryptfs_inode_info_cache; |
523 | extern struct kmem_cache *ecryptfs_sb_info_cache; | 523 | extern struct kmem_cache *ecryptfs_sb_info_cache; |
524 | extern struct kmem_cache *ecryptfs_header_cache_0; | ||
525 | extern struct kmem_cache *ecryptfs_header_cache_1; | 524 | extern struct kmem_cache *ecryptfs_header_cache_1; |
526 | extern struct kmem_cache *ecryptfs_header_cache_2; | 525 | extern struct kmem_cache *ecryptfs_header_cache_2; |
527 | extern struct kmem_cache *ecryptfs_xattr_cache; | 526 | extern struct kmem_cache *ecryptfs_xattr_cache; |
528 | extern struct kmem_cache *ecryptfs_lower_page_cache; | ||
529 | extern struct kmem_cache *ecryptfs_key_record_cache; | 527 | extern struct kmem_cache *ecryptfs_key_record_cache; |
530 | extern struct kmem_cache *ecryptfs_key_sig_cache; | 528 | extern struct kmem_cache *ecryptfs_key_sig_cache; |
531 | extern struct kmem_cache *ecryptfs_global_auth_tok_cache; | 529 | extern 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); |
563 | int ecryptfs_read_and_validate_xattr_region(char *page_virt, | 561 | int ecryptfs_read_and_validate_xattr_region(char *page_virt, |
564 | struct dentry *ecryptfs_dentry); | 562 | struct dentry *ecryptfs_dentry); |
565 | u16 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat); | 563 | u8 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat); |
566 | int ecryptfs_cipher_code_to_string(char *str, u16 cipher_code); | 564 | int ecryptfs_cipher_code_to_string(char *str, u8 cipher_code); |
567 | void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat); | 565 | void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat); |
568 | int ecryptfs_generate_key_packet_set(char *dest_base, | 566 | int 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); | |||
576 | int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode); | 574 | int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode); |
577 | int ecryptfs_inode_set(struct inode *inode, void *lower_inode); | 575 | int ecryptfs_inode_set(struct inode *inode, void *lower_inode); |
578 | void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode); | 576 | void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode); |
579 | ssize_t ecryptfs_getxattr(struct dentry *dentry, const char *name, void *value, | ||
580 | size_t size); | ||
581 | ssize_t | 577 | ssize_t |
582 | ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, | 578 | ecryptfs_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); |
624 | int ecryptfs_init_crypto(void); | 620 | int ecryptfs_init_crypto(void); |
625 | int ecryptfs_destroy_crypto(void); | 621 | int ecryptfs_destroy_crypto(void); |
622 | int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm); | ||
626 | int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, | 623 | int 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); |
632 | int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, | 629 | int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, |
633 | int num_zeros); | 630 | int num_zeros); |
634 | void ecryptfs_lower_offset_for_extent(loff_t *offset, loff_t extent_num, | ||
635 | struct ecryptfs_crypt_stat *crypt_stat); | ||
636 | int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, | 631 | int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, |
637 | loff_t offset, size_t size); | 632 | loff_t offset, size_t size); |
638 | int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, | 633 | int 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); |
649 | int ecryptfs_read(char *data, loff_t offset, size_t size, | ||
650 | struct file *ecryptfs_file); | ||
651 | struct page *ecryptfs_get_locked_page(struct file *file, loff_t index); | 644 | struct 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 */ |