diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-10-12 14:24:48 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-10-19 18:07:40 +0300 |
commit | 3037a52f9846b9d6e233274453f2d4117a14f31b (patch) | |
tree | 030694099f002e9c3dd222b8f905a1a871e96341 /arch/s390/include/asm/nmi.h | |
parent | 6c81511ca1f52a0bbe921b2b98e34319a4ca59ed (diff) | |
download | linux-3037a52f9846b9d6e233274453f2d4117a14f31b.tar.xz |
s390/nmi: do register validation as early as possible
The validation of the CPU registers in the machine check handler is
currently split into two parts. The first part is done at the start
of the low level mcck_int_handler function, this includes the CPU
timer register and the general purpose registers.
The second part is done a bit later in s390_do_machine_check for all
the other registers, including the control registers, floating pointer
control, vector or floating pointer registers, the access registers,
the guarded storage registers, the TOD programmable registers and the
clock comparator.
This is working fine to far but in theory a future extensions could
cause the C code to use registers that are not validated yet. A better
approach is to validate all CPU registers in "safe" assembler code
before any C function is called.
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/nmi.h')
-rw-r--r-- | arch/s390/include/asm/nmi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/include/asm/nmi.h b/arch/s390/include/asm/nmi.h index ed41c424448d..7472bf316a2f 100644 --- a/arch/s390/include/asm/nmi.h +++ b/arch/s390/include/asm/nmi.h @@ -25,6 +25,9 @@ #define MCCK_CODE_CPU_TIMER_VALID _BITUL(63 - 46) #define MCCK_CODE_PSW_MWP_VALID _BITUL(63 - 20) #define MCCK_CODE_PSW_IA_VALID _BITUL(63 - 23) +#define MCCK_CODE_CR_VALID _BITUL(63 - 29) +#define MCCK_CODE_GS_VALID _BITUL(63 - 36) +#define MCCK_CODE_FC_VALID _BITUL(63 - 43) #ifndef __ASSEMBLY__ |