Lines Matching refs:label
59 struct label { struct
201 static struct label *construct_label(char *component, u8 varos, u8 *name, in construct_label()
204 struct label *label; in construct_label() local
213 if (slen > sizeof(label->attr.prefix)) in construct_label()
218 label = kzalloc(roundup_pow_of_two(sizeof(*label)), GFP_KERNEL); in construct_label()
219 if (!label) in construct_label()
223 memcpy(&label->attr.prefix, component, slen); in construct_label()
225 label->attr.version = PLPKS_LABEL_VERSION; in construct_label()
226 label->attr.os = varos; in construct_label()
227 label->attr.length = PLPKS_MAX_LABEL_ATTR_SIZE; in construct_label()
228 memcpy(&label->name, name, namelen); in construct_label()
230 label->size = sizeof(struct label_attr) + namelen; in construct_label()
232 return label; in construct_label()
391 static int plpks_confirm_object_flushed(struct label *label, in plpks_confirm_object_flushed() argument
402 virt_to_phys(auth), virt_to_phys(label), in plpks_confirm_object_flushed()
403 label->size); in plpks_confirm_object_flushed()
432 struct label *label; in plpks_signed_update_var() local
451 label = construct_label(var->component, var->os, var->name, var->namelen); in plpks_signed_update_var()
452 if (IS_ERR(label)) { in plpks_signed_update_var()
453 rc = PTR_ERR(label); in plpks_signed_update_var()
459 virt_to_phys(auth), virt_to_phys(label), in plpks_signed_update_var()
460 label->size, var->policy, flags, in plpks_signed_update_var()
475 rc = plpks_confirm_object_flushed(label, auth); in plpks_signed_update_var()
477 kfree(label); in plpks_signed_update_var()
488 struct label *label; in plpks_write_var() local
502 label = construct_label(var.component, var.os, var.name, var.namelen); in plpks_write_var()
503 if (IS_ERR(label)) { in plpks_write_var()
504 rc = PTR_ERR(label); in plpks_write_var()
509 virt_to_phys(label), label->size, var.policy, in plpks_write_var()
513 rc = plpks_confirm_object_flushed(label, auth); in plpks_write_var()
516 kfree(label); in plpks_write_var()
527 struct label *label; in plpks_remove_var() local
537 label = construct_label(component, varos, vname.name, vname.namelen); in plpks_remove_var()
538 if (IS_ERR(label)) { in plpks_remove_var()
539 rc = PTR_ERR(label); in plpks_remove_var()
544 virt_to_phys(label), label->size); in plpks_remove_var()
547 rc = plpks_confirm_object_flushed(label, auth); in plpks_remove_var()
550 kfree(label); in plpks_remove_var()
561 struct label *label = NULL; in plpks_read_var() local
573 label = construct_label(var->component, var->os, var->name, in plpks_read_var()
575 if (IS_ERR(label)) { in plpks_read_var()
576 rc = PTR_ERR(label); in plpks_read_var()
589 virt_to_phys(label), label->size, virt_to_phys(output), in plpks_read_var()
615 kfree(label); in plpks_read_var()