diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:13:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:13:20 -0400 |
commit | bb7762961d3ce745688e9050e914c1d3f980268d (patch) | |
tree | e841f58cd6188cc44583cd055798b4475a4d68f0 /arch/x86/kernel/process.c | |
parent | 48c72d1ab4ec86789a23aed0b0b5f31ac083c0c6 (diff) | |
parent | 35d5a9a61490bf39d2e48d7f499c8c801a39ebe9 (diff) |
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (22 commits)
x86: fix system without memory on node0
x86, mm: Fix node_possible_map logic
mm, x86: remove MEMORY_HOTPLUG_RESERVE related code
x86: make sparse mem work in non-NUMA mode
x86: process.c, remove useless headers
x86: merge process.c a bit
x86: use sparse_memory_present_with_active_regions() on UMA
x86: unify 64-bit UMA and NUMA paging_init()
x86: Allow 1MB of slack between the e820 map and SRAT, not 4GB
x86: Sanity check the e820 against the SRAT table using e820 map only
x86: clean up and and print out initial max_pfn_mapped
x86/pci: remove rounding quirk from e820_setup_gap()
x86, e820, pci: reserve extra free space near end of RAM
x86: fix typo in address space documentation
x86: 46 bit physical address support on 64 bits
x86, mm: fault.c, use printk_once() in is_errata93()
x86: move per-cpu mmu_gathers to mm/init.c
x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c
x86: unify noexec handling
x86: remove (null) in /sys kernel_page_tables
...
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 3e21e38d7e37..e22d63bdc8ff 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/pm.h> | 9 | #include <linux/pm.h> |
10 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
11 | #include <linux/random.h> | ||
11 | #include <trace/power.h> | 12 | #include <trace/power.h> |
12 | #include <asm/system.h> | 13 | #include <asm/system.h> |
13 | #include <asm/apic.h> | 14 | #include <asm/apic.h> |
@@ -614,3 +615,16 @@ static int __init idle_setup(char *str) | |||
614 | } | 615 | } |
615 | early_param("idle", idle_setup); | 616 | early_param("idle", idle_setup); |
616 | 617 | ||
618 | unsigned long arch_align_stack(unsigned long sp) | ||
619 | { | ||
620 | if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) | ||
621 | sp -= get_random_int() % 8192; | ||
622 | return sp & ~0xf; | ||
623 | } | ||
624 | |||
625 | unsigned long arch_randomize_brk(struct mm_struct *mm) | ||
626 | { | ||
627 | unsigned long range_end = mm->brk + 0x02000000; | ||
628 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | ||
629 | } | ||
630 | |||