linux-xiaomi-chiron/tools/include/uapi/linux
Hao Luo 4976b718c3 bpf: Introduce pseudo_btf_id
Pseudo_btf_id is a type of ld_imm insn that associates a btf_id to a
ksym so that further dereferences on the ksym can use the BTF info
to validate accesses. Internally, when seeing a pseudo_btf_id ld insn,
the verifier reads the btf_id stored in the insn[0]'s imm field and
marks the dst_reg as PTR_TO_BTF_ID. The btf_id points to a VAR_KIND,
which is encoded in btf_vminux by pahole. If the VAR is not of a struct
type, the dst reg will be marked as PTR_TO_MEM instead of PTR_TO_BTF_ID
and the mem_size is resolved to the size of the VAR's type.

>From the VAR btf_id, the verifier can also read the address of the
ksym's corresponding kernel var from kallsyms and use that to fill
dst_reg.

Therefore, the proper functionality of pseudo_btf_id depends on (1)
kallsyms and (2) the encoding of kernel global VARs in pahole, which
should be available since pahole v1.18.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200929235049.2533242-2-haoluo@google.com
2020-10-02 14:59:25 -07:00
..
tc_act
bpf.h bpf: Introduce pseudo_btf_id 2020-10-02 14:59:25 -07:00
bpf_common.h
bpf_perf_event.h
btf.h
const.h
erspan.h
ethtool.h
fadvise.h
fcntl.h
filter.h
fs.h
fscrypt.h
hw_breakpoint.h
if_link.h
if_tun.h
if_xdp.h
in.h tools headers UAPI: update linux/in.h copy 2020-09-14 19:06:41 -03:00
kcmp.h
kvm.h tools headers UAPI: Sync kvm.h headers with the kernel sources 2020-09-14 19:02:18 -03:00
lirc.h
mman.h
mount.h
netlink.h
openat2.h
perf_event.h perf tools: Correct SNOOPX field offset 2020-09-01 12:19:16 -03:00
pkt_cls.h
pkt_sched.h
prctl.h
sched.h
seg6.h
seg6_local.h
stat.h
tls.h
types.h
usbdevice_fs.h
vhost.h tools include UAPI: Sync linux/vhost.h with the kernel sources 2020-08-12 08:57:07 -03:00