From 71664fd8d2d2550a56cc6a9c2b81797bfe90d613 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 17 Nov 2014 18:22:04 +1100 Subject: Stack checking extensions This patch adds: - Normal builds are done with -fstack-protector (we want to investigate using -fstack-protector-strong on gcc4.9 but for now we just use that - Build with STACK_CHECK=1 will use -fstack-protector-all and -pg and will check the stack in mcount Signed-off-by: Benjamin Herrenschmidt --- asm/asm-offsets.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'asm/asm-offsets.c') diff --git a/asm/asm-offsets.c b/asm/asm-offsets.c index e33c181..4fb2344 100644 --- a/asm/asm-offsets.c +++ b/asm/asm-offsets.c @@ -36,6 +36,10 @@ int main(void) OFFSET(CPUTHREAD_SAVE_R1, cpu_thread, save_r1); OFFSET(CPUTHREAD_STATE, cpu_thread, state); OFFSET(CPUTHREAD_CUR_TOKEN, cpu_thread, current_token); + DEFINE(CPUTHREAD_GAP, sizeof(struct cpu_thread) + STACK_SAFETY_GAP); + OFFSET(CPUTHREAD_STACK_BOT_MARK, cpu_thread, stack_bot_mark); + OFFSET(CPUTHREAD_STACK_BOT_PC, cpu_thread, stack_bot_pc); + OFFSET(CPUTHREAD_STACK_BOT_TOK, cpu_thread, stack_bot_tok); OFFSET(STACK_TYPE, stack_frame, type); OFFSET(STACK_LOCALS, stack_frame, locals); -- cgit v1.1