#include <linux/bits.h>
#include <linux/bug.h>
#include <linux/compiler_types.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/lockdep.h>
#include <linux/overflow.h>
#include <linux/rbtree.h>
#include <linux/refcount.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include "limits.h"
#include "object.h"
#include "ruleset.h"
static struct landlock_ruleset *create_ruleset(const u32 num_layers)
{ … }
struct landlock_ruleset *
landlock_create_ruleset(const access_mask_t fs_access_mask,
const access_mask_t net_access_mask)
{ … }
static void build_check_rule(void)
{ … }
static bool is_object_pointer(const enum landlock_key_type key_type)
{ … }
static struct landlock_rule *
create_rule(const struct landlock_id id,
const struct landlock_layer (*const layers)[], const u32 num_layers,
const struct landlock_layer *const new_layer)
{ … }
static struct rb_root *get_root(struct landlock_ruleset *const ruleset,
const enum landlock_key_type key_type)
{ … }
static void free_rule(struct landlock_rule *const rule,
const enum landlock_key_type key_type)
{ … }
static void build_check_ruleset(void)
{ … }
static int insert_rule(struct landlock_ruleset *const ruleset,
const struct landlock_id id,
const struct landlock_layer (*const layers)[],
const size_t num_layers)
{ … }
static void build_check_layer(void)
{ … }
int landlock_insert_rule(struct landlock_ruleset *const ruleset,
const struct landlock_id id,
const access_mask_t access)
{ … }
static void get_hierarchy(struct landlock_hierarchy *const hierarchy)
{ … }
static void put_hierarchy(struct landlock_hierarchy *hierarchy)
{ … }
static int merge_tree(struct landlock_ruleset *const dst,
struct landlock_ruleset *const src,
const enum landlock_key_type key_type)
{ … }
static int merge_ruleset(struct landlock_ruleset *const dst,
struct landlock_ruleset *const src)
{ … }
static int inherit_tree(struct landlock_ruleset *const parent,
struct landlock_ruleset *const child,
const enum landlock_key_type key_type)
{ … }
static int inherit_ruleset(struct landlock_ruleset *const parent,
struct landlock_ruleset *const child)
{ … }
static void free_ruleset(struct landlock_ruleset *const ruleset)
{ … }
void landlock_put_ruleset(struct landlock_ruleset *const ruleset)
{ … }
static void free_ruleset_work(struct work_struct *const work)
{ … }
void landlock_put_ruleset_deferred(struct landlock_ruleset *const ruleset)
{ … }
struct landlock_ruleset *
landlock_merge_ruleset(struct landlock_ruleset *const parent,
struct landlock_ruleset *const ruleset)
{ … }
const struct landlock_rule *
landlock_find_rule(const struct landlock_ruleset *const ruleset,
const struct landlock_id id)
{ … }
bool landlock_unmask_layers(const struct landlock_rule *const rule,
const access_mask_t access_request,
layer_mask_t (*const layer_masks)[],
const size_t masks_array_size)
{ … }
get_access_mask_t;
access_mask_t
landlock_init_layer_masks(const struct landlock_ruleset *const domain,
const access_mask_t access_request,
layer_mask_t (*const layer_masks)[],
const enum landlock_key_type key_type)
{ … }