aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-12-20 13:16:21 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-20 22:15:36 -0600
commitc7f2fab5c7854b11da909e79dd6c835d6ab91754 (patch)
tree5c16bd1935d557c71a0c68dd0fb6c2ebccb8b845 /asm
parentf23d6c626bd657e967347bda872242427b0d9221 (diff)
downloadskiboot-c7f2fab5c7854b11da909e79dd6c835d6ab91754.zip
skiboot-c7f2fab5c7854b11da909e79dd6c835d6ab91754.tar.gz
skiboot-c7f2fab5c7854b11da909e79dd6c835d6ab91754.tar.bz2
Add support for new gcc 7 parametrized stack protector
This gives us per-cpu guard values as well. For now I just xor a magic constant with the CPU PIR value. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/head.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/asm/head.S b/asm/head.S
index eccf070..264899b 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -389,6 +389,11 @@ boot_entry:
li %r0,0
std %r0,CPUTHREAD_STACK_BOT_MARK(%r13)
#endif
+ /* Initialize the stack guard */
+ LOAD_IMM64(%r3,STACK_CHECK_GUARD_BASE);
+ xor %r3,%r3,%r31
+ std %r3,0(%r13)
+
/* Jump to C */
mr %r3,%r27
bl main_cpu_entry