]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h
authorMartin KaFai Lau <kafai@fb.com>
Fri, 20 Jul 2018 05:14:31 +0000 (22:14 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 20 Jul 2018 08:25:48 +0000 (10:25 +0200)
commit36fc3c8c282c01ad1570bd864de52f128d731b75
tree3ae71065624e4b4321f13045b6ad2f16f612792f
parent759b94a00a207ef605f3fd6f6e99570799688145
bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h

This patch shrinks the BTF_INT_BITS() mask.  The current
btf_int_check_meta() ensures the nr_bits of an integer
cannot exceed 64.  Hence, it is mostly an uapi cleanup.

The actual btf usage (i.e. seq_show()) is also modified
to use u8 instead of u16.  The verification (e.g. btf_int_check_meta())
path stays as is to deal with invalid BTF situation.

Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/uapi/linux/btf.h
kernel/bpf/btf.c