Skip to content

Commit 1aa4524

Browse files
Sven Schnellehdeller
authored andcommitted
parisc: entry.S: fix space adjustment on interruption for 64-bit userspace
In wide mode, the IASQ contain the upper part of the GVA during interruption. This needs to be reversed before the space is used - otherwise it contains parts of IAOQ. See Page 2-13 "Processing Resources / Interruption Instruction Address Queues" in the Parisc 2.0 Architecture Manual page 2-13 for an explanation. The IAOQ/IASQ space_adjust was skipped for other interruptions than itlb misses. However, the code in handle_interruption() checks whether iasq[0] contains a valid space. Due to the not masked out bits this match failed and the process was killed. Also add space_adjust for IAOQ1/IASQ1 so ptregs contains sane values. Signed-off-by: Sven Schnelle <svens@stackframe.org> Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 5fb1d3c commit 1aa4524

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

arch/parisc/kernel/entry.S

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
10591059
STREG %r17, PT_IOR(%r29)
10601060

10611061
#if defined(CONFIG_64BIT)
1062-
b,n intr_save2
1063-
10641062
skip_save_ior:
10651063
/* We have a itlb miss, and when executing code above 4 Gb on ILP64, we
10661064
* need to adjust iasq/iaoq here in the same way we adjusted isr/ior
@@ -1069,10 +1067,17 @@ skip_save_ior:
10691067
bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
10701068
LDREG PT_IASQ0(%r29), %r16
10711069
LDREG PT_IAOQ0(%r29), %r17
1072-
/* adjust iasq/iaoq */
1070+
/* adjust iasq0/iaoq0 */
10731071
space_adjust %r16,%r17,%r1
10741072
STREG %r16, PT_IASQ0(%r29)
10751073
STREG %r17, PT_IAOQ0(%r29)
1074+
1075+
LDREG PT_IASQ1(%r29), %r16
1076+
LDREG PT_IAOQ1(%r29), %r17
1077+
/* adjust iasq1/iaoq1 */
1078+
space_adjust %r16,%r17,%r1
1079+
STREG %r16, PT_IASQ1(%r29)
1080+
STREG %r17, PT_IAOQ1(%r29)
10761081
#else
10771082
skip_save_ior:
10781083
#endif

0 commit comments

Comments
 (0)