aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 16:54:09 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 16:54:09 -0500
commit3e6bdf473f489664dac4d7511d26c7ac3dfdc748 (patch)
tree10cb2e928830b9de8bbc3f6dd47c18c24cd2affa /mm
parent3d4d4582e5b3f67a68f2cf32fd5b70d8d80f119d (diff)
parent58d5d0d8dd52cbca988af24b5692a20b00285543 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: fix deadlock, make pgd_lock irq-safe virtio: fix trivial build bug x86: fix mttr trimming x86: delay CPA self-test and repeat it x86: fix 64-bit sections generic: add __FINITDATA x86: remove suprious ifdefs from pageattr.c x86: mark the .rodata section also NX x86: fix iret exception recovery on 64-bit cpuidle: dubious one-bit signed bitfield in cpuidle.h x86: fix sparse warnings in powernow-k8.c x86: fix sparse error in traps_32.c x86: trivial sparse/checkpatch in quirks.c x86 ptrace: disallow null cs/ss MAINTAINERS: RDC R-321x SoC maintainer brk randomization: introduce CONFIG_COMPAT_BRK brk: check the lower bound properly x86: remove X2 workaround x86: make spurious fault handler aware of large mappings x86: make traps on entry code be debuggable in user space, 64-bit
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c13
-rw-r--r--mm/mmap.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 7bb70728bb52..9d073fa0a2d0 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -82,7 +82,18 @@ void * high_memory;
82EXPORT_SYMBOL(num_physpages); 82EXPORT_SYMBOL(num_physpages);
83EXPORT_SYMBOL(high_memory); 83EXPORT_SYMBOL(high_memory);
84 84
85int randomize_va_space __read_mostly = 1; 85/*
86 * Randomize the address space (stacks, mmaps, brk, etc.).
87 *
88 * ( When CONFIG_COMPAT_BRK=y we exclude brk from randomization,
89 * as ancient (libc5 based) binaries can segfault. )
90 */
91int randomize_va_space __read_mostly =
92#ifdef CONFIG_COMPAT_BRK
93 1;
94#else
95 2;
96#endif
86 97
87static int __init disable_randmaps(char *s) 98static int __init disable_randmaps(char *s)
88{ 99{
diff --git a/mm/mmap.c b/mm/mmap.c
index bb4c963cc534..ad6e4eaf34f8 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -245,7 +245,7 @@ asmlinkage unsigned long sys_brk(unsigned long brk)
245 245
246 down_write(&mm->mmap_sem); 246 down_write(&mm->mmap_sem);
247 247
248 if (brk < mm->end_code) 248 if (brk < mm->start_brk)
249 goto out; 249 goto out;
250 250
251 /* 251 /*