aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig30
-rw-r--r--init/do_mounts.c13
-rw-r--r--init/do_mounts_md.c5
-rw-r--r--init/main.c3
4 files changed, 29 insertions, 22 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f068071fcc5d..6a5c5fed66c9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -675,6 +675,9 @@ config CC_OPTIMIZE_FOR_SIZE
675config SYSCTL 675config SYSCTL
676 bool 676 bool
677 677
678config ANON_INODES
679 bool
680
678menuconfig EMBEDDED 681menuconfig EMBEDDED
679 bool "Configure standard kernel features (for small systems)" 682 bool "Configure standard kernel features (for small systems)"
680 help 683 help
@@ -780,18 +783,6 @@ config PCSPKR_PLATFORM
780 This option allows to disable the internal PC-Speaker 783 This option allows to disable the internal PC-Speaker
781 support, saving some memory. 784 support, saving some memory.
782 785
783config COMPAT_BRK
784 bool "Disable heap randomization"
785 default y
786 help
787 Randomizing heap placement makes heap exploits harder, but it
788 also breaks ancient binaries (including anything libc5 based).
789 This option changes the bootup default to heap randomization
790 disabled, and can be overriden runtime by setting
791 /proc/sys/kernel/randomize_va_space to 2.
792
793 On non-ancient distros (post-2000 ones) N is usually a safe choice.
794
795config BASE_FULL 786config BASE_FULL
796 default y 787 default y
797 bool "Enable full-sized data structures for core" if EMBEDDED 788 bool "Enable full-sized data structures for core" if EMBEDDED
@@ -809,9 +800,6 @@ config FUTEX
809 support for "fast userspace mutexes". The resulting kernel may not 800 support for "fast userspace mutexes". The resulting kernel may not
810 run glibc-based applications correctly. 801 run glibc-based applications correctly.
811 802
812config ANON_INODES
813 bool
814
815config EPOLL 803config EPOLL
816 bool "Enable eventpoll support" if EMBEDDED 804 bool "Enable eventpoll support" if EMBEDDED
817 default y 805 default y
@@ -897,6 +885,18 @@ config SLUB_DEBUG
897 SLUB sysfs support. /sys/slab will not exist and there will be 885 SLUB sysfs support. /sys/slab will not exist and there will be
898 no support for cache validation etc. 886 no support for cache validation etc.
899 887
888config COMPAT_BRK
889 bool "Disable heap randomization"
890 default y
891 help
892 Randomizing heap placement makes heap exploits harder, but it
893 also breaks ancient binaries (including anything libc5 based).
894 This option changes the bootup default to heap randomization
895 disabled, and can be overriden runtime by setting
896 /proc/sys/kernel/randomize_va_space to 2.
897
898 On non-ancient distros (post-2000 ones) N is usually a safe choice.
899
900choice 900choice
901 prompt "Choose SLAB allocator" 901 prompt "Choose SLAB allocator"
902 default SLUB 902 default SLUB
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 708105e163df..8d4ff5afc1d8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -370,10 +370,14 @@ void __init prepare_namespace(void)
370 ssleep(root_delay); 370 ssleep(root_delay);
371 } 371 }
372 372
373 /* wait for the known devices to complete their probing */ 373 /*
374 while (driver_probe_done() != 0) 374 * wait for the known devices to complete their probing
375 msleep(100); 375 *
376 async_synchronize_full(); 376 * Note: this is a potential source of long boot delays.
377 * For example, it is not atypical to wait 5 seconds here
378 * for the touchpad of a laptop to initialize.
379 */
380 wait_for_device_probe();
377 381
378 md_run_setup(); 382 md_run_setup();
379 383
@@ -399,6 +403,7 @@ void __init prepare_namespace(void)
399 while (driver_probe_done() != 0 || 403 while (driver_probe_done() != 0 ||
400 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) 404 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
401 msleep(100); 405 msleep(100);
406 async_synchronize_full();
402 } 407 }
403 408
404 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; 409 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index ff95e3192884..9bdddbcb3d6a 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -281,8 +281,9 @@ static void __init autodetect_raid(void)
281 */ 281 */
282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); 282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); 283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
284 while (driver_probe_done() < 0) 284
285 msleep(100); 285 wait_for_device_probe();
286
286 fd = sys_open("/dev/md0", 0, 0); 287 fd = sys_open("/dev/md0", 0, 0);
287 if (fd >= 0) { 288 if (fd >= 0) {
288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart); 289 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
diff --git a/init/main.c b/init/main.c
index 844209453c02..83697e160b3a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -97,7 +97,7 @@ static inline void mark_rodata_ro(void) { }
97extern void tc_init(void); 97extern void tc_init(void);
98#endif 98#endif
99 99
100enum system_states system_state; 100enum system_states system_state __read_mostly;
101EXPORT_SYMBOL(system_state); 101EXPORT_SYMBOL(system_state);
102 102
103/* 103/*
@@ -463,6 +463,7 @@ static noinline void __init_refok rest_init(void)
463 * at least once to get things moving: 463 * at least once to get things moving:
464 */ 464 */
465 init_idle_bootup_task(current); 465 init_idle_bootup_task(current);
466 rcu_scheduler_starting();
466 preempt_enable_no_resched(); 467 preempt_enable_no_resched();
467 schedule(); 468 schedule();
468 preempt_disable(); 469 preempt_disable();