diff options
author | Martin KaFai Lau <martin.lau@kernel.org> | 2024-08-29 14:08:23 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-29 18:15:44 -0700 |
commit | 6f606ffd6dd7583d8194ee3d858ba4da2eff26a3 (patch) | |
tree | 15ee846fad685ad7723b7889332bf003973c2b37 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | c6d9dafb595564ae44ef2e25e3ace2973aa867f3 (diff) |
bpf: Move insn_buf[16] to bpf_verifier_env
This patch moves the 'struct bpf_insn insn_buf[16]' stack usage
to the bpf_verifier_env. A '#define INSN_BUF_SIZE 16' is also added
to replace the ARRAY_SIZE(insn_buf) usages.
Both convert_ctx_accesses() and do_misc_fixup() are changed
to use the env->insn_buf.
It is a refactoring work for adding the epilogue_buf[16] in a later patch.
With this patch, the stack size usage decreased.
Before:
./kernel/bpf/verifier.c:22133:5: warning: stack frame size (2584)
After:
./kernel/bpf/verifier.c:22184:5: warning: stack frame size (2264)
Reviewed-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240829210833.388152-2-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions