diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2020-12-09 05:29:23 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-09 23:48:13 +1100 |
commit | 3dc12dfe74300febc568c3b530c0f9bee01f2821 (patch) | |
tree | 42783ff7861836cf359ab4d83181cb01da5fce72 /arch/powerpc/mm/fault.c | |
parent | 5250d026d241febfaf226d26cabe528fc478e225 (diff) |
powerpc/mm: Move the WARN() out of bad_kuap_fault()
In order to prepare the removal of calls to
search_exception_tables() on the fast path, move the
WARN() out of bad_kuap_fault().
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9501311014bd6507e04b27a0c3035186ccf65cd5.1607491748.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r-- | arch/powerpc/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 3fcd34c28e10..04505f938bbc 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -228,7 +228,7 @@ static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code, // Read/write fault in a valid region (the exception table search passed // above), but blocked by KUAP is bad, it can never succeed. if (bad_kuap_fault(regs, address, is_write)) - return true; + return WARN(true, "Bug: %s fault blocked by KUAP!", is_write ? "Write" : "Read"); // What's left? Kernel fault on user in well defined regions (extable // matched), and allowed by KUAP in the faulting context. |