selftests/bpf: Use the last page in test_snprintf_btf on s390
authorIlya Leoshkevich <iii@linux.ibm.com>
Sat, 27 Feb 2021 05:17:26 +0000 (06:17 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Mar 2021 10:30:59 +0000 (11:30 +0100)
commit42a382a466a967dc053c73b969cd2ac2fec502cf
tree2b5bad975cf827ebda04d4b3202a4580999e90c6
parent8811f4a9836e31c14ecdf79d9f3cb7c5d463265d
selftests/bpf: Use the last page in test_snprintf_btf on s390

test_snprintf_btf fails on s390, because NULL points to a readable
struct lowcore there. Fix by using the last page instead.

Error message example:

    printing fffffffffffff000 should generate error, got (361)

Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210227051726.121256-1-iii@linux.ibm.com
tools/testing/selftests/bpf/progs/netif_receive_skb.c