]> 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)
commitbd43dcbd9d3186ce64b17134f6109b5469c2b249
tree6f77418decaa9b1d1993514f5e4288ef6f4e3391
parent42ebaba363df05e4eee71ec966e24b2ad7d3596f
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]