On Thu, 3 Jul 2025 at 00:42, Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > When processing a load from a PTR_TO_BTF_ID, the verifier calculates > the type of the loaded structure field based on the load offset. > For example, given the following types: > > struct foo { > struct foo *a; > int *b; > } *p; > > The verifier would calculate the type of `p->a` as a pointer to > `struct foo`. However, the type of `p->b` is currently calculated as a > SCALAR_VALUE. > > This commit updates the logic for processing PTR_TO_BTF_ID to instead > calculate the type of p->b as PTR_TO_MEM|MEM_RDONLY|PTR_UNTRUSTED. > This change allows further dereferencing of such pointers (using probe > memory instructions). > > Suggested-by: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> > Signed-off-by: Eduard Zingerman <eddyz87@xxxxxxxxx> > --- Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > [...]