Lines Matching full:head
21 enum pkcs11_rc init_attributes_head(struct obj_attrs **head) in init_attributes_head() argument
23 *head = TEE_Malloc(sizeof(**head), TEE_MALLOC_FILL_ZERO); in init_attributes_head()
24 if (!*head) in init_attributes_head()
30 enum pkcs11_rc add_attribute(struct obj_attrs **head, uint32_t attribute, in add_attribute() argument
33 size_t buf_len = sizeof(struct obj_attrs) + (*head)->attrs_size; in add_attribute()
34 char **bstart = (void *)head; in add_attribute()
53 head = (void *)bstart; in add_attribute()
54 (*head)->attrs_size += 2 * sizeof(uint32_t) + size; in add_attribute()
55 (*head)->attrs_count++; in add_attribute()
60 static enum pkcs11_rc _remove_attribute(struct obj_attrs **head, in _remove_attribute() argument
63 struct obj_attrs *h = *head; in _remove_attribute()
97 enum pkcs11_rc remove_empty_attribute(struct obj_attrs **head, in remove_empty_attribute() argument
100 return _remove_attribute(head, attribute, true /* empty */); in remove_empty_attribute()
103 void get_attribute_ptrs(struct obj_attrs *head, uint32_t attribute, in get_attribute_ptrs() argument
106 char *cur = (char *)head + sizeof(struct obj_attrs); in get_attribute_ptrs()
107 char *end = cur + head->attrs_size; in get_attribute_ptrs()
152 enum pkcs11_rc get_attribute_ptr(struct obj_attrs *head, uint32_t attribute, in get_attribute_ptr() argument
157 get_attribute_ptrs(head, attribute, attr_ptr, attr_size, &count); in get_attribute_ptr()
168 enum pkcs11_rc get_attribute(struct obj_attrs *head, uint32_t attribute, in get_attribute() argument
175 rc = get_attribute_ptr(head, attribute, &attr_ptr, &size); in get_attribute()
194 enum pkcs11_rc set_attribute(struct obj_attrs **head, uint32_t attribute, in set_attribute() argument
199 rc = _remove_attribute(head, attribute, false); in set_attribute()
203 return add_attribute(head, attribute, data, size); in set_attribute()
207 struct obj_attrs *head) in modify_attributes_list() argument
209 char *cur = (char *)head + sizeof(struct obj_attrs); in modify_attributes_list()
210 char *end = cur + head->attrs_size; in modify_attributes_list()
232 bool get_bool(struct obj_attrs *head, uint32_t attribute) in get_bool() argument
238 rc = get_attribute(head, attribute, &bbool, &size); in get_bool()
282 enum pkcs11_rc attributes_match_add_reference(struct obj_attrs **head, in attributes_match_add_reference() argument
299 rc = get_attribute_ptr(*head, pkcs11_ref.id, &value, &size); in attributes_match_add_reference()
301 rc = add_attribute(head, pkcs11_ref.id, in attributes_match_add_reference()
431 struct obj_attrs head = { }; in trace_attributes() local
434 TEE_MemMove(&head, ref, sizeof(head)); in trace_attributes()
436 if (!head.attrs_count) in trace_attributes()
450 pre, head.attrs_count, head.attrs_size); in trace_attributes()
453 __trace_attributes(pre, (char *)ref + sizeof(head), in trace_attributes()
454 (char *)ref + sizeof(head) + head.attrs_size); in trace_attributes()