Re: [PATCH bpf-next 1/2] bpf: Introduce bpf_can_loop() kfunc

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

 



On Tue, 2024-02-27 at 22:30 -0800, Alexei Starovoitov wrote:
[...]

> > > I meant that this helper can peek spi from R1 just like code in
> > > is_state_visited() does currently. Forgoing the 'meta' completely.
> > 
> > I see.
> > You mean removing:
> >                 meta->iter.spi = spi;
> >                 meta->iter.frameno = reg->frameno;
> > from process_iter_arg() and
> > 'meta' arg from process_iter_next_call() as well then ?
> 
> Ed,
> 
> That was a bad idea.
> I tried what you suggested with
> static struct bpf_reg_state *get_iter_reg(struct bpf_verifier_env *env,
>                                           struct bpf_verifier_state
> *st, int insn_idx)
> 
> and implemented in v2.
> It's buggy as can be seen in CI (I sloppy tested it before sending it
> yesterday).
> I'm going to go back to v1 approach.
> process_iter_next_call() _has_ to use meta,
> since caller saved regs already cleared by the time it's called.
> And doing fake 'meta' in is_state_visited() is not a good idea.
> It took me a few hours to debug this :(

Well, that is unfortunate, sorry about that.





[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