summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/asm-bug.h
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2017-10-24 20:40:36 +0300
committerWill Deacon <will.deacon@arm.com>2017-10-25 17:57:15 +0300
commitfa3eb71d96f52833a5e12def2a22b2347dd349d0 (patch)
tree8d94ec0de4c1bc93b6f9c7f458bcb97377c11087 /arch/arm64/include/asm/asm-bug.h
parent6436beeee5721a8e906e9eabf866f12d04470437 (diff)
downloadlinux-fa3eb71d96f52833a5e12def2a22b2347dd349d0.tar.xz
arm64: asm-bug: Renumber macro local labels to avoid clashes
Currently ASM_BUG() and its constituent macros define local assembler labels 0, 1 and 2 internally, which carries a high risk of clash with callers' labels and consequent mis-assembly. This patch gives the labels a big random offset to minimise the chance of such errors. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/asm-bug.h')
-rw-r--r--arch/arm64/include/asm/asm-bug.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/asm-bug.h b/arch/arm64/include/asm/asm-bug.h
index 636e755bcdca..b3552c4a405f 100644
--- a/arch/arm64/include/asm/asm-bug.h
+++ b/arch/arm64/include/asm/asm-bug.h
@@ -22,10 +22,10 @@
#define _BUGVERBOSE_LOCATION(file, line) __BUGVERBOSE_LOCATION(file, line)
#define __BUGVERBOSE_LOCATION(file, line) \
.pushsection .rodata.str,"aMS",@progbits,1; \
- 2: .string file; \
+ 14472: .string file; \
.popsection; \
\
- .long 2b - 0b; \
+ .long 14472b - 14470b; \
.short line;
#else
#define _BUGVERBOSE_LOCATION(file, line)
@@ -36,11 +36,11 @@
#define __BUG_ENTRY(flags) \
.pushsection __bug_table,"aw"; \
.align 2; \
- 0: .long 1f - 0b; \
+ 14470: .long 14471f - 14470b; \
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
.short flags; \
.popsection; \
- 1:
+ 14471:
#else
#define __BUG_ENTRY(flags)
#endif