diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 198 | ||||
-rw-r--r-- | init/Makefile | 4 | ||||
-rw-r--r-- | init/do_mounts.c | 2 | ||||
-rw-r--r-- | init/init_task.c | 24 | ||||
-rw-r--r-- | init/main.c | 40 |
5 files changed, 232 insertions, 36 deletions
diff --git a/init/Kconfig b/init/Kconfig index 038e2592664e..1e004d057468 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -27,6 +27,9 @@ config IRQ_WORK | |||
27 | bool | 27 | bool |
28 | depends on HAVE_IRQ_WORK | 28 | depends on HAVE_IRQ_WORK |
29 | 29 | ||
30 | config BUILDTIME_EXTABLE_SORT | ||
31 | bool | ||
32 | |||
30 | menu "General setup" | 33 | menu "General setup" |
31 | 34 | ||
32 | config EXPERIMENTAL | 35 | config EXPERIMENTAL |
@@ -387,6 +390,7 @@ config AUDIT_LOGINUID_IMMUTABLE | |||
387 | but may not be backwards compatible with older init systems. | 390 | but may not be backwards compatible with older init systems. |
388 | 391 | ||
389 | source "kernel/irq/Kconfig" | 392 | source "kernel/irq/Kconfig" |
393 | source "kernel/time/Kconfig" | ||
390 | 394 | ||
391 | menu "RCU Subsystem" | 395 | menu "RCU Subsystem" |
392 | 396 | ||
@@ -458,6 +462,33 @@ config RCU_FANOUT | |||
458 | Select a specific number if testing RCU itself. | 462 | Select a specific number if testing RCU itself. |
459 | Take the default if unsure. | 463 | Take the default if unsure. |
460 | 464 | ||
465 | config RCU_FANOUT_LEAF | ||
466 | int "Tree-based hierarchical RCU leaf-level fanout value" | ||
467 | range 2 RCU_FANOUT if 64BIT | ||
468 | range 2 RCU_FANOUT if !64BIT | ||
469 | depends on TREE_RCU || TREE_PREEMPT_RCU | ||
470 | default 16 | ||
471 | help | ||
472 | This option controls the leaf-level fanout of hierarchical | ||
473 | implementations of RCU, and allows trading off cache misses | ||
474 | against lock contention. Systems that synchronize their | ||
475 | scheduling-clock interrupts for energy-efficiency reasons will | ||
476 | want the default because the smaller leaf-level fanout keeps | ||
477 | lock contention levels acceptably low. Very large systems | ||
478 | (hundreds or thousands of CPUs) will instead want to set this | ||
479 | value to the maximum value possible in order to reduce the | ||
480 | number of cache misses incurred during RCU's grace-period | ||
481 | initialization. These systems tend to run CPU-bound, and thus | ||
482 | are not helped by synchronized interrupts, and thus tend to | ||
483 | skew them, which reduces lock contention enough that large | ||
484 | leaf-level fanouts work well. | ||
485 | |||
486 | Select a specific number if testing RCU itself. | ||
487 | |||
488 | Select the maximum permissible value for large systems. | ||
489 | |||
490 | Take the default if unsure. | ||
491 | |||
461 | config RCU_FANOUT_EXACT | 492 | config RCU_FANOUT_EXACT |
462 | bool "Disable tree-based hierarchical RCU auto-balancing" | 493 | bool "Disable tree-based hierarchical RCU auto-balancing" |
463 | depends on TREE_RCU || TREE_PREEMPT_RCU | 494 | depends on TREE_RCU || TREE_PREEMPT_RCU |
@@ -515,10 +546,25 @@ config RCU_BOOST_PRIO | |||
515 | depends on RCU_BOOST | 546 | depends on RCU_BOOST |
516 | default 1 | 547 | default 1 |
517 | help | 548 | help |
518 | This option specifies the real-time priority to which preempted | 549 | This option specifies the real-time priority to which long-term |
519 | RCU readers are to be boosted. If you are working with CPU-bound | 550 | preempted RCU readers are to be boosted. If you are working |
520 | real-time applications, you should specify a priority higher then | 551 | with a real-time application that has one or more CPU-bound |
521 | the highest-priority CPU-bound application. | 552 | threads running at a real-time priority level, you should set |
553 | RCU_BOOST_PRIO to a priority higher then the highest-priority | ||
554 | real-time CPU-bound thread. The default RCU_BOOST_PRIO value | ||
555 | of 1 is appropriate in the common case, which is real-time | ||
556 | applications that do not have any CPU-bound threads. | ||
557 | |||
558 | Some real-time applications might not have a single real-time | ||
559 | thread that saturates a given CPU, but instead might have | ||
560 | multiple real-time threads that, taken together, fully utilize | ||
561 | that CPU. In this case, you should set RCU_BOOST_PRIO to | ||
562 | a priority higher than the lowest-priority thread that is | ||
563 | conspiring to prevent the CPU from running any non-real-time | ||
564 | tasks. For example, if one thread at priority 10 and another | ||
565 | thread at priority 5 are between themselves fully consuming | ||
566 | the CPU time on a given CPU, then RCU_BOOST_PRIO should be | ||
567 | set to priority 6 or higher. | ||
522 | 568 | ||
523 | Specify the real-time priority, or take the default if unsure. | 569 | Specify the real-time priority, or take the default if unsure. |
524 | 570 | ||
@@ -828,7 +874,10 @@ config IPC_NS | |||
828 | config USER_NS | 874 | config USER_NS |
829 | bool "User namespace (EXPERIMENTAL)" | 875 | bool "User namespace (EXPERIMENTAL)" |
830 | depends on EXPERIMENTAL | 876 | depends on EXPERIMENTAL |
831 | default y | 877 | depends on UIDGID_CONVERTED |
878 | select UIDGID_STRICT_TYPE_CHECKS | ||
879 | |||
880 | default n | ||
832 | help | 881 | help |
833 | This allows containers, i.e. vservers, to use user namespaces | 882 | This allows containers, i.e. vservers, to use user namespaces |
834 | to provide different user info for different servers. | 883 | to provide different user info for different servers. |
@@ -852,6 +901,131 @@ config NET_NS | |||
852 | 901 | ||
853 | endif # NAMESPACES | 902 | endif # NAMESPACES |
854 | 903 | ||
904 | config UIDGID_CONVERTED | ||
905 | # True if all of the selected software conmponents are known | ||
906 | # to have uid_t and gid_t converted to kuid_t and kgid_t | ||
907 | # where appropriate and are otherwise safe to use with | ||
908 | # the user namespace. | ||
909 | bool | ||
910 | default y | ||
911 | |||
912 | # List of kernel pieces that need user namespace work | ||
913 | # Features | ||
914 | depends on SYSVIPC = n | ||
915 | depends on IMA = n | ||
916 | depends on EVM = n | ||
917 | depends on KEYS = n | ||
918 | depends on AUDIT = n | ||
919 | depends on AUDITSYSCALL = n | ||
920 | depends on TASKSTATS = n | ||
921 | depends on TRACING = n | ||
922 | depends on FS_POSIX_ACL = n | ||
923 | depends on QUOTA = n | ||
924 | depends on QUOTACTL = n | ||
925 | depends on DEBUG_CREDENTIALS = n | ||
926 | depends on BSD_PROCESS_ACCT = n | ||
927 | depends on DRM = n | ||
928 | depends on PROC_EVENTS = n | ||
929 | |||
930 | # Networking | ||
931 | depends on NET = n | ||
932 | depends on NET_9P = n | ||
933 | depends on IPX = n | ||
934 | depends on PHONET = n | ||
935 | depends on NET_CLS_FLOW = n | ||
936 | depends on NETFILTER_XT_MATCH_OWNER = n | ||
937 | depends on NETFILTER_XT_MATCH_RECENT = n | ||
938 | depends on NETFILTER_XT_TARGET_LOG = n | ||
939 | depends on NETFILTER_NETLINK_LOG = n | ||
940 | depends on INET = n | ||
941 | depends on IPV6 = n | ||
942 | depends on IP_SCTP = n | ||
943 | depends on AF_RXRPC = n | ||
944 | depends on LLC2 = n | ||
945 | depends on NET_KEY = n | ||
946 | depends on INET_DIAG = n | ||
947 | depends on DNS_RESOLVER = n | ||
948 | depends on AX25 = n | ||
949 | depends on ATALK = n | ||
950 | |||
951 | # Filesystems | ||
952 | depends on USB_DEVICEFS = n | ||
953 | depends on USB_GADGETFS = n | ||
954 | depends on USB_FUNCTIONFS = n | ||
955 | depends on DEVTMPFS = n | ||
956 | depends on XENFS = n | ||
957 | |||
958 | depends on 9P_FS = n | ||
959 | depends on ADFS_FS = n | ||
960 | depends on AFFS_FS = n | ||
961 | depends on AFS_FS = n | ||
962 | depends on AUTOFS4_FS = n | ||
963 | depends on BEFS_FS = n | ||
964 | depends on BFS_FS = n | ||
965 | depends on BTRFS_FS = n | ||
966 | depends on CEPH_FS = n | ||
967 | depends on CIFS = n | ||
968 | depends on CODA_FS = n | ||
969 | depends on CONFIGFS_FS = n | ||
970 | depends on CRAMFS = n | ||
971 | depends on DEBUG_FS = n | ||
972 | depends on ECRYPT_FS = n | ||
973 | depends on EFS_FS = n | ||
974 | depends on EXOFS_FS = n | ||
975 | depends on FAT_FS = n | ||
976 | depends on FUSE_FS = n | ||
977 | depends on GFS2_FS = n | ||
978 | depends on HFS_FS = n | ||
979 | depends on HFSPLUS_FS = n | ||
980 | depends on HPFS_FS = n | ||
981 | depends on HUGETLBFS = n | ||
982 | depends on ISO9660_FS = n | ||
983 | depends on JFFS2_FS = n | ||
984 | depends on JFS_FS = n | ||
985 | depends on LOGFS = n | ||
986 | depends on MINIX_FS = n | ||
987 | depends on NCP_FS = n | ||
988 | depends on NFSD = n | ||
989 | depends on NFS_FS = n | ||
990 | depends on NILFS2_FS = n | ||
991 | depends on NTFS_FS = n | ||
992 | depends on OCFS2_FS = n | ||
993 | depends on OMFS_FS = n | ||
994 | depends on QNX4FS_FS = n | ||
995 | depends on QNX6FS_FS = n | ||
996 | depends on REISERFS_FS = n | ||
997 | depends on SQUASHFS = n | ||
998 | depends on SYSV_FS = n | ||
999 | depends on UBIFS_FS = n | ||
1000 | depends on UDF_FS = n | ||
1001 | depends on UFS_FS = n | ||
1002 | depends on VXFS_FS = n | ||
1003 | depends on XFS_FS = n | ||
1004 | |||
1005 | depends on !UML || HOSTFS = n | ||
1006 | |||
1007 | # The rare drivers that won't build | ||
1008 | depends on AIRO = n | ||
1009 | depends on AIRO_CS = n | ||
1010 | depends on TUN = n | ||
1011 | depends on INFINIBAND_QIB = n | ||
1012 | depends on BLK_DEV_LOOP = n | ||
1013 | depends on ANDROID_BINDER_IPC = n | ||
1014 | |||
1015 | # Security modules | ||
1016 | depends on SECURITY_TOMOYO = n | ||
1017 | depends on SECURITY_APPARMOR = n | ||
1018 | |||
1019 | config UIDGID_STRICT_TYPE_CHECKS | ||
1020 | bool "Require conversions between uid/gids and their internal representation" | ||
1021 | depends on UIDGID_CONVERTED | ||
1022 | default n | ||
1023 | help | ||
1024 | While the nececessary conversions are being added to all subsystems this option allows | ||
1025 | the code to continue to build for unconverted subsystems. | ||
1026 | |||
1027 | Say Y here if you want the strict type checking enabled | ||
1028 | |||
855 | config SCHED_AUTOGROUP | 1029 | config SCHED_AUTOGROUP |
856 | bool "Automatic process group scheduling" | 1030 | bool "Automatic process group scheduling" |
857 | select EVENTFD | 1031 | select EVENTFD |
@@ -1156,7 +1330,7 @@ menu "Kernel Performance Events And Counters" | |||
1156 | 1330 | ||
1157 | config PERF_EVENTS | 1331 | config PERF_EVENTS |
1158 | bool "Kernel performance events and counters" | 1332 | bool "Kernel performance events and counters" |
1159 | default y if (PROFILING || PERF_COUNTERS) | 1333 | default y if PROFILING |
1160 | depends on HAVE_PERF_EVENTS | 1334 | depends on HAVE_PERF_EVENTS |
1161 | select ANON_INODES | 1335 | select ANON_INODES |
1162 | select IRQ_WORK | 1336 | select IRQ_WORK |
@@ -1183,18 +1357,6 @@ config PERF_EVENTS | |||
1183 | 1357 | ||
1184 | Say Y if unsure. | 1358 | Say Y if unsure. |
1185 | 1359 | ||
1186 | config PERF_COUNTERS | ||
1187 | bool "Kernel performance counters (old config option)" | ||
1188 | depends on HAVE_PERF_EVENTS | ||
1189 | help | ||
1190 | This config has been obsoleted by the PERF_EVENTS | ||
1191 | config option - please see that one for details. | ||
1192 | |||
1193 | It has no effect on the kernel whether you enable | ||
1194 | it or not, it is a compatibility placeholder. | ||
1195 | |||
1196 | Say N if unsure. | ||
1197 | |||
1198 | config DEBUG_PERF_USE_VMALLOC | 1360 | config DEBUG_PERF_USE_VMALLOC |
1199 | default n | 1361 | default n |
1200 | bool "Debug: use vmalloc to back perf mmap() buffers" | 1362 | bool "Debug: use vmalloc to back perf mmap() buffers" |
diff --git a/init/Makefile b/init/Makefile index 0bf677aa0872..7bc47ee31c36 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -10,6 +10,10 @@ obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o | |||
10 | endif | 10 | endif |
11 | obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o | 11 | obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o |
12 | 12 | ||
13 | ifneq ($(CONFIG_ARCH_INIT_TASK),y) | ||
14 | obj-y += init_task.o | ||
15 | endif | ||
16 | |||
13 | mounts-y := do_mounts.o | 17 | mounts-y := do_mounts.o |
14 | mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o | 18 | mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o |
15 | mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o | 19 | mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 0e93f92a0345..42b0707c3481 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -472,7 +472,7 @@ void __init change_floppy(char *fmt, ...) | |||
472 | void __init mount_root(void) | 472 | void __init mount_root(void) |
473 | { | 473 | { |
474 | #ifdef CONFIG_ROOT_NFS | 474 | #ifdef CONFIG_ROOT_NFS |
475 | if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) { | 475 | if (ROOT_DEV == Root_NFS) { |
476 | if (mount_nfs_root()) | 476 | if (mount_nfs_root()) |
477 | return; | 477 | return; |
478 | 478 | ||
diff --git a/init/init_task.c b/init/init_task.c new file mode 100644 index 000000000000..8b2f3996b035 --- /dev/null +++ b/init/init_task.c | |||
@@ -0,0 +1,24 @@ | |||
1 | #include <linux/init_task.h> | ||
2 | #include <linux/export.h> | ||
3 | #include <linux/mqueue.h> | ||
4 | #include <linux/sched.h> | ||
5 | #include <linux/init.h> | ||
6 | #include <linux/fs.h> | ||
7 | #include <linux/mm.h> | ||
8 | |||
9 | #include <asm/pgtable.h> | ||
10 | #include <asm/uaccess.h> | ||
11 | |||
12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
14 | |||
15 | /* Initial task structure */ | ||
16 | struct task_struct init_task = INIT_TASK(init_task); | ||
17 | EXPORT_SYMBOL(init_task); | ||
18 | |||
19 | /* | ||
20 | * Initial thread structure. Alignment of this is handled by a special | ||
21 | * linker map entry. | ||
22 | */ | ||
23 | union thread_union init_thread_union __init_task_data = | ||
24 | { INIT_THREAD_INFO(init_task) }; | ||
diff --git a/init/main.c b/init/main.c index 44b2433334c7..1ca6b32c4828 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -226,7 +226,7 @@ static int __init loglevel(char *str) | |||
226 | early_param("loglevel", loglevel); | 226 | early_param("loglevel", loglevel); |
227 | 227 | ||
228 | /* Change NUL term back to "=", to make "param" the whole string. */ | 228 | /* Change NUL term back to "=", to make "param" the whole string. */ |
229 | static int __init repair_env_string(char *param, char *val) | 229 | static int __init repair_env_string(char *param, char *val, const char *unused) |
230 | { | 230 | { |
231 | if (val) { | 231 | if (val) { |
232 | /* param=val or param="val"? */ | 232 | /* param=val or param="val"? */ |
@@ -246,9 +246,9 @@ static int __init repair_env_string(char *param, char *val) | |||
246 | * Unknown boot options get handed to init, unless they look like | 246 | * Unknown boot options get handed to init, unless they look like |
247 | * unused parameters (modprobe will find them in /proc/cmdline). | 247 | * unused parameters (modprobe will find them in /proc/cmdline). |
248 | */ | 248 | */ |
249 | static int __init unknown_bootoption(char *param, char *val) | 249 | static int __init unknown_bootoption(char *param, char *val, const char *unused) |
250 | { | 250 | { |
251 | repair_env_string(param, val); | 251 | repair_env_string(param, val, unused); |
252 | 252 | ||
253 | /* Handle obsolete-style parameters */ | 253 | /* Handle obsolete-style parameters */ |
254 | if (obsolete_checksetup(param)) | 254 | if (obsolete_checksetup(param)) |
@@ -385,7 +385,7 @@ static noinline void __init_refok rest_init(void) | |||
385 | } | 385 | } |
386 | 386 | ||
387 | /* Check for early params. */ | 387 | /* Check for early params. */ |
388 | static int __init do_early_param(char *param, char *val) | 388 | static int __init do_early_param(char *param, char *val, const char *unused) |
389 | { | 389 | { |
390 | const struct obs_kernel_param *p; | 390 | const struct obs_kernel_param *p; |
391 | 391 | ||
@@ -560,9 +560,6 @@ asmlinkage void __init start_kernel(void) | |||
560 | early_boot_irqs_disabled = false; | 560 | early_boot_irqs_disabled = false; |
561 | local_irq_enable(); | 561 | local_irq_enable(); |
562 | 562 | ||
563 | /* Interrupts are enabled now so all GFP allocations are safe. */ | ||
564 | gfp_allowed_mask = __GFP_BITS_MASK; | ||
565 | |||
566 | kmem_cache_init_late(); | 563 | kmem_cache_init_late(); |
567 | 564 | ||
568 | /* | 565 | /* |
@@ -728,14 +725,14 @@ static initcall_t *initcall_levels[] __initdata = { | |||
728 | }; | 725 | }; |
729 | 726 | ||
730 | static char *initcall_level_names[] __initdata = { | 727 | static char *initcall_level_names[] __initdata = { |
731 | "early parameters", | 728 | "early", |
732 | "core parameters", | 729 | "core", |
733 | "postcore parameters", | 730 | "postcore", |
734 | "arch parameters", | 731 | "arch", |
735 | "subsys parameters", | 732 | "subsys", |
736 | "fs parameters", | 733 | "fs", |
737 | "device parameters", | 734 | "device", |
738 | "late parameters", | 735 | "late", |
739 | }; | 736 | }; |
740 | 737 | ||
741 | static void __init do_initcall_level(int level) | 738 | static void __init do_initcall_level(int level) |
@@ -748,7 +745,7 @@ static void __init do_initcall_level(int level) | |||
748 | static_command_line, __start___param, | 745 | static_command_line, __start___param, |
749 | __stop___param - __start___param, | 746 | __stop___param - __start___param, |
750 | level, level, | 747 | level, level, |
751 | repair_env_string); | 748 | &repair_env_string); |
752 | 749 | ||
753 | for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) | 750 | for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) |
754 | do_one_initcall(*fn); | 751 | do_one_initcall(*fn); |
@@ -758,8 +755,13 @@ static void __init do_initcalls(void) | |||
758 | { | 755 | { |
759 | int level; | 756 | int level; |
760 | 757 | ||
761 | for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) | 758 | for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) { |
759 | pr_info("initlevel:%d=%s, %d registered initcalls\n", | ||
760 | level, initcall_level_names[level], | ||
761 | (int) (initcall_levels[level+1] | ||
762 | - initcall_levels[level])); | ||
762 | do_initcall_level(level); | 763 | do_initcall_level(level); |
764 | } | ||
763 | } | 765 | } |
764 | 766 | ||
765 | /* | 767 | /* |
@@ -842,6 +844,10 @@ static int __init kernel_init(void * unused) | |||
842 | * Wait until kthreadd is all set-up. | 844 | * Wait until kthreadd is all set-up. |
843 | */ | 845 | */ |
844 | wait_for_completion(&kthreadd_done); | 846 | wait_for_completion(&kthreadd_done); |
847 | |||
848 | /* Now the scheduler is fully set up and can do blocking allocations */ | ||
849 | gfp_allowed_mask = __GFP_BITS_MASK; | ||
850 | |||
845 | /* | 851 | /* |
846 | * init can allocate pages on any node | 852 | * init can allocate pages on any node |
847 | */ | 853 | */ |