bpf: Add support for bpf_rb_root and bpf_rb_node in kfunc args
authorDave Marchevsky <davemarchevsky@fb.com>
Tue, 14 Feb 2023 00:40:12 +0000 (16:40 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Feb 2023 03:40:53 +0000 (19:40 -0800)
commitcd6791b4b6f66f6b7925c840efe5c8fa0ce1ac87
treece5753a5195c7edf7ae6e325b6940172996961ca
parentbd1279ae8a691d7ec75852c6d0a22139afb034a4
bpf: Add support for bpf_rb_root and bpf_rb_node in kfunc args

Now that we find bpf_rb_root and bpf_rb_node in structs, let's give args
that contain those types special classification and properly handle
these types when checking kfunc args.

"Properly handling" these types largely requires generalizing similar
handling for bpf_list_{head,node}, with little new logic added in this
patch.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/r/20230214004017.2534011-4-davemarchevsky@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c