aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJoanne Koong <[email protected]>2022-05-23 21:07:11 +0000
committerAndrii Nakryiko <[email protected]>2022-05-23 21:31:28 +0000
commit34d4ef5775f776ec4b0d53a02d588bf3195cada6 (patch)
tree4d71bdf2f9ea5fafa45995ae59d4893eebd1c26c /net/unix/af_unix.c
parentbpf: Add bpf_dynptr_read and bpf_dynptr_write (diff)
downloadkernel-34d4ef5775f776ec4b0d53a02d588bf3195cada6.tar.gz
kernel-34d4ef5775f776ec4b0d53a02d588bf3195cada6.zip
bpf: Add dynptr data slices
This patch adds a new helper function void *bpf_dynptr_data(struct bpf_dynptr *ptr, u32 offset, u32 len); which returns a pointer to the underlying data of a dynptr. *len* must be a statically known value. The bpf program may access the returned data slice as a normal buffer (eg can do direct reads and writes), since the verifier associates the length with the returned pointer, and enforces that no out of bounds accesses occur. Signed-off-by: Joanne Koong <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions