]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:37:38 +0000 (13:37 -0500)
commitc3ffdd89203f8751290634d232da2f70af7ef671
treefd28d3acb43bc0b353e8bd4a6721a4fa4187c297
parenta3277048d07a5b93b75b7b736a3c3252f8c6855a
selftests/bpf: Use the last page in test_snprintf_btf on s390

BugLink: https://bugs.launchpad.net/bugs/1919492
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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
tools/testing/selftests/bpf/progs/netif_receive_skb.c