diff options
| author | Martin KaFai Lau <kafai@fb.com> | 2018-05-23 00:57:20 +0300 | 
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-23 13:03:32 +0300 | 
| commit | aea2f7b8911617d7a8c23fb73d69e78764f91b58 (patch) | |
| tree | b9c8a3aac1e6211972a8f282dd045b08f999efb0 /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | 4ef5f5741e340d625e668f78d44eb8c9a6a4a26e (diff) | |
| download | linux-aea2f7b8911617d7a8c23fb73d69e78764f91b58.tar.xz | |
bpf: btf: Remove unused bits from uapi/linux/btf.h
This patch does the followings:
1. Limit BTF_MAX_TYPES and BTF_MAX_NAME_OFFSET to 64k.  We can
   raise it later.
2. Remove the BTF_TYPE_PARENT and BTF_STR_TBL_ELF_ID.  They are
   currently encoded at the highest bit of a u32.
   It is because the current use case does not require supporting
   parent type (i.e type_id referring to a type in another BTF file).
   It also does not support referring to a string in ELF.
   The BTF_TYPE_PARENT and BTF_STR_TBL_ELF_ID checks are replaced
   by BTF_TYPE_ID_CHECK and BTF_STR_OFFSET_CHECK which are
   defined in btf.c instead of uapi/linux/btf.h.
3. Limit the BTF_INFO_KIND from 5 bits to 4 bits which is enough.
   There is unused bits headroom if we ever needed it later.
4. The root bit in BTF_INFO is also removed because it is not
   used in the current use case.
5. Remove BTF_INT_VARARGS since func type is not supported now.
   The BTF_INT_ENCODING is limited to 4 bits instead of 8 bits.
The above can be added back later because the verifier
ensures the unused bits are zeros.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions
