diff options
author | Kui-Feng Lee <thinker.li@gmail.com> | 2024-03-13 22:41:37 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-03-14 21:47:05 +0100 |
commit | c911fc61a7ce367f9ea48e457f31bb171e80ca4d (patch) | |
tree | 80958ee01093375725f14731119423303eee93b0 /tools/lib/str_error_r.c | |
parent | libbpf: Prevent null-pointer dereference when prog to load has no BTF (diff) | |
download | linux-c911fc61a7ce367f9ea48e457f31bb171e80ca4d.tar.xz 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/lib/str_error_r.c')
0 files changed, 0 insertions, 0 deletions