Commit b9193c1b authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by Daniel Borkmann

bpf: Rename bpf_verifer_log

bpf_verifer_log =>
bpf_verifier_log
Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
Acked-by: default avatarAlexei Starovoitov <ast@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 639a53da
...@@ -153,7 +153,7 @@ struct bpf_insn_aux_data { ...@@ -153,7 +153,7 @@ struct bpf_insn_aux_data {
#define BPF_VERIFIER_TMP_LOG_SIZE 1024 #define BPF_VERIFIER_TMP_LOG_SIZE 1024
struct bpf_verifer_log { struct bpf_verifier_log {
u32 level; u32 level;
char kbuf[BPF_VERIFIER_TMP_LOG_SIZE]; char kbuf[BPF_VERIFIER_TMP_LOG_SIZE];
char __user *ubuf; char __user *ubuf;
...@@ -161,7 +161,7 @@ struct bpf_verifer_log { ...@@ -161,7 +161,7 @@ struct bpf_verifer_log {
u32 len_total; u32 len_total;
}; };
static inline bool bpf_verifier_log_full(const struct bpf_verifer_log *log) static inline bool bpf_verifier_log_full(const struct bpf_verifier_log *log)
{ {
return log->len_used >= log->len_total - 1; return log->len_used >= log->len_total - 1;
} }
...@@ -185,7 +185,7 @@ struct bpf_verifier_env { ...@@ -185,7 +185,7 @@ struct bpf_verifier_env {
bool allow_ptr_leaks; bool allow_ptr_leaks;
bool seen_direct_write; bool seen_direct_write;
struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */ struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
struct bpf_verifer_log log; struct bpf_verifier_log log;
u32 subprog_starts[BPF_MAX_SUBPROGS]; u32 subprog_starts[BPF_MAX_SUBPROGS];
/* computes the stack depth of each bpf function */ /* computes the stack depth of each bpf function */
u16 subprog_stack_depth[BPF_MAX_SUBPROGS + 1]; u16 subprog_stack_depth[BPF_MAX_SUBPROGS + 1];
......
...@@ -171,7 +171,7 @@ static DEFINE_MUTEX(bpf_verifier_lock); ...@@ -171,7 +171,7 @@ static DEFINE_MUTEX(bpf_verifier_lock);
static void log_write(struct bpf_verifier_env *env, const char *fmt, static void log_write(struct bpf_verifier_env *env, const char *fmt,
va_list args) va_list args)
{ {
struct bpf_verifer_log *log = &env->log; struct bpf_verifier_log *log = &env->log;
unsigned int n; unsigned int n;
if (!log->level || !log->ubuf || bpf_verifier_log_full(log)) if (!log->level || !log->ubuf || bpf_verifier_log_full(log))
...@@ -5611,7 +5611,7 @@ static void free_states(struct bpf_verifier_env *env) ...@@ -5611,7 +5611,7 @@ static void free_states(struct bpf_verifier_env *env)
int bpf_check(struct bpf_prog **prog, union bpf_attr *attr) int bpf_check(struct bpf_prog **prog, union bpf_attr *attr)
{ {
struct bpf_verifier_env *env; struct bpf_verifier_env *env;
struct bpf_verifer_log *log; struct bpf_verifier_log *log;
int ret = -EINVAL; int ret = -EINVAL;
/* no program is valid */ /* no program is valid */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment