bpf: Document UAPI details for special BPF types
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 3 Nov 2022 19:09:50 +0000 (00:39 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Nov 2022 02:31:13 +0000 (19:31 -0700)
commit9805af8d8a5b17f9ea0a16f636f3440b970049f3
treef60bd3d92e1b6f3475def11c4ae9d2a265948d95
parent07ec7b502800ba9f7b8b15cb01dd6556bb41aaca
bpf: Document UAPI details for special BPF types

The kernel recognizes some special BPF types in map values or local
kptrs. Document that only bpf_spin_lock and bpf_timer will preserve
backwards compatibility, and kptr will preserve backwards compatibility
for the operations on the pointer, not the types supported for such
kptrs.

For local kptrs, document that there are no stability guarantees at all.

Finally, document that 'bpf_' namespace is reserved for adding future
special fields, hence BPF programs must not declare types with such
names in their programs and still expect backwards compatibility.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20221103191013.1236066-2-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/bpf_design_QA.rst