]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 9 Dec 2020 05:29:21 +0000 (05:29 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:26:02 +0000 (14:26 +0100)
commite0cccdace2b727ca9558c15d147612dcd27ea28e
tree3d26ecc8f8f069ae038b228f433dfa58beb2935c
parent824bae1dfcb8be604229af1e66f4943f9c28398d
powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S

BugLink: https://bugs.launchpad.net/bugs/1910822
[ Upstream commit 7ceb40027e19567a0a066e3b380cc034cdd9a124 ]

The verification and message introduced by commit 374f3f5979f9
("powerpc/mm/hash: Handle user access of kernel address gracefully")
applies to all platforms, it should not be limited to BOOK3S.

Make the BOOK3S version of sanity_check_fault() the one for all,
and bail out earlier if not BOOK3S.

Fixes: 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/fe199d5af3578d3bf80035d203a94d742a7a28af.1607491748.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
arch/powerpc/mm/fault.c