Files
linux/kernel/bpf
Alexei Starovoitov 3e30be4288 bpf: Allow helpers access trusted PTR_TO_BTF_ID.
The verifier rejects the code:
  bpf_strncmp(task->comm, 16, "my_task");
with the message:
  16: (85) call bpf_strncmp#182
  R1 type=trusted_ptr_ expected=fp, pkt, pkt_meta, map_key, map_value, mem, ringbuf_mem, buf

Teach the verifier that such access pattern is safe.
Do not allow untrusted and legacy ptr_to_btf_id to be passed into helpers.

Reported-by: David Vernet <void@manifault.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20230313235845.61029-3-alexei.starovoitov@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-03-13 23:08:21 -07:00
..
2023-03-07 09:33:42 -08:00
2023-03-07 09:33:42 -08:00
2023-03-08 16:19:51 -08:00
2023-02-22 09:52:32 -08:00
2023-03-07 09:33:42 -08:00
2023-03-07 09:33:42 -08:00
2023-03-07 09:33:42 -08:00
2023-03-13 23:08:21 -07:00
2022-05-10 11:20:45 -07:00
2023-03-07 09:33:42 -08:00
2020-08-28 15:41:30 +02:00
2021-12-18 13:27:41 -08:00
2023-03-07 09:33:43 -08:00
2023-03-07 09:33:42 -08:00
2023-03-07 09:33:42 -08:00