Re: [PATCH bpf-next 2/7] bpf: support non-r10 register spill/fill to/from stack in precision tracking

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

 



On Sat, 2023-11-11 at 17:57 -0800, Andrii Nakryiko wrote:
[...]
> I ended up with these changes on top of this patch:
> 
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 23dbfb5022ba..d234c6f53741 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -3167,6 +3167,21 @@ static int check_reg_arg(struct
> bpf_verifier_env *env, u32 regno,
>         return 0;
>  }
> 
> +static int insn_stack_access_flags(int frameno, int spi)
> +{
> +       return INSN_F_STACK_ACCESS | (spi << INSN_F_SPI_SHIFT) | frameno;
> +}
> +
> +static int insn_stack_access_spi(int insn_flags)
> +{
> +       return (insn_flags >> INSN_F_SPI_SHIFT) & INSN_F_SPI_MASK;
> +}
> +
> +static int insn_stack_access_frameno(int insn_flags)
> +{
> +       return insn_flags & INSN_F_FRAMENO_MASK;
> +}

Looks good, thank you.





[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