diff options
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 98d85952f574..aa9414ed74c7 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -914,3 +914,10 @@ unsigned long arch_align_stack(unsigned long sp) | |||
914 | sp -= get_random_int() % 8192; | 914 | sp -= get_random_int() % 8192; |
915 | return sp & ~0xf; | 915 | return sp & ~0xf; |
916 | } | 916 | } |
917 | |||
918 | unsigned long arch_randomize_brk(struct mm_struct *mm) | ||
919 | { | ||
920 | unsigned long range_end = mm->brk + 0x02000000; | ||
921 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | ||
922 | } | ||
923 | |||