diff options
| author | Jakub Sitnicki <[email protected]> | 2022-01-30 11:55:18 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-01-31 20:39:12 +0000 |
| commit | 8f50f16ff39dd4e2d43d1548ca66925652f8aff7 (patch) | |
| tree | 7dd90826ccc6a7f26688e8f790140ff96e6b43ea /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
| parent | bpf: Make dst_port field in struct bpf_sock 16-bit wide (diff) | |
| download | kernel-8f50f16ff39dd4e2d43d1548ca66925652f8aff7.tar.gz kernel-8f50f16ff39dd4e2d43d1548ca66925652f8aff7.zip | |
selftests/bpf: Extend verifier and bpf_sock tests for dst_port loads
Add coverage to the verifier tests and tests for reading bpf_sock fields to
ensure that 32-bit, 16-bit, and 8-bit loads from dst_port field are allowed
only at intended offsets and produce expected values.
While 16-bit and 8-bit access to dst_port field is straight-forward, 32-bit
wide loads need be allowed and produce a zero-padded 16-bit value for
backward compatibility.
Signed-off-by: Jakub Sitnicki <[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/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions
