diff options
Diffstat (limited to 'include/linux/bpf_verifier.h')
| -rw-r--r-- | include/linux/bpf_verifier.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index c30668414b22..7e61c395fddf 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h | |||
| @@ -166,6 +166,11 @@ static inline bool bpf_verifier_log_full(const struct bpf_verifier_log *log) | |||
| 166 | return log->len_used >= log->len_total - 1; | 166 | return log->len_used >= log->len_total - 1; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | static inline bool bpf_verifier_log_needed(const struct bpf_verifier_log *log) | ||
| 170 | { | ||
| 171 | return log->level && log->ubuf && !bpf_verifier_log_full(log); | ||
| 172 | } | ||
| 173 | |||
| 169 | #define BPF_MAX_SUBPROGS 256 | 174 | #define BPF_MAX_SUBPROGS 256 |
| 170 | 175 | ||
| 171 | /* single container for all structs | 176 | /* single container for all structs |
| @@ -192,6 +197,8 @@ struct bpf_verifier_env { | |||
| 192 | u32 subprog_cnt; | 197 | u32 subprog_cnt; |
| 193 | }; | 198 | }; |
| 194 | 199 | ||
| 200 | void bpf_verifier_vlog(struct bpf_verifier_log *log, const char *fmt, | ||
| 201 | va_list args); | ||
| 195 | __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, | 202 | __printf(2, 3) void bpf_verifier_log_write(struct bpf_verifier_env *env, |
| 196 | const char *fmt, ...); | 203 | const char *fmt, ...); |
| 197 | 204 | ||
