aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/bpf_struct_ops.c
diff options
context:
space:
mode:
authorKui-Feng Lee <thinker.li@gmail.com>2024-01-19 14:49:55 -0800
committerMartin KaFai Lau <martin.lau@kernel.org>2024-01-23 16:37:44 -0800
commite61995111a76633376419d1bccede8696e94e6e5 (patch)
tree9b9e91ce328a506687b11d4bb03c6f38f2b4657a /kernel/bpf/bpf_struct_ops.c
parentbpf, net: introduce bpf_struct_ops_desc. (diff)
downloadlinux-e61995111a76633376419d1bccede8696e94e6e5.tar.gz
linux-e61995111a76633376419d1bccede8696e94e6e5.zip
bpf: add struct_ops_tab to btf.
Maintain a registry of registered struct_ops types in the per-btf (module) struct_ops_tab. This registry allows for easy lookup of struct_ops types that are registered by a specific module. It is a preparation work for supporting kernel module struct_ops in a latter patch. Each struct_ops will be registered under its own kernel module btf and will be stored in the newly added btf->struct_ops_tab. The bpf verifier and bpf syscall (e.g. prog and map cmd) can find the struct_ops and its btf type/size/id... information from btf->struct_ops_tab. Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com> Link: https://lore.kernel.org/r/20240119225005.668602-5-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel/bpf/bpf_struct_ops.c')
0 files changed, 0 insertions, 0 deletions