Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes: > Add a new bpf_dynptr_from_mem_slice kfunc to create a dynptr from a > PTR_TO_BTF_ID exposing a variable-length slice of memory, represented by > the new bpf_mem_slice type. This slice is read-only, for a read-write > slice we can expose a distinct type in the future. > > We rely on the previous commits ensuring source objects underpinning > dynptr memory are tracked correctly for invalidation to ensure when a > PTR_TO_BTF_ID holding a memory slice goes away, it's corresponding > dynptrs get invalidated. > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> If I remove KF_TRUSTED_ARGS flag from the function nothing fails. But that's because with current interface slices will always have a ref_obj_id, right? And pointers with ref_obj_id are always trusted. Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx> [...]