]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: widen dynptr size/offset to 64 bit
authorMykyta Yatsenko <yatsenko@meta.com>
Sun, 26 Oct 2025 20:38:45 +0000 (20:38 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 27 Oct 2025 16:56:26 +0000 (09:56 -0700)
commit531b87d865eb9e625c2e46ec8f06a65a6157ee45
tree973feac88f87a33a11d225e8b411c37700ae1d2d
parenta61a257ff51c478e078f0bf8536371f0995e29f9
bpf: widen dynptr size/offset to 64 bit

Dynptr currently caps size and offset at 24 bits, which isn’t sufficient
for file-backed use cases; even 32 bits can be limiting. Refactor dynptr
helpers/kfuncs to use 64-bit size and offset, ensuring consistency
across the APIs.

This change does not affect internals of xdp, skb or other dynptrs,
which continue to behave as before. Also it does not break binary
compatibility.

The widening enables large-file access support via dynptr, implemented
in the next patches.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251026203853.135105-3-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/bpf_kfuncs.h
tools/testing/selftests/bpf/progs/dynptr_success.c