Re: [PATCH v4 bpf-next 1/9] bpf: Move insn_buf[16] to bpf_verifier_env

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2024-08-27 at 12:48 -0700, Martin KaFai Lau wrote:
> From: Martin KaFai Lau <martin.lau@xxxxxxxxxx>
> 
> 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 prep work for adding the epilogue_buf[16] in a later patch.
> 
> Signed-off-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>
> ---

Not sure if this refactoring is worth it but code looks correct.
Note that there is also inline_bpf_loop()
(it needs a slightly bigger buffer).

Reviewed-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

[...]






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux