On Tue, Dec 19, 2023 at 11:08 AM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > > I don't know if variable-sized BTF access is important (Alexei?, > Martin?), but maybe BTF access has to be checked separately and then > we can keep the check that does pure dump memory access checks simply > and correctly? Walking structs with BTF is certainly special and variable size BTF is necessary to access flex arrays at the end of structs. iirc we have a test case for it. On todo list we had a task to implement variable access to different array elements (while preserving BTF types).