bpf: validate value_type
authorKui-Feng Lee <thinker.li@gmail.com>
Fri, 19 Jan 2024 22:50:01 +0000 (14:50 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 24 Jan 2024 00:37:45 +0000 (16:37 -0800)
commit612d087d4ba54cef47946e22e5dabad762dd7ed5
tree7044e668fc1d4277daac80e05425caf566aedc02
parente3f87fdfed7b770dd7066b02262b12747881e76d
bpf: validate value_type

A value_type should consist of three components: refcnt, state, and data.
refcnt and state has been move to struct bpf_struct_ops_common_value to
make it easier to check the value type.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240119225005.668602-11-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
include/linux/bpf.h
kernel/bpf/bpf_struct_ops.c