On Mon, May 9, 2022 at 3:44 PM Joanne Koong <joannelkoong@xxxxxxxxx> wrote: > > This patch adds two helper functions, bpf_dynptr_read and > bpf_dynptr_write: > > long bpf_dynptr_read(void *dst, u32 len, struct bpf_dynptr *src, u32 offset); > > long bpf_dynptr_write(struct bpf_dynptr *dst, u32 offset, void *src, u32 len); > > The dynptr passed into these functions must be valid dynptrs that have > been initialized. > > Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx> > --- LGTM Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > include/linux/bpf.h | 16 ++++++++++ > include/uapi/linux/bpf.h | 19 ++++++++++++ > kernel/bpf/helpers.c | 56 ++++++++++++++++++++++++++++++++++ > tools/include/uapi/linux/bpf.h | 19 ++++++++++++ > 4 files changed, 110 insertions(+) > [...]