bpf: Follow up on gen_epilogue
Martin KaFai Lau
reviewercover bpf: Follow up on gen_epilogue
From: Martin KaFai Lau <[email protected]>
The set addresses some follow ups on the earlier gen_epilogue patch set.
Martin KaFai Lau (2):
bpf: Remove the insn_buf array stack usage from the inline_bpf_loop()
bpf: Fix indentation issue in epilogue_idx
include/linux/bpf_verifier.h | 2 +- kernel/bpf/verifier.c | 85 ++++++++++++++++++------------------ 2 files changed, 44 insertions(+), 43 deletions(-)
Signature · 1 line
2.43.5
Martin KaFai Lau
reviewerPATCH 1/2 bpf: Remove the insn_buf array stack usage from the inline_bpf_loop()
From: Martin KaFai Lau <[email protected]>
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.
--- include/linux/bpf_verifier.h | 2 +- kernel/bpf/verifier.c | 83 ++++++++++++++++++------------------ 2 files changed, 43 insertions(+), 42 deletions(-)
include/linux/bpf_verifier.h +1 -1
@@ -24,7 +24,7 @@*/ #define TMP_STR_BUF_LEN 320/* Patch buffer size */ -#define INSN_BUF_SIZE 16 +#define INSN_BUF_SIZE 32/* Liveness marks, used for registers and spilled-regs (in stack slots). * Read marks propagate upwards until they find a write mark; they record that
kernel/bpf/verifier.c +42 -41
104 lines not on this page · raw message
Signature · 1 line
2.43.5
Martin KaFai Lau
reviewerPATCH 2/2 bpf: Fix indentation issue in epilogue_idx
In reply to Martin KaFai LauFrom: Martin KaFai Lau <[email protected]>
There is a report on new indentation issue in epilogue_idx. This patch fixed it.
--- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +1 -1
@@ -19800,7 +19800,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)* least one ctx ptr saving insn before the * epilogue. */ - epilogue_idx = i + delta; + epilogue_idx = i + delta; } goto patch_insn_buf; }else {
Signature · 1 line
2.43.5
Quoted 8 lines · Martin KaFai Lau
From: Martin KaFai Lau <[email protected]>
The set addresses some follow ups on the earlier
gen_epiloguepatch set.Martin KaFai Lau (2):
bpf: Remove theinsn_bufarray stack usage from theinline_bpf_loop()
bpf: Fix indentation issue inepilogue_idx
[...]
This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 10 lines · On Wed, 4 Sep 2024 11:08:43 -0700 you wrote:
From: Martin KaFai Lau <[email protected]>
The set addresses some follow ups on the earlier
gen_epiloguepatch set.Martin KaFai Lau (2):
bpf: Remove theinsn_bufarray stack usage from theinline_bpf_loop()
bpf: Fix indentation issue inepilogue_idx[...]
Here is the summary with links:
- [bpf-next,1/2] bpf: Remove the insn_buf array stack usage from the inline_bpf_loop()
https://git.kernel.org/bpf/bpf-next/c/940ce73bdec5 - [bpf-next,2/2] bpf: Fix indentation issue in epilogue_idx https://git.kernel.org/bpf/bpf-next/c/00750788dfc6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html