summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/linker.c
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2022-06-06 23:26:36 -0700
committerAlexei Starovoitov <ast@kernel.org>2022-06-07 10:20:43 -0700
commitf2a625889bb8d153d277f557c929d43874561f10 (patch)
tree99f5cdd3421a3d03753bdb927e66317f7b6f6943 /tools/lib/bpf/linker.c
parentd90ec262b35bb6d30ae621dc15889638ba4c02be (diff)
downloadlinux-f2a625889bb8d153d277f557c929d43874561f10.tar.bz2
libbpf: Add enum64 sanitization
When old kernel does not support enum64 but user space btf contains non-zero enum kflag or enum64, libbpf needs to do proper sanitization so modified btf can be accepted by the kernel. Sanitization for enum kflag can be achieved by clearing the kflag bit. For enum64, the type is replaced with an union of integer member types and the integer member size must be smaller than enum64 size. If such an integer type cannot be found, a new type is created and used for union members. Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20220607062636.3721375-1-yhs@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/linker.c')
0 files changed, 0 insertions, 0 deletions