summaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm/fault.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-19 07:51:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-19 07:51:35 +0100
commit07749061b837a1268146dc8a620a522253cea877 (patch)
tree3708ac3f1a088869daf7e9826bc4b56abfcdac74 /arch/parisc/mm/fault.c
parent5c0941c55e5f681ffb05f395222ac673460bb3d0 (diff)
parentb401b621758e46812da61fa58a67c3fd8d91de0d (diff)
downloadlinux-stable-07749061b837a1268146dc8a620a522253cea877.tar.gz
linux-stable-07749061b837a1268146dc8a620a522253cea877.tar.bz2
linux-stable-07749061b837a1268146dc8a620a522253cea877.zip
Merge 6.8-rc5 into driver-core-next
We need the driver core changes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc/mm/fault.c')
-rw-r--r--arch/parisc/mm/fault.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 2fe5b44986e0..c39de84e98b0 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -150,11 +150,16 @@ int fixup_exception(struct pt_regs *regs)
* Fix up get_user() and put_user().
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant
* bit in the relative address of the fixup routine to indicate
- * that gr[ASM_EXCEPTIONTABLE_REG] should be loaded with
- * -EFAULT to report a userspace access error.
+ * that the register encoded in the "or %r0,%r0,register"
+ * opcode should be loaded with -EFAULT to report a userspace
+ * access error.
*/
if (fix->fixup & 1) {
- regs->gr[ASM_EXCEPTIONTABLE_REG] = -EFAULT;
+ int fault_error_reg = fix->err_opcode & 0x1f;
+ if (!WARN_ON(!fault_error_reg))
+ regs->gr[fault_error_reg] = -EFAULT;
+ pr_debug("Unalignment fixup of register %d at %pS\n",
+ fault_error_reg, (void*)regs->iaoq[0]);
/* zero target register for get_user() */
if (parisc_acctyp(0, regs->iir) == VM_READ) {