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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:12 +0000 (17:06 +0100)
commit7653656be252abd7d2d3f16152188623de5be4f8
tree2c4d4817f026f80f51c19194e9a79be1896ef0f4
parent6aa23829949c2c0912e82866aeab4fd591595235
selftests/bpf: Use the last page in test_snprintf_btf on s390

commit 42a382a466a967dc053c73b969cd2ac2fec502cf upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/progs/netif_receive_skb.c