]> Git Repo - linux.git/commit
selftests/bpf: Fix test_core_autosize on big-endian machines
authorIlya Leoshkevich <[email protected]>
Thu, 12 Aug 2021 22:48:14 +0000 (00:48 +0200)
committerAndrii Nakryiko <[email protected]>
Fri, 13 Aug 2021 23:40:40 +0000 (16:40 -0700)
commitd164dd9a5c08c16a883b3de97d13948c7be7fa4d
treece9b46806c3ff1adca32beafc3e3d10773fe52a1
parent2211c825e7b6b99bbcabab4e0130a2779275dcc3
selftests/bpf: Fix test_core_autosize on big-endian machines

The "probed" part of test_core_autosize copies an integer using
bpf_core_read() into an integer of a potentially different size.
On big-endian machines a destination offset is required for this to
produce a sensible result.

Fixes: 888d83b961f6 ("selftests/bpf: Validate libbpf's auto-sizing of LD/ST/STX instructions")
Signed-off-by: Ilya Leoshkevich <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
tools/testing/selftests/bpf/progs/test_core_autosize.c
This page took 0.065304 seconds and 4 git commands to generate.