Lines Matching refs:head

22 enum pkcs11_rc init_attributes_head(struct obj_attrs **head)  in init_attributes_head()  argument
24 *head = TEE_Malloc(sizeof(**head), TEE_MALLOC_FILL_ZERO); in init_attributes_head()
25 if (!*head) in init_attributes_head()
31 enum pkcs11_rc add_attribute(struct obj_attrs **head, uint32_t attribute, in add_attribute() argument
34 size_t buf_len = sizeof(struct obj_attrs) + (*head)->attrs_size; in add_attribute()
35 char **bstart = (void *)head; in add_attribute()
54 head = (void *)bstart; in add_attribute()
55 (*head)->attrs_size += 2 * sizeof(uint32_t) + size; in add_attribute()
56 (*head)->attrs_count++; in add_attribute()
61 static enum pkcs11_rc _remove_attribute(struct obj_attrs **head, in _remove_attribute() argument
64 struct obj_attrs *h = *head; in _remove_attribute()
98 enum pkcs11_rc remove_empty_attribute(struct obj_attrs **head, in remove_empty_attribute() argument
101 return _remove_attribute(head, attribute, true /* empty */); in remove_empty_attribute()
104 void get_attribute_ptrs(struct obj_attrs *head, uint32_t attribute, in get_attribute_ptrs() argument
107 char *cur = (char *)head + sizeof(struct obj_attrs); in get_attribute_ptrs()
108 char *end = cur + head->attrs_size; in get_attribute_ptrs()
153 enum pkcs11_rc get_attribute_ptr(struct obj_attrs *head, uint32_t attribute, in get_attribute_ptr() argument
158 get_attribute_ptrs(head, attribute, attr_ptr, attr_size, &count); in get_attribute_ptr()
169 enum pkcs11_rc get_attribute(struct obj_attrs *head, uint32_t attribute, in get_attribute() argument
176 rc = get_attribute_ptr(head, attribute, &attr_ptr, &size); in get_attribute()
195 enum pkcs11_rc set_attribute(struct obj_attrs **head, uint32_t attribute, in set_attribute() argument
200 rc = _remove_attribute(head, attribute, false); in set_attribute()
204 return add_attribute(head, attribute, data, size); in set_attribute()
208 struct obj_attrs *head) in modify_attributes_list() argument
210 char *cur = (char *)head + sizeof(struct obj_attrs); in modify_attributes_list()
211 char *end = cur + head->attrs_size; in modify_attributes_list()
233 bool get_bool(struct obj_attrs *head, uint32_t attribute) in get_bool() argument
239 rc = get_attribute(head, attribute, &bbool, &size); in get_bool()
279 enum pkcs11_rc attributes_match_add_reference(struct obj_attrs **head, in attributes_match_add_reference() argument
296 rc = get_attribute_ptr(*head, pkcs11_ref.id, &value, &size); in attributes_match_add_reference()
298 rc = add_attribute(head, pkcs11_ref.id, in attributes_match_add_reference()
428 struct obj_attrs head = { }; in trace_attributes() local
431 TEE_MemMove(&head, ref, sizeof(head)); in trace_attributes()
433 if (!head.attrs_count) in trace_attributes()
447 pre, head.attrs_count, head.attrs_size); in trace_attributes()
450 __trace_attributes(pre, (char *)ref + sizeof(head), in trace_attributes()
451 (char *)ref + sizeof(head) + head.attrs_size); in trace_attributes()