diff options
| author | Benjamin Tissoires <[email protected]> | 2022-09-06 15:12:59 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-09-07 18:03:44 +0000 |
| commit | 15baa55ff5b00b81bcd9874b89cb8e0b0daaa13d (patch) | |
| tree | de84b7fd33c63411952073682cdb27bcd3ac9829 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | |
| parent | bpf: split btf_check_subprog_arg_match in two (diff) | |
| download | kernel-15baa55ff5b00b81bcd9874b89cb8e0b0daaa13d.tar.gz kernel-15baa55ff5b00b81bcd9874b89cb8e0b0daaa13d.zip | |
bpf/verifier: allow all functions to read user provided context
When a function was trying to access data from context in a syscall eBPF
program, the verifier was rejecting the call unless it was accessing the
first element.
This is because the syscall context is not known at compile time, and
so we need to check this when actually accessing it.
Check for the valid memory access if there is no convert_ctx callback,
and allow such situation to happen.
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions
