• Home
  • Raw
  • Download

Lines Matching refs:base

118 	list_add_rcu(&profile->base.list, list);  in __add_profile()
144 list_del_rcu(&profile->base.list); in __list_remove_profile()
161 __aa_profile_list_release(&profile->base.profiles); in __remove_profile()
177 list_for_each_entry_safe(profile, tmp, head, base.list) in __aa_profile_list_release()
216 aa_policy_destroy(&profile->base); in aa_free_profile()
268 if (!aa_policy_init(&profile->base, NULL, hname, gfp)) in aa_alloc_profile()
282 profile->label.hname = profile->base.hname; in aa_alloc_profile()
340 profile = __find_child(&parent->base.profiles, name); in aa_find_child()
368 policy = &ns->base; in __lookup_parent()
375 policy = &profile->base; in __lookup_parent()
380 return &ns->base; in __lookup_parent()
381 return &profile->base; in __lookup_parent()
396 static struct aa_profile *__lookupn_profile(struct aa_policy *base, in __lookupn_profile() argument
404 profile = __strn_find_child(&base->profiles, hname, in __lookupn_profile()
409 base = &profile->base; in __lookupn_profile()
415 return __strn_find_child(&base->profiles, hname, n); in __lookupn_profile()
419 static struct aa_profile *__lookup_profile(struct aa_policy *base, in __lookup_profile() argument
422 return __lookupn_profile(base, hname, strlen(hname)); in __lookup_profile()
440 profile = __lookupn_profile(&ns->base, hname, n); in aa_lookupn_profile()
457 struct aa_profile *aa_fqlookupn_profile(struct aa_label *base, in aa_fqlookupn_profile() argument
467 ns = aa_lookupn_ns(labels_ns(base), ns_name, ns_len); in aa_fqlookupn_profile()
471 ns = aa_get_ns(labels_ns(base)); in aa_fqlookupn_profile()
504 const char *base, gfp_t gfp) in aa_new_null_profile() argument
512 if (base) { in aa_new_null_profile()
513 name = kmalloc(strlen(parent->base.hname) + 8 + strlen(base), in aa_new_null_profile()
516 sprintf(name, "%s//null-%s", parent->base.hname, base); in aa_new_null_profile()
522 name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, gfp); in aa_new_null_profile()
525 sprintf(name, "%s//null-%x", parent->base.hname, in aa_new_null_profile()
552 p = __find_child(&parent->base.profiles, bname); in aa_new_null_profile()
557 __add_profile(&parent->base.profiles, profile); in aa_new_null_profile()
708 const char *base = basename(profile->base.hname); in __list_lookup_parent() local
709 long len = base - profile->base.hname; in __list_lookup_parent()
720 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
721 0 && ent->new->base.hname[len] == 0) in __list_lookup_parent()
745 if (!list_empty(&old->base.profiles)) { in __replace_profile()
747 list_splice_init_rcu(&old->base.profiles, &lh, synchronize_rcu); in __replace_profile()
749 list_for_each_entry_safe(child, tmp, &lh, base.list) { in __replace_profile()
752 list_del_init(&child->base.list); in __replace_profile()
753 p = __find_child(&new->base.profiles, child->base.name); in __replace_profile()
765 list_add_rcu(&child->base.list, &new->base.profiles); in __replace_profile()
778 if (list_empty(&new->base.list)) { in __replace_profile()
780 list_replace_rcu(&old->base.list, &new->base.list); in __replace_profile()
801 *p = aa_get_profile(__lookup_profile(&ns->base, hname)); in __lookup_replace()
815 aa_put_str(new->base.hname); in share_name()
816 aa_get_str(old->base.hname); in share_name()
817 new->base.hname = old->base.hname; in share_name()
818 new->base.name = old->base.name; in share_name()
933 error = __lookup_replace(ns, ent->new->base.hname, in aa_replace_profiles()
954 policy = __lookup_parent(ns, ent->new->base.hname); in aa_replace_profiles()
964 } else if (policy != &ns->base) { in aa_replace_profiles()
1007 audit_policy(label, op, ns_name, ent->new->base.hname, in aa_replace_profiles()
1020 audit_policy(label, op, ns_name, ent->new->base.hname, NULL, in aa_replace_profiles()
1033 lh = &parent->base.profiles; in aa_replace_profiles()
1035 lh = &ns->base.profiles; in aa_replace_profiles()
1059 audit_policy(label, op, ns_name, ent ? ent->new->base.hname : NULL, in aa_replace_profiles()
1070 audit_policy(label, op, ns_name, tmp->new->base.hname, info, in aa_replace_profiles()
1135 profile = aa_get_profile(__lookup_profile(&ns->base, name)); in aa_remove_profiles()
1141 name = profile->base.hname; in aa_remove_profiles()