summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/diag.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-06-10 09:57:05 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-06-13 15:58:26 +0200
commit6c22c98637602f89beb40c43cfb3d764b71a54c6 (patch)
treecaf9cf9f9487ac2e0e5bc9ffccd417f532bf98c9 /arch/s390/include/asm/diag.h
parents390/uaccess: use __builtin_expect for get_user/put_user (diff)
downloadlinux-6c22c98637602f89beb40c43cfb3d764b71a54c6.tar.xz
linux-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/include/asm/diag.h')
-rw-r--r--arch/s390/include/asm/diag.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/diag.h b/arch/s390/include/asm/diag.h
index 5fac921c1c42..86cae09e076a 100644
--- a/arch/s390/include/asm/diag.h
+++ b/arch/s390/include/asm/diag.h
@@ -49,7 +49,7 @@ static inline void diag10_range(unsigned long start_pfn, unsigned long num_pfn)
diag_stat_inc(DIAG_STAT_X010);
asm volatile(
"0: diag %0,%1,0x10\n"
- "1:\n"
+ "1: nopr %%r7\n"
EX_TABLE(0b, 1b)
EX_TABLE(1b, 1b)
: : "a" (start_addr), "a" (end_addr));