diff options
| author | Alexei Starovoitov <[email protected]> | 2023-03-13 16:58:44 -0700 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2023-03-13 23:08:21 -0700 |
| commit | 3e30be4288b31702d4898487a74e80ba14150a9f (patch) | |
| tree | 252cdcdb69d17ef0043c7f59882393bdf689817a /include/linux/debugobjects.h | |
| parent | c9267aa8b794c2188d49c7d7bd2990e98b2d6b84 (diff) | |
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 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions