]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Reuse log from btf_prase_vmlinux() in btf_struct_ops_init()
authorMartin KaFai Lau <kafai@fb.com>
Mon, 27 Jan 2020 17:51:45 +0000 (09:51 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 Jan 2020 15:40:54 +0000 (16:40 +0100)
commit11769490bb2f19be0bd84f7d7073f24863737df8
tree4d98a7235279da2956f340bcdb08d78cb6bdb76f
parent6b39c9fe94f3e11fe1a5d6089cb9adc31d622b40
bpf: Reuse log from btf_prase_vmlinux() in btf_struct_ops_init()

Instead of using a locally defined "struct bpf_verifier_log log = {}",
btf_struct_ops_init() should reuse the "log" from its calling
function "btf_parse_vmlinux()".  It should also resolve the
frame-size too large compiler warning in some ARCH.

Fixes: 980745d3303c ("bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200127175145.1154438-1-kafai@fb.com
include/linux/bpf.h
kernel/bpf/bpf_struct_ops.c
kernel/bpf/btf.c