aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-07-18 11:13:35 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-07-18 13:49:21 -0700
commit01a0f9e4496d9f54e06abb71bf9f56c617ef8c24 (patch)
tree012d8afb1916367dc45623140ed6f2af898951e8
parent1cb59a6074e23c6f6513642f752a6d8d38327354 (diff)
downloadrenesas-01a0f9e4496d9f54e06abb71bf9f56c617ef8c24.tar.gz
selftests/bpf: fix "valid read map access into a read-only array 1" on s390
This test looks up a 32-bit map element and then loads it using a 64-bit load. This does not work on s390, which is a big-endian machine. Since the point of this test doesn't seem to be loading a smaller value using a larger load, simply use a 32-bit load. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--tools/testing/selftests/bpf/verifier/array_access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/verifier/array_access.c b/tools/testing/selftests/bpf/verifier/array_access.c
index bcb83196e459be..f3c33e128709b8 100644
--- a/tools/testing/selftests/bpf/verifier/array_access.c
+++ b/tools/testing/selftests/bpf/verifier/array_access.c
@@ -226,7 +226,7 @@
BPF_LD_MAP_FD(BPF_REG_1, 0),
BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem),
BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 1),
- BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_0, 0),
+ BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 0),
BPF_EXIT_INSN(),
},
.fixup_map_array_ro = { 3 },