linux-stable/include
Yonghong Song b5ea834dde bpf: Support for new btf kind BTF_KIND_TAG
LLVM14 added support for a new C attribute ([1])
  __attribute__((btf_tag("arbitrary_str")))
This attribute will be emitted to dwarf ([2]) and pahole
will convert it to BTF. Or for bpf target, this
attribute will be emitted to BTF directly ([3], [4]).
The attribute is intended to provide additional
information for
  - struct/union type or struct/union member
  - static/global variables
  - static/global function or function parameter.

For linux kernel, the btf_tag can be applied
in various places to specify user pointer,
function pre- or post- condition, function
allow/deny in certain context, etc. Such information
will be encoded in vmlinux BTF and can be used
by verifier.

The btf_tag can also be applied to bpf programs
to help global verifiable functions, e.g.,
specifying preconditions, etc.

This patch added basic parsing and checking support
in kernel for new BTF_KIND_TAG kind.

 [1] https://reviews.llvm.org/D106614
 [2] https://reviews.llvm.org/D106621
 [3] https://reviews.llvm.org/D106622
 [4] https://reviews.llvm.org/D109560

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210914223015.245546-1-yhs@fb.com
2021-09-14 18:45:52 -07:00
..
acpi Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
asm-generic printk changes for 5.15 2021-09-01 18:41:13 -07:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-08-30 12:57:10 -07:00
drm
dt-bindings This is the bulk of pin control changes for the v5.15 kernel cycle, 2021-09-02 14:22:56 -07:00
keys
kunit
kvm
linux perf: Enable branch record for software events 2021-09-13 10:53:50 -07:00
math-emu
media
memory
misc
net Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-08-30 16:42:47 -07:00
pcmcia
ras
rdma Merge branch 'sg_nents' into rdma.git for-next 2021-08-30 09:49:59 -03:00
scsi
soc Merge branches 'clk-nvidia', 'clk-rockchip', 'clk-at91' and 'clk-vc5' into clk-next 2021-09-01 15:26:58 -07:00
sound ASoC: Updates for v5.15 2021-08-30 14:57:03 +02:00
target
trace Merge tag 'denywrite-for-5.15' of git://github.com/davidhildenbrand/linux 2021-09-04 11:35:47 -07:00
uapi bpf: Support for new btf kind BTF_KIND_TAG 2021-09-14 18:45:52 -07:00
vdso
video
xen