]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: fix "alu with different scalars 1" on s390
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 16 Jul 2019 10:53:53 +0000 (12:53 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 16 Jul 2019 16:20:08 +0000 (09:20 -0700)
commit18067da5e789e567250926cb65788c2cddd71603
treec72dc9dc9aa33589ee869178cfd6ac2fec8258b3
parent2d3d0150e388352981747fa66e6e999c2982f7e3
selftests/bpf: fix "alu with different scalars 1" on s390

BPF_LDX_MEM is used to load the least significant byte of the retrieved
test_val.index, however, on big-endian machines it ends up retrieving
the most significant byte.

Change the test to load the whole int in order to make it
endianness-independent.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/value_ptr_arith.c