Skip to content
Commit 8addbfc7 authored by Kumar Kartikeya Dwivedi's avatar Kumar Kartikeya Dwivedi Committed by Alexei Starovoitov
Browse files

bpf: Gate dynptr API behind CAP_BPF



This has been enabled for unprivileged programs for only one kernel
release, hence the expected annoyances due to this move are low. Users
using ringbuf can stick to non-dynptr APIs. The actual use cases dynptr
is meant to serve may not make sense in unprivileged BPF programs.

Hence, gate these helpers behind CAP_BPF and limit use to privileged
BPF programs.

Fixes: 263ae152 ("bpf: Add bpf_dynptr_from_mem for local dynptrs")
Fixes: bc34dee6 ("bpf: Dynptr support for ring buffers")
Fixes: 13bbbfbe ("bpf: Add bpf_dynptr_read and bpf_dynptr_write")
Fixes: 34d4ef57 ("bpf: Add dynptr data slices")
Signed-off-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220921143550.30247-1-memxor@gmail.com


Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent d703256f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment