Skip to content

Commit

Permalink
x86: stackprotector.h misc update
Browse files Browse the repository at this point in the history
Impact: misc udpate

* wrap content with CONFIG_CC_STACK_PROTECTOR so that other arch files
  can include it directly

* add missing includes

This will help future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
htejun authored and Ingo Molnar committed Feb 9, 2009
1 parent 6cd61c0 commit 76397f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/x86/include/asm/stackprotector.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifndef _ASM_STACKPROTECTOR_H
#define _ASM_STACKPROTECTOR_H 1

#ifdef CONFIG_CC_STACKPROTECTOR

#include <asm/tsc.h>
#include <asm/processor.h>
#include <asm/percpu.h>
#include <linux/random.h>

/*
* Initialize the stackprotector canary value.
Expand Down Expand Up @@ -35,4 +39,5 @@ static __always_inline void boot_init_stack_canary(void)
percpu_write(irq_stack_union.stack_canary, canary);
}

#endif
#endif /* CC_STACKPROTECTOR */
#endif /* _ASM_STACKPROTECTOR_H */

0 comments on commit 76397f7

Please sign in to comment.