#ifndef __AA_LABEL_H
#define __AA_LABEL_H
#include <linux/atomic.h>
#include <linux/audit.h>
#include <linux/rbtree.h>
#include <linux/rcupdate.h>
#include "apparmor.h"
#include "lib.h"
struct aa_ns;
#define LOCAL_VEC_ENTRIES …
#define DEFINE_VEC(T, V) …
#define vec_setup(T, V, N, GFP) …
#define vec_cleanup(T, V, N) …
#define vec_last(VEC, SIZE) …
#define vec_ns(VEC, SIZE) …
#define vec_labelset(VEC, SIZE) …
#define cleanup_domain_vec(V, L) …
struct aa_profile;
#define VEC_FLAG_TERMINATE …
int aa_vec_unique(struct aa_profile **vec, int n, int flags);
struct aa_label *aa_vec_find_or_create_label(struct aa_profile **vec, int len,
gfp_t gfp);
#define aa_sort_and_merge_vec(N, V) …
struct aa_labelset { … };
#define __labelset_for_each(LS, N) …
enum label_flags { … };
struct aa_label;
struct aa_proxy { … };
struct label_it { … };
struct aa_label { … };
#define last_error(E, FN) …
#define label_isprofile(X) …
#define label_unconfined(X) …
#define unconfined(X) …
#define label_is_stale(X) …
#define __label_make_stale(X) …
#define labels_ns(X) …
#define labels_set(X) …
#define labels_view(X) …
#define labels_profile(X) …
int aa_label_next_confined(struct aa_label *l, int i);
#define label_for_each(I, L, P) …
#define label_for_each_cont(I, L, P) …
#define next_comb(I, L1, L2) …
#define label_for_each_comb(I, L1, L2, P1, P2) …
#define fn_for_each_comb(L1, L2, P1, P2, FN) …
#define label_for_each_confined(I, L, P) …
#define label_for_each_in_merge(I, A, B, P) …
#define label_for_each_not_in_set(I, SET, SUB, P) …
#define next_in_ns(i, NS, L) …
#define label_for_each_in_ns(I, NS, L, P) …
#define fn_for_each_in_ns(L, P, FN) …
#define fn_for_each_XXX(L, P, FN, ...) …
#define fn_for_each(L, P, FN) …
#define fn_for_each_confined(L, P, FN) …
#define fn_for_each2_XXX(L1, L2, P, FN, ...) …
#define fn_for_each_in_merge(L1, L2, P, FN) …
#define fn_for_each_not_in_set(L1, L2, P, FN) …
#define LABEL_MEDIATES(L, C) …
void aa_labelset_destroy(struct aa_labelset *ls);
void aa_labelset_init(struct aa_labelset *ls);
void __aa_labelset_update_subtree(struct aa_ns *ns);
void aa_label_destroy(struct aa_label *label);
void aa_label_free(struct aa_label *label);
void aa_label_kref(struct kref *kref);
bool aa_label_init(struct aa_label *label, int size, gfp_t gfp);
struct aa_label *aa_label_alloc(int size, struct aa_proxy *proxy, gfp_t gfp);
bool aa_label_is_subset(struct aa_label *set, struct aa_label *sub);
bool aa_label_is_unconfined_subset(struct aa_label *set, struct aa_label *sub);
struct aa_profile *__aa_label_next_not_in_set(struct label_it *I,
struct aa_label *set,
struct aa_label *sub);
bool aa_label_remove(struct aa_label *label);
struct aa_label *aa_label_insert(struct aa_labelset *ls, struct aa_label *l);
bool aa_label_replace(struct aa_label *old, struct aa_label *new);
bool aa_label_make_newest(struct aa_labelset *ls, struct aa_label *old,
struct aa_label *new);
struct aa_label *aa_label_find(struct aa_label *l);
struct aa_profile *aa_label_next_in_merge(struct label_it *I,
struct aa_label *a,
struct aa_label *b);
struct aa_label *aa_label_find_merge(struct aa_label *a, struct aa_label *b);
struct aa_label *aa_label_merge(struct aa_label *a, struct aa_label *b,
gfp_t gfp);
bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp);
#define FLAGS_NONE …
#define FLAG_SHOW_MODE …
#define FLAG_VIEW_SUBNS …
#define FLAG_HIDDEN_UNCONFINED …
#define FLAG_ABS_ROOT …
int aa_label_snxprint(char *str, size_t size, struct aa_ns *view,
struct aa_label *label, int flags);
int aa_label_asxprint(char **strp, struct aa_ns *ns, struct aa_label *label,
int flags, gfp_t gfp);
int aa_label_acntsxprint(char __counted **strp, struct aa_ns *ns,
struct aa_label *label, int flags, gfp_t gfp);
void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
struct aa_label *label, int flags, gfp_t gfp);
void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns,
struct aa_label *label, int flags, gfp_t gfp);
void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,
gfp_t gfp);
void aa_label_audit(struct audit_buffer *ab, struct aa_label *label, gfp_t gfp);
void aa_label_seq_print(struct seq_file *f, struct aa_label *label, gfp_t gfp);
void aa_label_printk(struct aa_label *label, gfp_t gfp);
struct aa_label *aa_label_strn_parse(struct aa_label *base, const char *str,
size_t n, gfp_t gfp, bool create,
bool force_stack);
struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
gfp_t gfp, bool create, bool force_stack);
static inline const char *aa_label_strn_split(const char *str, int n)
{ … }
static inline const char *aa_label_str_split(const char *str)
{ … }
struct aa_perms;
struct aa_ruleset;
int aa_label_match(struct aa_profile *profile, struct aa_ruleset *rules,
struct aa_label *label, aa_state_t state, bool subns,
u32 request, struct aa_perms *perms);
static inline struct aa_label *__aa_get_label(struct aa_label *l)
{ … }
static inline struct aa_label *aa_get_label(struct aa_label *l)
{ … }
static inline struct aa_label *aa_get_label_rcu(struct aa_label __rcu **l)
{ … }
static inline struct aa_label *aa_get_newest_label(struct aa_label *l)
{ … }
static inline void aa_put_label(struct aa_label *l)
{ … }
struct aa_proxy *aa_alloc_proxy(struct aa_label *l, gfp_t gfp);
void aa_proxy_kref(struct kref *kref);
static inline struct aa_proxy *aa_get_proxy(struct aa_proxy *proxy)
{ … }
static inline void aa_put_proxy(struct aa_proxy *proxy)
{ … }
void __aa_proxy_redirect(struct aa_label *orig, struct aa_label *new);
#endif