aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
diff options
context:
space:
mode:
authorKui-Feng Lee <thinker.li@gmail.com>2024-03-13 14:41:37 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-03-14 13:47:05 -0700
commitc911fc61a7ce367f9ea48e457f31bb171e80ca4d (patch)
tree80958ee01093375725f14731119423303eee93b0 /tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
parentlibbpf: Prevent null-pointer dereference when prog to load has no BTF (diff)
downloadlinux-c911fc61a7ce367f9ea48e457f31bb171e80ca4d.tar.gz
linux-c911fc61a7ce367f9ea48e457f31bb171e80ca4d.zip
libbpf: Skip zeroed or null fields if not found in the kernel type.
Accept additional fields of a struct_ops type with all zero values even if these fields are not in the corresponding type in the kernel. This provides a way to be backward compatible. User space programs can use the same map on a machine running an old kernel by clearing fields that do not exist in the kernel. Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240313214139.685112-2-thinker.li@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c')
0 files changed, 0 insertions, 0 deletions