aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/assembler.h
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2017-06-30 16:03:59 +0000
committerKees Cook <[email protected]>2017-06-30 19:00:50 +0000
commitffa47aa678cfaa9b88e8a26cfb115b4768325121 (patch)
tree0719bef951a1e28762868066d3bd73ac29f80c8b /arch/arm/include/asm/assembler.h
parentrandstruct: Whitelist NIU struct page overloading (diff)
downloadkernel-ffa47aa678cfaa9b88e8a26cfb115b4768325121.tar.gz
kernel-ffa47aa678cfaa9b88e8a26cfb115b4768325121.zip
ARM: Prepare for randomized task_struct
With the new task struct randomization, we can run into a build failure for certain random seeds, which will place fields beyond the allow immediate size in the assembly: arch/arm/kernel/entry-armv.S: Assembler messages: arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096) Only two constants in asm-offset.h are affected, and I'm changing both of them here to work correctly in all configurations. One more macro has the problem, but is currently unused, so this removes it instead of adding complexity. Suggested-by: Ard Biesheuvel <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> [kees: Adjust commit log slightly] Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r--arch/arm/include/asm/assembler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 68b06f9c65de..ad301f107dd2 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -87,6 +87,8 @@
#define CALGN(code...)
#endif
+#define IMM12_MASK 0xfff
+
/*
* Enable and disable interrupts
*/