Searched refs:crypt_stat (Results 1 – 8 of 8) sorted by relevance
/fs/ecryptfs/ |
D | crypto.c | 62 struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_calculate_md5() argument 65 int rc = crypto_shash_tfm_digest(crypt_stat->hash_tfm, src, len, dst); in ecryptfs_calculate_md5() 110 int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_derive_iv() argument 119 ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv() 125 memcpy(src, crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv() 126 memset((src + crypt_stat->iv_bytes), 0, 16); in ecryptfs_derive_iv() 127 snprintf((src + crypt_stat->iv_bytes), 16, "%lld", offset); in ecryptfs_derive_iv() 130 ecryptfs_dump_hex(src, (crypt_stat->iv_bytes + 16)); in ecryptfs_derive_iv() 132 rc = ecryptfs_calculate_md5(dst, crypt_stat, src, in ecryptfs_derive_iv() 133 (crypt_stat->iv_bytes + 16)); in ecryptfs_derive_iv() [all …]
|
D | mmap.c | 70 struct ecryptfs_crypt_stat *crypt_stat) in strip_xattr_flag() argument 72 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) { in strip_xattr_flag() 75 crypt_stat->flags &= ~ECRYPTFS_METADATA_IN_XATTR; in strip_xattr_flag() 76 ecryptfs_write_crypt_stat_flags(page_virt, crypt_stat, in strip_xattr_flag() 78 crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; in strip_xattr_flag() 110 struct ecryptfs_crypt_stat *crypt_stat) in ecryptfs_copy_up_encrypted_with_header() argument 114 / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header() 122 (crypt_stat->metadata_size / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header() 136 strip_xattr_flag(page_virt + 16, crypt_stat); in ecryptfs_copy_up_encrypted_with_header() 138 crypt_stat, in ecryptfs_copy_up_encrypted_with_header() [all …]
|
D | keystore.c | 286 struct ecryptfs_crypt_stat *crypt_stat, char **packet, in write_tag_66_packet() argument 305 data_len = (5 + ECRYPTFS_SIG_SIZE_HEX + crypt_stat->key_size); in write_tag_66_packet() 325 rc = ecryptfs_write_packet_length(&message[i], crypt_stat->key_size + 3, in write_tag_66_packet() 334 memcpy(&message[i], crypt_stat->key, crypt_stat->key_size); in write_tag_66_packet() 335 i += crypt_stat->key_size; in write_tag_66_packet() 336 for (j = 0; j < crypt_stat->key_size; j++) in write_tag_66_packet() 337 checksum += crypt_stat->key[j]; in write_tag_66_packet() 1127 struct ecryptfs_crypt_stat *crypt_stat) in decrypt_pki_encrypted_session_key() argument 1170 memcpy(crypt_stat->key, auth_tok->session_key.decrypted_key, in decrypt_pki_encrypted_session_key() 1172 crypt_stat->key_size = auth_tok->session_key.decrypted_key_size; in decrypt_pki_encrypted_session_key() [all …]
|
D | inode.c | 221 struct ecryptfs_crypt_stat *crypt_stat = in ecryptfs_initialize_file() local 222 &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; in ecryptfs_initialize_file() 227 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_initialize_file() 293 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_i_size_read() local 305 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_i_size_read() 307 if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) in ecryptfs_i_size_read() 308 ecryptfs_set_default_sizes(crypt_stat); in ecryptfs_i_size_read() 315 crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; in ecryptfs_i_size_read() 699 upper_size_to_lower_size(struct ecryptfs_crypt_stat *crypt_stat, in upper_size_to_lower_size() argument 704 lower_size = ecryptfs_lower_header_size(crypt_stat); in upper_size_to_lower_size() [all …]
|
D | file.c | 131 struct ecryptfs_crypt_stat *crypt_stat; in read_or_initialize_metadata() local 134 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in read_or_initialize_metadata() 137 mutex_lock(&crypt_stat->cs_mutex); in read_or_initialize_metadata() 139 if (crypt_stat->flags & ECRYPTFS_POLICY_APPLIED && in read_or_initialize_metadata() 140 crypt_stat->flags & ECRYPTFS_KEY_VALID) { in read_or_initialize_metadata() 150 crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED in read_or_initialize_metadata() 165 mutex_unlock(&crypt_stat->cs_mutex); in read_or_initialize_metadata() 194 struct ecryptfs_crypt_stat *crypt_stat = NULL; in ecryptfs_open() local 209 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_open() 210 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_open() [all …]
|
D | ecryptfs_kernel.h | 258 struct ecryptfs_crypt_stat crypt_stat; member 357 struct ecryptfs_crypt_stat *crypt_stat; member 421 ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat) in ecryptfs_lower_header_size() argument 423 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) in ecryptfs_lower_header_size() 425 return crypt_stat->metadata_size; in ecryptfs_lower_header_size() 564 int ecryptfs_compute_root_iv(struct ecryptfs_crypt_stat *crypt_stat); 566 int ecryptfs_init_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat); 567 void ecryptfs_destroy_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat); 570 int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat); 579 struct ecryptfs_crypt_stat *crypt_stat, [all …]
|
D | read_write.c | 97 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_write() local 104 crypt_stat = &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; in ecryptfs_write() 170 if (crypt_stat->flags & ECRYPTFS_ENCRYPTED) in ecryptfs_write() 187 if (crypt_stat->flags & ECRYPTFS_ENCRYPTED) { in ecryptfs_write()
|
D | super.c | 44 if (ecryptfs_init_crypt_stat(&inode_info->crypt_stat)) { in ecryptfs_alloc_inode() 79 ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat); in ecryptfs_destroy_inode()
|