#include <uapi/linux/btf.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bpf.h>
#include <linux/bpf_verifier.h>
#include <linux/math64.h>
#include <linux/string.h>
#define verbose(env, fmt, args...) …
static bool bpf_verifier_log_attr_valid(const struct bpf_verifier_log *log)
{ … }
int bpf_vlog_init(struct bpf_verifier_log *log, u32 log_level,
char __user *log_buf, u32 log_size)
{ … }
static void bpf_vlog_update_len_max(struct bpf_verifier_log *log, u32 add_len)
{ … }
void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt,
va_list args)
{ … }
void bpf_vlog_reset(struct bpf_verifier_log *log, u64 new_pos)
{ … }
static void bpf_vlog_reverse_kbuf(char *buf, int len)
{ … }
static int bpf_vlog_reverse_ubuf(struct bpf_verifier_log *log, int start, int end)
{ … }
int bpf_vlog_finalize(struct bpf_verifier_log *log, u32 *log_size_actual)
{ … }
__printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env,
const char *fmt, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
__printf(2, 3) void bpf_log(struct bpf_verifier_log *log,
const char *fmt, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct bpf_line_info *
find_linfo(const struct bpf_verifier_env *env, u32 insn_off)
{ … }
static const char *ltrim(const char *s)
{ … }
__printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env,
u32 insn_off,
const char *prefix_fmt, ...)
{ … }
static const char *btf_type_name(const struct btf *btf, u32 id)
{ … }
const char *reg_type_str(struct bpf_verifier_env *env, enum bpf_reg_type type)
{ … }
const char *dynptr_type_str(enum bpf_dynptr_type type)
{ … }
const char *iter_type_str(const struct btf *btf, u32 btf_id)
{ … }
const char *iter_state_str(enum bpf_iter_state state)
{ … }
static char slot_type_char[] = …;
static void print_liveness(struct bpf_verifier_env *env,
enum bpf_reg_liveness live)
{ … }
#define UNUM_MAX_DECIMAL …
#define SNUM_MAX_DECIMAL …
#define SNUM_MIN_DECIMAL …
static bool is_unum_decimal(u64 num)
{ … }
static bool is_snum_decimal(s64 num)
{ … }
static void verbose_unum(struct bpf_verifier_env *env, u64 num)
{ … }
static void verbose_snum(struct bpf_verifier_env *env, s64 num)
{ … }
int tnum_strn(char *str, size_t size, struct tnum a)
{ … }
EXPORT_SYMBOL_GPL(…);
static void print_scalar_ranges(struct bpf_verifier_env *env,
const struct bpf_reg_state *reg,
const char **sep)
{ … }
static bool type_is_map_ptr(enum bpf_reg_type t) { … }
#define verbose_a(fmt, ...) …
static void print_reg_state(struct bpf_verifier_env *env,
const struct bpf_func_state *state,
const struct bpf_reg_state *reg)
{ … }
void print_verifier_state(struct bpf_verifier_env *env, const struct bpf_func_state *state,
bool print_all)
{ … }
static inline u32 vlog_alignment(u32 pos)
{ … }
void print_insn_state(struct bpf_verifier_env *env, const struct bpf_func_state *state)
{ … }