diff options
| author | Andrii Nakryiko <[email protected]> | 2021-11-24 00:23:21 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-11-25 23:15:03 +0000 |
| commit | 6c4dedb7550aafd094f7d803668fd039545f4e57 (patch) | |
| tree | 2a5f9f8563653a395493c79da90286b50a129917 /tools/testing/selftests/bpf/prog_tests/queue_stack_map.c | |
| parent | selftests/bpf: Fix possible NULL passed to memcpy() with zero size (diff) | |
| download | kernel-6c4dedb7550aafd094f7d803668fd039545f4e57.tar.gz kernel-6c4dedb7550aafd094f7d803668fd039545f4e57.zip | |
selftests/bpf: Prevent misaligned memory access in get_stack_raw_tp test
Perfbuf doesn't guarantee 8-byte alignment of the data like BPF ringbuf
does, so struct get_stack_trace_t can arrive not properly aligned for
subsequent u64 accesses. Easiest fix is to just copy data locally.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/queue_stack_map.c')
0 files changed, 0 insertions, 0 deletions
