]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Add a test of bad (out-of-range) accesses
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 May 2019 10:20:51 +0000 (20:20 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Jan 2020 05:25:27 +0000 (16:25 +1100)
commit5eb7cfb3a2b178f3d443301cda0825bb9f475657
tree6f77418decaa9b1d1993514f5e4288ef6f4e3391
parent1a3ec143a90a4674e01099c3ba47c3268536a462
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
tools/testing/selftests/powerpc/mm/.gitignore
tools/testing/selftests/powerpc/mm/Makefile
tools/testing/selftests/powerpc/mm/bad_accesses.c [new file with mode: 0644]