aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2018-03-24 14:44:22 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2018-03-26 03:58:17 -0400
commitb9193c1b61ddb97da4713155b0d580e41fb544ac (patch)
treea9da46bb95a9adff5379b41b79cb2012d99a374c
parent639a53da7c8cea7e476fed5e9ce6b1fa1bcce05a (diff)
bpf: Rename bpf_verifer_log
bpf_verifer_log => bpf_verifier_log Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--include/linux/bpf_verifier.h6
-rw-r--r--kernel/bpf/verifier.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index 6b66cd1aa0b9..c30668414b22 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -153,7 +153,7 @@ struct bpf_insn_aux_data {
153 153
154#define BPF_VERIFIER_TMP_LOG_SIZE 1024 154#define BPF_VERIFIER_TMP_LOG_SIZE 1024
155 155
156struct bpf_verifer_log { 156struct bpf_verifier_log {
157 u32 level; 157 u32 level;
158 char kbuf[BPF_VERIFIER_TMP_LOG_SIZE]; 158 char kbuf[BPF_VERIFIER_TMP_LOG_SIZE];
159 char __user *ubuf; 159 char __user *ubuf;
@@ -161,7 +161,7 @@ struct bpf_verifer_log {
161 u32 len_total; 161 u32 len_total;
162}; 162};
163 163
164static inline bool bpf_verifier_log_full(const struct bpf_verifer_log *log) 164static inline bool bpf_verifier_log_full(const struct bpf_verifier_log *log)
165{ 165{
166 return log->len_used >= log->len_total - 1; 166 return log->len_used >= log->len_total - 1;
167} 167}
@@ -185,7 +185,7 @@ struct bpf_verifier_env {
185 bool allow_ptr_leaks; 185 bool allow_ptr_leaks;
186 bool seen_direct_write; 186 bool seen_direct_write;
187 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */ 187 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
188 struct bpf_verifer_log log; 188 struct bpf_verifier_log log;
189 u32 subprog_starts[BPF_MAX_SUBPROGS]; 189 u32 subprog_starts[BPF_MAX_SUBPROGS];
190 /* computes the stack depth of each bpf function */ 190 /* computes the stack depth of each bpf function */
191 u16 subprog_stack_depth[BPF_MAX_SUBPROGS + 1]; 191 u16 subprog_stack_depth[BPF_MAX_SUBPROGS + 1];
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index e93a6e48641b..1e84e02ff733 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -171,7 +171,7 @@ static DEFINE_MUTEX(bpf_verifier_lock);
171static void log_write(struct bpf_verifier_env *env, const char *fmt, 171static void log_write(struct bpf_verifier_env *env, const char *fmt,
172 va_list args) 172 va_list args)
173{ 173{
174 struct bpf_verifer_log *log = &env->log; 174 struct bpf_verifier_log *log = &env->log;
175 unsigned int n; 175 unsigned int n;
176 176
177 if (!log->level || !log->ubuf || bpf_verifier_log_full(log)) 177 if (!log->level || !log->ubuf || bpf_verifier_log_full(log))
@@ -5611,7 +5611,7 @@ static void free_states(struct bpf_verifier_env *env)
5611int bpf_check(struct bpf_prog **prog, union bpf_attr *attr) 5611int bpf_check(struct bpf_prog **prog, union bpf_attr *attr)
5612{ 5612{
5613 struct bpf_verifier_env *env; 5613 struct bpf_verifier_env *env;
5614 struct bpf_verifer_log *log; 5614 struct bpf_verifier_log *log;
5615 int ret = -EINVAL; 5615 int ret = -EINVAL;
5616 5616
5617 /* no program is valid */ 5617 /* no program is valid */