Christophe Leroy 6ec20aa2e5 powerpc/32s: Fix bad_kuap_fault()
At the moment, bad_kuap_fault() reports a fault only if a bad access
to userspace occurred while access to userspace was not granted.

But if a fault occurs for a write outside the allowed userspace
segment(s) that have been unlocked, bad_kuap_fault() fails to
detect it and the kernel loops forever in do_page_fault().

Fix it by checking that the accessed address is within the allowed
range.

Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/f48244e9485ada0a304ed33ccbb8da271180c80d.1579866752.git.christophe.leroy@c-s.fr
2020-01-28 23:13:17 +11:00
..
2019-12-02 11:41:35 -08:00
2019-11-30 14:35:43 -08:00
2020-01-28 23:13:17 +11:00
2019-12-22 10:26:59 -08:00
2020-01-28 23:13:17 +11:00
2019-12-09 10:36:44 -08:00
2019-11-30 14:35:43 -08:00
2019-12-04 11:08:30 -08:00
2019-11-25 21:45:43 +11:00