linux/kernel/bpf/token.c

#include <linux/bpf.h>
#include <linux/vmalloc.h>
#include <linux/fdtable.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/idr.h>
#include <linux/namei.h>
#include <linux/user_namespace.h>
#include <linux/security.h>

static bool bpf_ns_capable(struct user_namespace *ns, int cap)
{}

bool bpf_token_capable(const struct bpf_token *token, int cap)
{}

void bpf_token_inc(struct bpf_token *token)
{}

static void bpf_token_free(struct bpf_token *token)
{}

static void bpf_token_put_deferred(struct work_struct *work)
{}

void bpf_token_put(struct bpf_token *token)
{}

static int bpf_token_release(struct inode *inode, struct file *filp)
{}

static void bpf_token_show_fdinfo(struct seq_file *m, struct file *filp)
{}

#define BPF_TOKEN_INODE_NAME

static const struct inode_operations bpf_token_iops =;

static const struct file_operations bpf_token_fops =;

int bpf_token_create(union bpf_attr *attr)
{}

struct bpf_token *bpf_token_get_from_fd(u32 ufd)
{}

bool bpf_token_allow_cmd(const struct bpf_token *token, enum bpf_cmd cmd)
{}

bool bpf_token_allow_map_type(const struct bpf_token *token, enum bpf_map_type type)
{}

bool bpf_token_allow_prog_type(const struct bpf_token *token,
			       enum bpf_prog_type prog_type,
			       enum bpf_attach_type attach_type)
{}