On Mon, May 09, 2022 at 03:42:52PM -0700, Joanne Koong wrote: > Instead of having uninitialized versions of arguments as separate > bpf_arg_types (eg ARG_PTR_TO_UNINIT_MEM as the uninitialized version > of ARG_PTR_TO_MEM), we can instead use MEM_UNINIT as a bpf_type_flag > modifier to denote that the argument is uninitialized. > > Doing so cleans up some of the logic in the verifier. We no longer > need to do two checks against an argument type (eg "if > (base_type(arg_type) == ARG_PTR_TO_MEM || base_type(arg_type) == > ARG_PTR_TO_UNINIT_MEM)"), since uninitialized and initialized > versions of the same argument type will now share the same base type. > > In the near future, MEM_UNINIT will be used by dynptr helper functions > as well. > > Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx> > Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Looks great, thanks. Acked-by: David Vernet <void@xxxxxxxxxxxxx>