diff options
| author | Alexei Starovoitov <[email protected]> | 2023-03-13 23:58:44 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2023-03-14 06:08:21 +0000 |
| commit | 3e30be4288b31702d4898487a74e80ba14150a9f (patch) | |
| tree | 252cdcdb69d17ef0043c7f59882393bdf689817a /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | |
| parent | bpf: Fix bpf_strncmp proto. (diff) | |
| download | kernel-3e30be4288b31702d4898487a74e80ba14150a9f.tar.gz kernel-3e30be4288b31702d4898487a74e80ba14150a9f.zip | |
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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: David Vernet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions
