]> Git Repo - linux.git/commit
bpf: Add bpf_dynptr_read and bpf_dynptr_write
authorJoanne Koong <[email protected]>
Mon, 23 May 2022 21:07:10 +0000 (14:07 -0700)
committerAndrii Nakryiko <[email protected]>
Mon, 23 May 2022 21:31:28 +0000 (14:31 -0700)
commit13bbbfbea7598ea9f8d9c3d73bf053bb57f9c4b2
tree418774726bb3e4a88cd5ce4b75f5360e73d90b9f
parentbc34dee65a65e9c920c420005b8a43f2a721a458
bpf: Add bpf_dynptr_read and bpf_dynptr_write

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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
include/uapi/linux/bpf.h
kernel/bpf/helpers.c
tools/include/uapi/linux/bpf.h
This page took 0.046082 seconds and 4 git commands to generate.