Lines Matching refs:label

59 struct label {
198 * Label is combination of label attributes + name.
201 static struct label *construct_label(char *component, u8 varos, u8 *name,
204 struct label *label;
213 if (slen > sizeof(label->attr.prefix))
217 // The label structure must not cross a page boundary, so we align to the next power of 2
218 label = kzalloc(roundup_pow_of_two(sizeof(*label)), GFP_KERNEL);
219 if (!label)
223 memcpy(&label->attr.prefix, component, slen);
225 label->attr.version = PLPKS_LABEL_VERSION;
226 label->attr.os = varos;
227 label->attr.length = PLPKS_MAX_LABEL_ATTR_SIZE;
228 memcpy(&label->name, name, namelen);
230 label->size = sizeof(struct label_attr) + namelen;
232 return label;
391 static int plpks_confirm_object_flushed(struct label *label,
402 virt_to_phys(auth), virt_to_phys(label),
403 label->size);
433 struct label *label;
452 label = construct_label(var->component, var->os, var->name, var->namelen);
453 if (IS_ERR(label)) {
454 rc = PTR_ERR(label);
460 virt_to_phys(auth), virt_to_phys(label),
461 label->size, var->policy, flags,
475 rc = plpks_confirm_object_flushed(label, auth);
477 kfree(label);
488 struct label *label;
502 label = construct_label(var.component, var.os, var.name, var.namelen);
503 if (IS_ERR(label)) {
504 rc = PTR_ERR(label);
509 virt_to_phys(label), label->size, var.policy,
513 rc = plpks_confirm_object_flushed(label, auth);
516 kfree(label);
527 struct label *label;
537 label = construct_label(component, varos, vname.name, vname.namelen);
538 if (IS_ERR(label)) {
539 rc = PTR_ERR(label);
544 virt_to_phys(label), label->size);
547 rc = plpks_confirm_object_flushed(label, auth);
550 kfree(label);
561 struct label *label = NULL;
573 label = construct_label(var->component, var->os, var->name,
575 if (IS_ERR(label)) {
576 rc = PTR_ERR(label);
589 virt_to_phys(label), label->size, virt_to_phys(output),
615 kfree(label);