diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-06-30 06:00:01 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-06-30 06:00:01 -0400 |
commit | fc4978b796e5e52ab3a709495a968199afe0a108 (patch) | |
tree | 102c74707940214f3c9810dadaf62d0d378a7a8c /arch/arm/kernel/process.c | |
parent | 3260e5293727f16ffdce9a6a6203fd9a6b149e58 (diff) | |
parent | df0698be14c6683606d5df2d83e3ae40f85ed0d9 (diff) |
Merge git://git.linaro.org/nico/arm_security into devel-stable
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r-- | arch/arm/kernel/process.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index acf5e6fdb6dc..090ac9459da1 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/tick.h> | 28 | #include <linux/tick.h> |
29 | #include <linux/utsname.h> | 29 | #include <linux/utsname.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/random.h> | ||
31 | 32 | ||
32 | #include <asm/leds.h> | 33 | #include <asm/leds.h> |
33 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
@@ -36,6 +37,12 @@ | |||
36 | #include <asm/stacktrace.h> | 37 | #include <asm/stacktrace.h> |
37 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
38 | 39 | ||
40 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
41 | #include <linux/stackprotector.h> | ||
42 | unsigned long __stack_chk_guard __read_mostly; | ||
43 | EXPORT_SYMBOL(__stack_chk_guard); | ||
44 | #endif | ||
45 | |||
39 | static const char *processor_modes[] = { | 46 | static const char *processor_modes[] = { |
40 | "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , | 47 | "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , |
41 | "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", | 48 | "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", |
@@ -421,3 +428,9 @@ unsigned long get_wchan(struct task_struct *p) | |||
421 | } while (count ++ < 16); | 428 | } while (count ++ < 16); |
422 | return 0; | 429 | return 0; |
423 | } | 430 | } |
431 | |||
432 | unsigned long arch_randomize_brk(struct mm_struct *mm) | ||
433 | { | ||
434 | unsigned long range_end = mm->brk + 0x02000000; | ||
435 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | ||
436 | } | ||