Re: [PATCH bpf-next v1 07/13] bpf: Fix partial dynptr stack slot reads/writes

Joanne Koong
2022-10-21T22:57:17Z

[...]
>
> > + /* raw_mode may write past allocated_stack */
> > + if (state->allocated_stack <= slot)
> > + continue;
>
> break?

nvm, i think this should stay "continue".

>
> > + if (state->stack[spi].slot_type[slot % BPF_REG_SIZE] == STACK_DYNPTR) {
> > + verbose(env, "potential write to dynptr at off=%d disallowed\n", i);
> > + return -EACCES;
> > + }
> > + }
> > meta->access_size = access_size;
> > meta->regno = regno;
> > return 0;
> > --
> > 2.38.0
> >