aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-01-31 09:13:14 -0500
committerTakashi Iwai <tiwai@suse.de>2012-01-31 09:13:14 -0500
commitea51e5040e24eefe44d70bc654a237ca1f0225b0 (patch)
treedf2e5922dcdfafae62a10d8cd97f98121064fc23 /init
parent3422a47041b8cb8f14ac1e3926bcf711121df6dc (diff)
parent8dbd52daee38adaae4d5a674bcca837e694a4f4c (diff)
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig49
-rw-r--r--init/calibrate.c15
-rw-r--r--init/do_mounts.c45
-rw-r--r--init/initramfs.c8
-rw-r--r--init/main.c10
5 files changed, 100 insertions, 27 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 43298f9810fb..3f42cd66f0f8 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -355,7 +355,7 @@ config AUDIT
355 355
356config AUDITSYSCALL 356config AUDITSYSCALL
357 bool "Enable system-call auditing support" 357 bool "Enable system-call auditing support"
358 depends on AUDIT && (X86 || PPC || S390 || IA64 || UML || SPARC64 || SUPERH) 358 depends on AUDIT && (X86 || PPC || S390 || IA64 || UML || SPARC64 || SUPERH || ARM)
359 default y if SECURITY_SELINUX 359 default y if SECURITY_SELINUX
360 help 360 help
361 Enable low-overhead system-call auditing infrastructure that 361 Enable low-overhead system-call auditing infrastructure that
@@ -372,6 +372,20 @@ config AUDIT_TREE
372 depends on AUDITSYSCALL 372 depends on AUDITSYSCALL
373 select FSNOTIFY 373 select FSNOTIFY
374 374
375config AUDIT_LOGINUID_IMMUTABLE
376 bool "Make audit loginuid immutable"
377 depends on AUDIT
378 help
379 The config option toggles if a task setting its loginuid requires
380 CAP_SYS_AUDITCONTROL or if that task should require no special permissions
381 but should instead only allow setting its loginuid if it was never
382 previously set. On systems which use systemd or a similar central
383 process to restart login services this should be set to true. On older
384 systems in which an admin would typically have to directly stop and
385 start processes this should be set to false. Setting this to true allows
386 one to drop potentially dangerous capabilites from the login tasks,
387 but may not be backwards compatible with older init systems.
388
375source "kernel/irq/Kconfig" 389source "kernel/irq/Kconfig"
376 390
377menu "RCU Subsystem" 391menu "RCU Subsystem"
@@ -469,14 +483,14 @@ config RCU_FANOUT_EXACT
469 483
470config RCU_FAST_NO_HZ 484config RCU_FAST_NO_HZ
471 bool "Accelerate last non-dyntick-idle CPU's grace periods" 485 bool "Accelerate last non-dyntick-idle CPU's grace periods"
472 depends on TREE_RCU && NO_HZ && SMP 486 depends on NO_HZ && SMP
473 default n 487 default n
474 help 488 help
475 This option causes RCU to attempt to accelerate grace periods 489 This option causes RCU to attempt to accelerate grace periods
476 in order to allow the final CPU to enter dynticks-idle state 490 in order to allow CPUs to enter dynticks-idle state more
477 more quickly. On the other hand, this option increases the 491 quickly. On the other hand, this option increases the overhead
478 overhead of the dynticks-idle checking, particularly on systems 492 of the dynticks-idle checking, particularly on systems with
479 with large numbers of CPUs. 493 large numbers of CPUs.
480 494
481 Say Y if energy efficiency is critically important, particularly 495 Say Y if energy efficiency is critically important, particularly
482 if you have relatively few CPUs. 496 if you have relatively few CPUs.
@@ -689,6 +703,17 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED
689 For those who want to have the feature enabled by default should 703 For those who want to have the feature enabled by default should
690 select this option (if, for some reason, they need to disable it 704 select this option (if, for some reason, they need to disable it
691 then swapaccount=0 does the trick). 705 then swapaccount=0 does the trick).
706config CGROUP_MEM_RES_CTLR_KMEM
707 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
708 depends on CGROUP_MEM_RES_CTLR && EXPERIMENTAL
709 default n
710 help
711 The Kernel Memory extension for Memory Resource Controller can limit
712 the amount of memory used by kernel objects in the system. Those are
713 fundamentally different from the entities handled by the standard
714 Memory Controller, which are page-based, and can be swapped. Users of
715 the kmem extension can use it to guarantee that no group of processes
716 will ever exhaust kernel resources alone.
692 717
693config CGROUP_PERF 718config CGROUP_PERF
694 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring" 719 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
@@ -702,7 +727,6 @@ config CGROUP_PERF
702 727
703menuconfig CGROUP_SCHED 728menuconfig CGROUP_SCHED
704 bool "Group CPU scheduler" 729 bool "Group CPU scheduler"
705 depends on EXPERIMENTAL
706 default n 730 default n
707 help 731 help
708 This feature lets CPU scheduler recognize task groups and control CPU 732 This feature lets CPU scheduler recognize task groups and control CPU
@@ -773,6 +797,17 @@ config DEBUG_BLK_CGROUP
773 797
774endif # CGROUPS 798endif # CGROUPS
775 799
800config CHECKPOINT_RESTORE
801 bool "Checkpoint/restore support" if EXPERT
802 default n
803 help
804 Enables additional kernel features in a sake of checkpoint/restore.
805 In particular it adds auxiliary prctl codes to setup process text,
806 data and heap segment sizes, and a few additional /proc filesystem
807 entries.
808
809 If unsure, say N here.
810
776menuconfig NAMESPACES 811menuconfig NAMESPACES
777 bool "Namespaces support" if EXPERT 812 bool "Namespaces support" if EXPERT
778 default !EXPERT 813 default !EXPERT
diff --git a/init/calibrate.c b/init/calibrate.c
index 24df7976816c..5f117ca9e069 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -246,6 +246,19 @@ recalibrate:
246 246
247static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 }; 247static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };
248 248
249/*
250 * Check if cpu calibration delay is already known. For example,
251 * some processors with multi-core sockets may have all cores
252 * with the same calibration delay.
253 *
254 * Architectures should override this function if a faster calibration
255 * method is available.
256 */
257unsigned long __attribute__((weak)) __cpuinit calibrate_delay_is_known(void)
258{
259 return 0;
260}
261
249void __cpuinit calibrate_delay(void) 262void __cpuinit calibrate_delay(void)
250{ 263{
251 unsigned long lpj; 264 unsigned long lpj;
@@ -265,6 +278,8 @@ void __cpuinit calibrate_delay(void)
265 lpj = lpj_fine; 278 lpj = lpj_fine;
266 pr_info("Calibrating delay loop (skipped), " 279 pr_info("Calibrating delay loop (skipped), "
267 "value calculated using timer frequency.. "); 280 "value calculated using timer frequency.. ");
281 } else if ((lpj = calibrate_delay_is_known())) {
282 ;
268 } else if ((lpj = calibrate_delay_direct()) != 0) { 283 } else if ((lpj = calibrate_delay_direct()) != 0) {
269 if (!printed) 284 if (!printed)
270 pr_info("Calibrating delay using timer " 285 pr_info("Calibrating delay using timer "
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0f6e1d985a3b..2974c8b3b351 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -325,17 +325,19 @@ static void __init get_fs_names(char *page)
325 325
326static int __init do_mount_root(char *name, char *fs, int flags, void *data) 326static int __init do_mount_root(char *name, char *fs, int flags, void *data)
327{ 327{
328 struct super_block *s;
328 int err = sys_mount(name, "/root", fs, flags, data); 329 int err = sys_mount(name, "/root", fs, flags, data);
329 if (err) 330 if (err)
330 return err; 331 return err;
331 332
332 sys_chdir((const char __user __force *)"/root"); 333 sys_chdir((const char __user __force *)"/root");
333 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; 334 s = current->fs->pwd.dentry->d_sb;
335 ROOT_DEV = s->s_dev;
334 printk(KERN_INFO 336 printk(KERN_INFO
335 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", 337 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
336 current->fs->pwd.mnt->mnt_sb->s_type->name, 338 s->s_type->name,
337 current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ? 339 s->s_flags & MS_RDONLY ? " readonly" : "",
338 " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); 340 MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
339 return 0; 341 return 0;
340} 342}
341 343
@@ -398,15 +400,42 @@ out:
398} 400}
399 401
400#ifdef CONFIG_ROOT_NFS 402#ifdef CONFIG_ROOT_NFS
403
404#define NFSROOT_TIMEOUT_MIN 5
405#define NFSROOT_TIMEOUT_MAX 30
406#define NFSROOT_RETRY_MAX 5
407
401static int __init mount_nfs_root(void) 408static int __init mount_nfs_root(void)
402{ 409{
403 char *root_dev, *root_data; 410 char *root_dev, *root_data;
411 unsigned int timeout;
412 int try, err;
404 413
405 if (nfs_root_data(&root_dev, &root_data) != 0) 414 err = nfs_root_data(&root_dev, &root_data);
406 return 0; 415 if (err != 0)
407 if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
408 return 0; 416 return 0;
409 return 1; 417
418 /*
419 * The server or network may not be ready, so try several
420 * times. Stop after a few tries in case the client wants
421 * to fall back to other boot methods.
422 */
423 timeout = NFSROOT_TIMEOUT_MIN;
424 for (try = 1; ; try++) {
425 err = do_mount_root(root_dev, "nfs",
426 root_mountflags, root_data);
427 if (err == 0)
428 return 1;
429 if (try > NFSROOT_RETRY_MAX)
430 break;
431
432 /* Wait, in case the server refused us immediately */
433 ssleep(timeout);
434 timeout <<= 1;
435 if (timeout > NFSROOT_TIMEOUT_MAX)
436 timeout = NFSROOT_TIMEOUT_MAX;
437 }
438 return 0;
410} 439}
411#endif 440#endif
412 441
diff --git a/init/initramfs.c b/init/initramfs.c
index 2531811d42cb..8216c303b082 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -22,7 +22,7 @@ static void __init error(char *x)
22 22
23static __initdata struct hash { 23static __initdata struct hash {
24 int ino, minor, major; 24 int ino, minor, major;
25 mode_t mode; 25 umode_t mode;
26 struct hash *next; 26 struct hash *next;
27 char name[N_ALIGN(PATH_MAX)]; 27 char name[N_ALIGN(PATH_MAX)];
28} *head[32]; 28} *head[32];
@@ -35,7 +35,7 @@ static inline int hash(int major, int minor, int ino)
35} 35}
36 36
37static char __init *find_link(int major, int minor, int ino, 37static char __init *find_link(int major, int minor, int ino,
38 mode_t mode, char *name) 38 umode_t mode, char *name)
39{ 39{
40 struct hash **p, *q; 40 struct hash **p, *q;
41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { 41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) {
@@ -120,7 +120,7 @@ static __initdata time_t mtime;
120/* cpio header parsing */ 120/* cpio header parsing */
121 121
122static __initdata unsigned long ino, major, minor, nlink; 122static __initdata unsigned long ino, major, minor, nlink;
123static __initdata mode_t mode; 123static __initdata umode_t mode;
124static __initdata unsigned long body_len, name_len; 124static __initdata unsigned long body_len, name_len;
125static __initdata uid_t uid; 125static __initdata uid_t uid;
126static __initdata gid_t gid; 126static __initdata gid_t gid;
@@ -276,7 +276,7 @@ static int __init maybe_link(void)
276 return 0; 276 return 0;
277} 277}
278 278
279static void __init clean_path(char *path, mode_t mode) 279static void __init clean_path(char *path, umode_t mode)
280{ 280{
281 struct stat st; 281 struct stat st;
282 282
diff --git a/init/main.c b/init/main.c
index 217ed23e9487..ff49a6dacfbb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -282,10 +282,6 @@ static int __init unknown_bootoption(char *param, char *val)
282 return 0; 282 return 0;
283} 283}
284 284
285#ifdef CONFIG_DEBUG_PAGEALLOC
286int __read_mostly debug_pagealloc_enabled = 0;
287#endif
288
289static int __init init_setup(char *str) 285static int __init init_setup(char *str)
290{ 286{
291 unsigned int i; 287 unsigned int i;
@@ -469,13 +465,12 @@ asmlinkage void __init start_kernel(void)
469 char * command_line; 465 char * command_line;
470 extern const struct kernel_param __start___param[], __stop___param[]; 466 extern const struct kernel_param __start___param[], __stop___param[];
471 467
472 smp_setup_processor_id();
473
474 /* 468 /*
475 * Need to run as early as possible, to initialize the 469 * Need to run as early as possible, to initialize the
476 * lockdep hash: 470 * lockdep hash:
477 */ 471 */
478 lockdep_init(); 472 lockdep_init();
473 smp_setup_processor_id();
479 debug_objects_early_init(); 474 debug_objects_early_init();
480 475
481 /* 476 /*
@@ -597,7 +592,6 @@ asmlinkage void __init start_kernel(void)
597 } 592 }
598#endif 593#endif
599 page_cgroup_init(); 594 page_cgroup_init();
600 enable_debug_pagealloc();
601 debug_objects_mem_init(); 595 debug_objects_mem_init();
602 kmemleak_init(); 596 kmemleak_init();
603 setup_per_cpu_pageset(); 597 setup_per_cpu_pageset();
@@ -654,7 +648,7 @@ static void __init do_ctors(void)
654#endif 648#endif
655} 649}
656 650
657int initcall_debug; 651bool initcall_debug;
658core_param(initcall_debug, initcall_debug, bool, 0644); 652core_param(initcall_debug, initcall_debug, bool, 0644);
659 653
660static char msgbuf[64]; 654static char msgbuf[64];