bpf: Add __uninit kfunc annotation
authorJoanne Koong <joannelkoong@gmail.com>
Wed, 1 Mar 2023 15:49:49 +0000 (07:49 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 1 Mar 2023 17:55:24 +0000 (09:55 -0800)
commitd96d937d7c5c12237dce1f14bf0fc9900cabba09
tree2634e81ebcecc4fc0ab86291f6f561f709c3452e
parent485ec51ef9764c0f67d35cabba0a963936b9126e
bpf: Add __uninit kfunc annotation

This patch adds __uninit as a kfunc annotation.

This will be useful for scenarios such as for example in dynptrs,
indicating whether the dynptr should be checked by the verifier as an
initialized or an uninitialized dynptr.

Without this annotation, the alternative would be needing to hard-code
in the verifier the specific kfunc to indicate that arg should be
treated as an uninitialized arg.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://lore.kernel.org/r/20230301154953.641654-7-joannelkoong@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/kfuncs.rst
kernel/bpf/verifier.c