Lines Matching full:head

91 	struct tee_fs_htree_image head;  member
133 struct tee_fs_htree_image *head) in rpc_read_head() argument
136 head, sizeof(*head)); in rpc_read_head()
164 const struct tee_fs_htree_image *head) in rpc_write_head() argument
167 head, sizeof(*head)); in rpc_write_head()
335 res = rpc_read_head(ht, idx, &ht->head); in init_head_from_data()
345 struct tee_fs_htree_image head[2]; in init_head_from_data() local
348 res = rpc_read_head(ht, idx, head + idx); in init_head_from_data()
353 idx = get_idx_from_counter(head[0].counter, head[1].counter); in init_head_from_data()
361 ht->head = head[idx]; in init_head_from_data()
364 if (ht->head.counter < min_counter) in init_head_from_data()
456 iv = ht->head.iv; in authenc_init()
457 aad_len += sizeof(ht->head.counter); in authenc_init()
498 (void *)&ht->head.counter, in authenc_init()
499 sizeof(ht->head.counter)); in authenc_init()
504 res = crypto_authenc_update_aad(ctx, mode, ht->head.enc_fek, in authenc_init()
568 res = tee_fs_fek_crypt(ht->uuid, TEE_MODE_DECRYPT, ht->head.enc_fek, in verify_root()
577 return authenc_decrypt_final(ctx, ht->head.tag, ht->head.imeta, in verify_root()
651 sizeof(ht->fek), ht->head.enc_fek); in create_and_sync()
667 static bool ht_head_is_partially_done(const struct tee_fs_htree_image *head) in ht_head_is_partially_done() argument
671 return head->counter == 0 && in ht_head_is_partially_done()
672 !memcmp(head->tag, zero_tag, sizeof(head->tag)); in ht_head_is_partially_done()
699 * head may not have been written and counter is still 0. in tee_fs_htree_open()
702 if (ht_head_is_partially_done(&ht->head)) { in tee_fs_htree_open()
782 vers = !(targ->ht->head.counter & 1); in htree_sync_node_to_storage()
801 ht->head.counter++; in update_root()
807 return authenc_encrypt_final(ctx, ht->head.tag, &ht->imeta, in update_root()
808 sizeof(ht->imeta), &ht->head.imeta); in update_root()
837 res = rpc_write_head(ht, ht->head.counter & 1, &ht->head); in tee_fs_htree_sync_to_storage()
845 *counter = ht->head.counter; in tee_fs_htree_sync_to_storage()