]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9059f2b35a9e4c80e1c2e6f9d41073d93074e886
tree2b5bad975cf827ebda04d4b3202a4580999e90c6
parent0e3b0b7a242d3da20822d13f7b520d87ee9db3cc
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: 193d30b95961 ("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