#include <linux/unaligned.h>
#include <kunit/visibility.h>
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/zstd.h>
#include "include/apparmor.h"
#include "include/audit.h"
#include "include/cred.h"
#include "include/crypto.h"
#include "include/file.h"
#include "include/match.h"
#include "include/path.h"
#include "include/policy.h"
#include "include/policy_unpack.h"
#include "include/policy_compat.h"
static void audit_cb(struct audit_buffer *ab, void *va)
{ … }
static int audit_iface(struct aa_profile *new, const char *ns_name,
const char *name, const char *info, struct aa_ext *e,
int error)
{ … }
void __aa_loaddata_update(struct aa_loaddata *data, long revision)
{ … }
bool aa_rawdata_eq(struct aa_loaddata *l, struct aa_loaddata *r)
{ … }
static void do_loaddata_free(struct work_struct *work)
{ … }
void aa_loaddata_kref(struct kref *kref)
{ … }
struct aa_loaddata *aa_loaddata_alloc(size_t size)
{ … }
VISIBLE_IF_KUNIT bool aa_inbounds(struct aa_ext *e, size_t size)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT size_t aa_unpack_u16_chunk(struct aa_ext *e, char **chunk)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT bool aa_unpack_X(struct aa_ext *e, enum aa_code code)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT bool aa_unpack_nameX(struct aa_ext *e, enum aa_code code, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
static bool unpack_u8(struct aa_ext *e, u8 *data, const char *name)
{ … }
VISIBLE_IF_KUNIT bool aa_unpack_u32(struct aa_ext *e, u32 *data, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT bool aa_unpack_u64(struct aa_ext *e, u64 *data, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
static bool aa_unpack_cap_low(struct aa_ext *e, kernel_cap_t *data, const char *name)
{ … }
static bool aa_unpack_cap_high(struct aa_ext *e, kernel_cap_t *data, const char *name)
{ … }
VISIBLE_IF_KUNIT bool aa_unpack_array(struct aa_ext *e, const char *name, u16 *size)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT size_t aa_unpack_blob(struct aa_ext *e, char **blob, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT int aa_unpack_str(struct aa_ext *e, const char **string, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
VISIBLE_IF_KUNIT int aa_unpack_strdup(struct aa_ext *e, char **string, const char *name)
{ … }
EXPORT_SYMBOL_IF_KUNIT(…);
static struct aa_dfa *unpack_dfa(struct aa_ext *e, int flags)
{ … }
static bool unpack_trans_table(struct aa_ext *e, struct aa_str_table *strs)
{ … }
static bool unpack_xattrs(struct aa_ext *e, struct aa_profile *profile)
{ … }
static bool unpack_secmark(struct aa_ext *e, struct aa_ruleset *rules)
{ … }
static bool unpack_rlimits(struct aa_ext *e, struct aa_ruleset *rules)
{ … }
static bool unpack_perm(struct aa_ext *e, u32 version, struct aa_perms *perm)
{ … }
static ssize_t unpack_perms_table(struct aa_ext *e, struct aa_perms **perms)
{ … }
static int unpack_pdb(struct aa_ext *e, struct aa_policydb **policy,
bool required_dfa, bool required_trans,
const char **info)
{ … }
static u32 strhash(const void *data, u32 len, u32 seed)
{ … }
static int datacmp(struct rhashtable_compare_arg *arg, const void *obj)
{ … }
static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
{ … }
static int verify_header(struct aa_ext *e, int required, const char **ns)
{ … }
static bool verify_dfa_accept_index(struct aa_dfa *dfa, int table_size)
{ … }
static bool verify_perm(struct aa_perms *perm)
{ … }
static bool verify_perms(struct aa_policydb *pdb)
{ … }
static int verify_profile(struct aa_profile *profile)
{ … }
void aa_load_ent_free(struct aa_load_ent *ent)
{ … }
struct aa_load_ent *aa_load_ent_alloc(void)
{ … }
static int compress_zstd(const char *src, size_t slen, char **dst, size_t *dlen)
{ … }
static int compress_loaddata(struct aa_loaddata *data)
{ … }
int aa_unpack(struct aa_loaddata *udata, struct list_head *lh,
const char **ns)
{ … }