On Mon, 21 Oct 2024 at 17:28, Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > > Add a MEM_WRITE attribute for BPF helper functions which can be used in > bpf_func_proto to annotate an argument type in order to let the verifier > know that the helper writes into the memory passed as an argument. In > the past MEM_UNINIT has been (ab)used for this function, but the latter > merely tells the verifier that the passed memory can be uninitialized. > > There have been bugs with overloading the latter but aside from that > there are also cases where the passed memory is read + written which > currently cannot be expressed, see also 4b3786a6c539 ("bpf: Zero former > ARG_PTR_TO_{LONG,INT} args in case of error"). > > Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > --- Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>