]> git.hungrycats.org Git - linux/commit
bpf: Remove the insn_buf array stack usage from the inline_bpf_loop()
authorMartin KaFai Lau <martin.lau@kernel.org>
Wed, 4 Sep 2024 18:08:44 +0000 (11:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Sep 2024 19:45:18 +0000 (12:45 -0700)
commit940ce73bdec5a020fec058ba947d2bf627462c53
tree6abea0014b65820afca61b3af6ae3d1ea6a842f5
parent46f4ea04e053e5dd01459bfbbd8e905a4ccd4190
bpf: Remove the insn_buf array stack usage from the inline_bpf_loop()

This patch removes the insn_buf array stack usage from the
inline_bpf_loop(). Instead, the env->insn_buf is used. The
usage in inline_bpf_loop() needs more than 16 insn, so the
INSN_BUF_SIZE needs to be increased from 16 to 32.
The compiler stack size warning on the verifier is gone
after this change.

Cc: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240904180847.56947-2-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf_verifier.h
kernel/bpf/verifier.c