diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2020-11-16 08:06:41 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2020-11-23 12:01:12 +0100 |
commit | 062e527956d05fae02f143c0d5ff9e8525c6799f (patch) | |
tree | 8e070371d94d41cd6f6eb7eeb8801442ad73bdf2 /arch/s390/kernel/entry.S | |
parent | 0290c9e328e04052e317171953feb18177a34aed (diff) | |
download | linux-062e527956d05fae02f143c0d5ff9e8525c6799f.tar.gz linux-062e527956d05fae02f143c0d5ff9e8525c6799f.tar.bz2 linux-062e527956d05fae02f143c0d5ff9e8525c6799f.zip |
s390/mm: add debug user asce support
Verify on exit to user space that always
- the primary ASCE (cr1) is set to kernel ASCE
- the secondary ASCE (cr7) is set to user ASCE
If this is not the case: panic since something went terribly wrong.
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r-- | arch/s390/kernel/entry.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index d43ef46dc683..377f75616693 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -90,6 +90,12 @@ _LPP_OFFSET = __LC_LPP #endif .endm + .macro DEBUG_USER_ASCE +#ifdef CONFIG_DEBUG_USER_ASCE + brasl %r14,debug_user_asce +#endif + .endm + .macro CHECK_VMAP_STACK savearea,oklabel #ifdef CONFIG_VMAP_STACK lgr %r14,%r15 @@ -428,6 +434,7 @@ ENTRY(system_call) jnz .Lsysc_work TSTMSK __TI_flags(%r12),_TIF_WORK jnz .Lsysc_work # check for work + DEBUG_USER_ASCE lctlg %c1,%c1,__LC_USER_ASCE BPEXIT __TI_flags(%r12),_TIF_ISOLATE_BP TSTMSK __LC_CPU_FLAGS, _CIF_FPU @@ -793,6 +800,7 @@ ENTRY(io_int_handler) mvc __LC_RETURN_PSW(16),__PT_PSW(%r11) tm __PT_PSW+1(%r11),0x01 # returning to user ? jno .Lio_exit_kernel + DEBUG_USER_ASCE lctlg %c1,%c1,__LC_USER_ASCE BPEXIT __TI_flags(%r12),_TIF_ISOLATE_BP stpt __LC_EXIT_TIMER |