Skip to content

Commit 61bd521

Browse files
Jakub Kicinskidavem330
authored andcommitted
bpf: move global verifier log into verifier environment
The biggest piece of global state protected by the verifier lock is the verifier_log. Move that log to struct bpf_verifier_env. struct bpf_verifier_env has to be passed now to all invocations of verbose(). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e7bf824 commit 61bd521

2 files changed

Lines changed: 261 additions & 232 deletions

File tree

‎include/linux/bpf_verifier.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ struct bpf_verifier_env {
152152
bool allow_ptr_leaks;
153153
bool seen_direct_write;
154154
struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
155+
156+
struct bpf_verifer_log log;
155157
};
156158

157159
int bpf_analyzer(struct bpf_prog *prog, const struct bpf_ext_analyzer_ops *ops,

0 commit comments

Comments
 (0)