diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2019-05-20 13:20:51 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-01-06 08:25:27 +0300 |
commit | 5eb7cfb3a2b178f3d443301cda0825bb9f475657 (patch) | |
tree | 6f77418decaa9b1d1993514f5e4288ef6f4e3391 /tools/testing/selftests/powerpc/mm/Makefile | |
parent | 1a3ec143a90a4674e01099c3ba47c3268536a462 (diff) | |
download | linux-5eb7cfb3a2b178f3d443301cda0825bb9f475657.tar.xz |
selftests/powerpc: Add a test of bad (out-of-range) accesses
Userspace isn't allowed to access certain address ranges, make sure we
actually test that to at least some degree.
This would have caught the recent bug where the SLB fault handler was
incorrectly called on an out-of-range access when using the Radix MMU.
It also would have caught the bug we had in get_region_id() where we
were inserting SLB entries for bad addresses.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190520102051.12103-1-mpe@ellerman.id.au
Diffstat (limited to 'tools/testing/selftests/powerpc/mm/Makefile')
-rw-r--r-- | tools/testing/selftests/powerpc/mm/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile index ed1565809d2b..b9103c4bb414 100644 --- a/tools/testing/selftests/powerpc/mm/Makefile +++ b/tools/testing/selftests/powerpc/mm/Makefile @@ -3,7 +3,7 @@ noarg: $(MAKE) -C ../ TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors wild_bctr \ - large_vm_fork_separation + large_vm_fork_separation bad_accesses TEST_GEN_PROGS_EXTENDED := tlbie_test TEST_GEN_FILES := tempfile @@ -16,6 +16,7 @@ $(OUTPUT)/prot_sao: ../utils.c $(OUTPUT)/wild_bctr: CFLAGS += -m64 $(OUTPUT)/large_vm_fork_separation: CFLAGS += -m64 +$(OUTPUT)/bad_accesses: CFLAGS += -m64 $(OUTPUT)/tempfile: dd if=/dev/zero of=$@ bs=64k count=1 |