diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/transmeta.c | 1 | ||||
-rw-r--r-- | include/linux/kernel.h | 6 | ||||
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 2 | ||||
-rw-r--r-- | mm/memory.c | 10 |
6 files changed, 16 insertions, 8 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index ac75b57edf2e..b874771385cd 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1638,6 +1638,9 @@ running once the system is up. | |||
1638 | Format: | 1638 | Format: |
1639 | <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] | 1639 | <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] |
1640 | 1640 | ||
1641 | norandmaps Don't use address space randomization | ||
1642 | Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space | ||
1643 | |||
1641 | 1644 | ||
1642 | ______________________________________________________________________ | 1645 | ______________________________________________________________________ |
1643 | Changelog: | 1646 | Changelog: |
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index bdbeb77f4e22..7214c9b577ab 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/mm.h> | ||
2 | #include <linux/init.h> | 3 | #include <linux/init.h> |
3 | #include <asm/processor.h> | 4 | #include <asm/processor.h> |
4 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b49affa0ac5a..3b507bf05d09 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -326,12 +326,6 @@ struct sysinfo { | |||
326 | /* Force a compilation error if condition is true */ | 326 | /* Force a compilation error if condition is true */ |
327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
328 | 328 | ||
329 | #ifdef CONFIG_SYSCTL | ||
330 | extern int randomize_va_space; | ||
331 | #else | ||
332 | #define randomize_va_space 1 | ||
333 | #endif | ||
334 | |||
335 | /* Trap pasters of __FUNCTION__ at compile-time */ | 329 | /* Trap pasters of __FUNCTION__ at compile-time */ |
336 | #define __FUNCTION__ (__func__) | 330 | #define __FUNCTION__ (__func__) |
337 | 331 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 75e9f0724997..26e1663a5cbe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1051,5 +1051,7 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
1051 | void drop_pagecache(void); | 1051 | void drop_pagecache(void); |
1052 | void drop_slab(void); | 1052 | void drop_slab(void); |
1053 | 1053 | ||
1054 | extern int randomize_va_space; | ||
1055 | |||
1054 | #endif /* __KERNEL__ */ | 1056 | #endif /* __KERNEL__ */ |
1055 | #endif /* _LINUX_MM_H */ | 1057 | #endif /* _LINUX_MM_H */ |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 71dd6f62efec..7654d55c47f5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -126,8 +126,6 @@ extern int sysctl_hz_timer; | |||
126 | extern int acct_parm[]; | 126 | extern int acct_parm[]; |
127 | #endif | 127 | #endif |
128 | 128 | ||
129 | int randomize_va_space = 1; | ||
130 | |||
131 | static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, | 129 | static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, |
132 | ctl_table *, void **); | 130 | ctl_table *, void **); |
133 | static int proc_doutsstring(ctl_table *table, int write, struct file *filp, | 131 | static int proc_doutsstring(ctl_table *table, int write, struct file *filp, |
diff --git a/mm/memory.c b/mm/memory.c index 2bee1f21aa8a..9abc6008544b 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -82,6 +82,16 @@ EXPORT_SYMBOL(num_physpages); | |||
82 | EXPORT_SYMBOL(high_memory); | 82 | EXPORT_SYMBOL(high_memory); |
83 | EXPORT_SYMBOL(vmalloc_earlyreserve); | 83 | EXPORT_SYMBOL(vmalloc_earlyreserve); |
84 | 84 | ||
85 | int randomize_va_space __read_mostly = 1; | ||
86 | |||
87 | static int __init disable_randmaps(char *s) | ||
88 | { | ||
89 | randomize_va_space = 0; | ||
90 | return 0; | ||
91 | } | ||
92 | __setup("norandmaps", disable_randmaps); | ||
93 | |||
94 | |||
85 | /* | 95 | /* |
86 | * If a p?d_bad entry is found while walking page tables, report | 96 | * If a p?d_bad entry is found while walking page tables, report |
87 | * the error, before resetting entry to p?d_none. Usually (but | 97 | * the error, before resetting entry to p?d_none. Usually (but |