Files
android_kernel_xiaomi_sm8450/include/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
..
2020-09-18 17:49:20 -07:00
2020-06-25 22:25:13 -07:00
2020-06-16 14:19:57 +02:00
2020-07-27 14:55:22 +01:00
2020-05-24 20:48:11 +02:00
2020-07-21 08:24:52 -05:00
2020-07-08 10:48:35 -07:00
2020-10-02 14:59:25 -07:00
2020-09-21 15:00:40 -07:00
2020-10-02 14:59:25 -07:00
2020-06-24 17:08:31 +02:00
2020-06-16 19:25:20 +02:00
2020-07-27 14:29:23 -04:00
2020-05-04 11:19:58 -07:00
2020-09-15 13:26:28 -07:00
2020-06-17 00:07:38 +02:00
2020-08-14 19:56:56 -07:00
2020-05-28 07:59:45 -07:00
2020-07-24 17:12:41 -07:00
2020-08-04 21:02:38 -04:00
2020-05-18 10:30:21 +01:00
2020-08-26 12:41:56 +02:00
2020-06-26 10:01:08 -06:00
2020-06-02 15:15:46 +01:00
2020-09-04 09:25:20 -07:00
2020-05-08 18:18:11 +01:00
2020-05-08 00:12:42 +02:00
2020-05-28 10:31:09 +02:00
2020-09-23 18:02:49 -07:00
2020-07-31 18:08:59 +10:00
2020-09-29 14:02:53 -07:00
2020-05-09 13:57:12 +02:00
2020-07-01 10:49:02 +02:00
2020-09-24 19:49:36 -07:00
2020-07-23 17:34:18 +10:00
2020-05-15 13:51:28 -07:00
2020-08-31 12:52:33 -07:00
2020-09-23 18:02:49 -07:00
2020-05-09 13:57:12 +02:00
2020-07-16 23:19:51 +02:00
2020-08-07 11:33:24 -07:00
2020-05-17 14:10:07 -06:00
2020-05-14 16:44:24 +02:00
2020-05-04 09:16:37 -07:00
2020-05-29 14:52:53 +02:00
2020-07-04 09:35:36 -05:00
2020-07-07 11:58:59 -05:00
2020-08-01 11:28:17 +02:00
2020-04-17 06:05:30 -04:00
2020-06-26 00:27:38 -07:00