diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-06-10 09:57:05 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-06-13 15:58:26 +0200 |
commit | 6c22c98637602f89beb40c43cfb3d764b71a54c6 (patch) | |
tree | caf9cf9f9487ac2e0e5bc9ffccd417f532bf98c9 /arch/s390/mm/fault.c | |
parent | ee64baf4ea3b7affb7e325bb3d188515ec4bb66e (diff) | |
download | linux-stable-6c22c98637602f89beb40c43cfb3d764b71a54c6.tar.gz linux-stable-6c22c98637602f89beb40c43cfb3d764b71a54c6.tar.bz2 linux-stable-6c22c98637602f89beb40c43cfb3d764b71a54c6.zip |
s390: avoid extable collisions
We have some inline assemblies where the extable entry points to a
label at the end of an inline assembly which is not followed by an
instruction.
On the other hand we have also inline assemblies where the extable
entry points to the first instruction of an inline assembly.
If a first type inline asm (extable point to empty label at the end)
would be directly followed by a second type inline asm (extable points
to first instruction) then we would have two different extable entries
that point to the same instruction but would have a different target
address.
This can lead to quite random behaviour, depending on sorting order.
I verified that we currently do not have such collisions within the
kernel. However to avoid such subtle bugs add a couple of nop
instructions to those inline assemblies which contain an extable that
points to an empty label.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/fault.c')
-rw-r--r-- | arch/s390/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 19288c1b36d3..6ad7eff84c82 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -624,7 +624,7 @@ void pfault_fini(void) diag_stat_inc(DIAG_STAT_X258); asm volatile( " diag %0,0,0x258\n" - "0:\n" + "0: nopr %%r7\n" EX_TABLE(0b,0b) : : "a" (&refbk), "m" (refbk) : "cc"); } |