Lines Matching full:label

9  * AppArmor allocates a unique secid for every label used. If a label
10 * is replaced it receives the secid of the label it is replacing.
23 #include "include/label.h"
27 * secids - do not pin labels with a refcount. They rely on the label
39 * TODO: use secid_update in label replace
43 * aa_secid_update - update a secid mapping to a new label
45 * @label: label the secid will now map to
47 void aa_secid_update(u32 secid, struct aa_label *label) in aa_secid_update() argument
52 __xa_store(&aa_secids, secid, label, 0); in aa_secid_update()
58 * see label for inverse aa_label_to_secid
68 struct aa_label *label = aa_secid_to_label(secid); in apparmor_secid_to_secctx() local
74 if (!label) in apparmor_secid_to_secctx()
81 len = aa_label_asxprint(secdata, root_ns, label, in apparmor_secid_to_secctx()
84 len = aa_label_snxprint(NULL, 0, root_ns, label, flags); in apparmor_secid_to_secctx()
96 struct aa_label *label; in apparmor_secctx_to_secid() local
98 label = aa_label_strn_parse(&root_ns->unconfined->label, secdata, in apparmor_secctx_to_secid()
100 if (IS_ERR(label)) in apparmor_secctx_to_secid()
101 return PTR_ERR(label); in apparmor_secctx_to_secid()
102 *secid = label->secid; in apparmor_secctx_to_secid()
114 * @label: the label to allocate a secid for
117 * Returns: 0 with @label->secid initialized
118 * <0 returns error with @label->secid set to AA_SECID_INVALID
120 int aa_alloc_secid(struct aa_label *label, gfp_t gfp) in aa_alloc_secid() argument
126 ret = __xa_alloc(&aa_secids, &label->secid, label, in aa_alloc_secid()
131 label->secid = AA_SECID_INVALID; in aa_alloc_secid()