diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 44 | ||||
-rw-r--r-- | init/do_mounts.c | 13 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 3 | ||||
-rw-r--r-- | init/do_mounts_md.c | 8 | ||||
-rw-r--r-- | init/main.c | 6 | ||||
-rw-r--r-- | init/version.c | 23 |
6 files changed, 67 insertions, 30 deletions
diff --git a/init/Kconfig b/init/Kconfig index 4381006dd6..10382931ee 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -92,7 +92,7 @@ config LOCALVERSION_AUTO | |||
92 | 92 | ||
93 | config SWAP | 93 | config SWAP |
94 | bool "Support for paging of anonymous memory (swap)" | 94 | bool "Support for paging of anonymous memory (swap)" |
95 | depends on MMU | 95 | depends on MMU && BLOCK |
96 | default y | 96 | default y |
97 | help | 97 | help |
98 | This option allows you to choose whether you want to have support | 98 | This option allows you to choose whether you want to have support |
@@ -115,6 +115,15 @@ config SYSVIPC | |||
115 | section 6.4 of the Linux Programmer's Guide, available from | 115 | section 6.4 of the Linux Programmer's Guide, available from |
116 | <http://www.tldp.org/guides.html>. | 116 | <http://www.tldp.org/guides.html>. |
117 | 117 | ||
118 | config IPC_NS | ||
119 | bool "IPC Namespaces" | ||
120 | depends on SYSVIPC | ||
121 | default n | ||
122 | help | ||
123 | Support ipc namespaces. This allows containers, i.e. virtual | ||
124 | environments, to use ipc namespaces to provide different ipc | ||
125 | objects for different servers. If unsure, say N. | ||
126 | |||
118 | config POSIX_MQUEUE | 127 | config POSIX_MQUEUE |
119 | bool "POSIX Message Queues" | 128 | bool "POSIX Message Queues" |
120 | depends on NET && EXPERIMENTAL | 129 | depends on NET && EXPERIMENTAL |
@@ -182,6 +191,14 @@ config TASK_DELAY_ACCT | |||
182 | 191 | ||
183 | Say N if unsure. | 192 | Say N if unsure. |
184 | 193 | ||
194 | config UTS_NS | ||
195 | bool "UTS Namespaces" | ||
196 | default n | ||
197 | help | ||
198 | Support uts namespaces. This allows containers, i.e. | ||
199 | vservers, to use uts namespaces to provide different | ||
200 | uts info for different servers. If unsure, say N. | ||
201 | |||
185 | config AUDIT | 202 | config AUDIT |
186 | bool "Auditing support" | 203 | bool "Auditing support" |
187 | depends on NET | 204 | depends on NET |
@@ -202,7 +219,7 @@ config AUDITSYSCALL | |||
202 | ensure that INOTIFY is configured. | 219 | ensure that INOTIFY is configured. |
203 | 220 | ||
204 | config IKCONFIG | 221 | config IKCONFIG |
205 | bool "Kernel .config support" | 222 | tristate "Kernel .config support" |
206 | ---help--- | 223 | ---help--- |
207 | This option enables the complete Linux kernel ".config" file | 224 | This option enables the complete Linux kernel ".config" file |
208 | contents to be saved in the kernel. It provides documentation | 225 | contents to be saved in the kernel. It provides documentation |
@@ -257,6 +274,18 @@ config CC_OPTIMIZE_FOR_SIZE | |||
257 | 274 | ||
258 | If unsure, say N. | 275 | If unsure, say N. |
259 | 276 | ||
277 | config TASK_XACCT | ||
278 | bool "Enable extended accounting over taskstats (EXPERIMENTAL)" | ||
279 | depends on TASKSTATS | ||
280 | help | ||
281 | Collect extended task accounting data and send the data | ||
282 | to userland for processing over the taskstats interface. | ||
283 | |||
284 | Say N if unsure. | ||
285 | |||
286 | config SYSCTL | ||
287 | bool | ||
288 | |||
260 | menuconfig EMBEDDED | 289 | menuconfig EMBEDDED |
261 | bool "Configure standard kernel features (for small systems)" | 290 | bool "Configure standard kernel features (for small systems)" |
262 | help | 291 | help |
@@ -272,11 +301,8 @@ config UID16 | |||
272 | help | 301 | help |
273 | This enables the legacy 16-bit UID syscall wrappers. | 302 | This enables the legacy 16-bit UID syscall wrappers. |
274 | 303 | ||
275 | config SYSCTL | ||
276 | bool | ||
277 | |||
278 | config SYSCTL_SYSCALL | 304 | config SYSCTL_SYSCALL |
279 | bool "Sysctl syscall support" | 305 | bool "Sysctl syscall support" if EMBEDDED |
280 | default n | 306 | default n |
281 | select SYSCTL | 307 | select SYSCTL |
282 | ---help--- | 308 | ---help--- |
@@ -285,11 +311,11 @@ config SYSCTL_SYSCALL | |||
285 | and use. The interface in /proc/sys is now the primary and what | 311 | and use. The interface in /proc/sys is now the primary and what |
286 | everyone uses. | 312 | everyone uses. |
287 | 313 | ||
288 | Nothing has been using the binary sysctl interface for some time | 314 | Nothing has been using the binary sysctl interface for some |
289 | time now so nothing should break if you disable sysctl syscall | 315 | time now so nothing should break if you disable sysctl syscall |
290 | support, and you kernel will get marginally smaller. | 316 | support, and your kernel will get marginally smaller. |
291 | 317 | ||
292 | Unless you have an application that uses the sys_syscall interface | 318 | Unless you have an application that uses the sys_sysctl interface |
293 | you should probably say N here. | 319 | you should probably say N here. |
294 | 320 | ||
295 | config KALLSYMS | 321 | config KALLSYMS |
diff --git a/init/do_mounts.c b/init/do_mounts.c index b290aadb1d..dc1ec0803e 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -285,7 +285,11 @@ void __init mount_block_root(char *name, int flags) | |||
285 | { | 285 | { |
286 | char *fs_names = __getname(); | 286 | char *fs_names = __getname(); |
287 | char *p; | 287 | char *p; |
288 | #ifdef CONFIG_BLOCK | ||
288 | char b[BDEVNAME_SIZE]; | 289 | char b[BDEVNAME_SIZE]; |
290 | #else | ||
291 | const char *b = name; | ||
292 | #endif | ||
289 | 293 | ||
290 | get_fs_names(fs_names); | 294 | get_fs_names(fs_names); |
291 | retry: | 295 | retry: |
@@ -304,7 +308,9 @@ retry: | |||
304 | * Allow the user to distinguish between failed sys_open | 308 | * Allow the user to distinguish between failed sys_open |
305 | * and bad superblock on root device. | 309 | * and bad superblock on root device. |
306 | */ | 310 | */ |
311 | #ifdef CONFIG_BLOCK | ||
307 | __bdevname(ROOT_DEV, b); | 312 | __bdevname(ROOT_DEV, b); |
313 | #endif | ||
308 | printk("VFS: Cannot open root device \"%s\" or %s\n", | 314 | printk("VFS: Cannot open root device \"%s\" or %s\n", |
309 | root_device_name, b); | 315 | root_device_name, b); |
310 | printk("Please append a correct \"root=\" boot option\n"); | 316 | printk("Please append a correct \"root=\" boot option\n"); |
@@ -316,7 +322,10 @@ retry: | |||
316 | for (p = fs_names; *p; p += strlen(p)+1) | 322 | for (p = fs_names; *p; p += strlen(p)+1) |
317 | printk(" %s", p); | 323 | printk(" %s", p); |
318 | printk("\n"); | 324 | printk("\n"); |
319 | panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b)); | 325 | #ifdef CONFIG_BLOCK |
326 | __bdevname(ROOT_DEV, b); | ||
327 | #endif | ||
328 | panic("VFS: Unable to mount root fs on %s", b); | ||
320 | out: | 329 | out: |
321 | putname(fs_names); | 330 | putname(fs_names); |
322 | } | 331 | } |
@@ -387,8 +396,10 @@ void __init mount_root(void) | |||
387 | change_floppy("root floppy"); | 396 | change_floppy("root floppy"); |
388 | } | 397 | } |
389 | #endif | 398 | #endif |
399 | #ifdef CONFIG_BLOCK | ||
390 | create_dev("/dev/root", ROOT_DEV); | 400 | create_dev("/dev/root", ROOT_DEV); |
391 | mount_block_root("/dev/root", root_mountflags); | 401 | mount_block_root("/dev/root", root_mountflags); |
402 | #endif | ||
392 | } | 403 | } |
393 | 404 | ||
394 | /* | 405 | /* |
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index a06f037fa0..919a80cb32 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #define __KERNEL_SYSCALLS__ | ||
2 | #include <linux/unistd.h> | 1 | #include <linux/unistd.h> |
3 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
4 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
@@ -35,7 +34,7 @@ static int __init do_linuxrc(void * shell) | |||
35 | (void) sys_open("/dev/console",O_RDWR,0); | 34 | (void) sys_open("/dev/console",O_RDWR,0); |
36 | (void) sys_dup(0); | 35 | (void) sys_dup(0); |
37 | (void) sys_dup(0); | 36 | (void) sys_dup(0); |
38 | return execve(shell, argv, envp_init); | 37 | return kernel_execve(shell, argv, envp_init); |
39 | } | 38 | } |
40 | 39 | ||
41 | static void __init handle_initrd(void) | 40 | static void __init handle_initrd(void) |
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 2429e1bf8c..753dc54a66 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c | |||
@@ -20,7 +20,7 @@ static struct { | |||
20 | int level; | 20 | int level; |
21 | int chunk; | 21 | int chunk; |
22 | char *device_names; | 22 | char *device_names; |
23 | } md_setup_args[MAX_MD_DEVS] __initdata; | 23 | } md_setup_args[256] __initdata; |
24 | 24 | ||
25 | static int md_setup_ents __initdata; | 25 | static int md_setup_ents __initdata; |
26 | 26 | ||
@@ -61,10 +61,6 @@ static int __init md_setup(char *str) | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | str1 = str; | 63 | str1 = str; |
64 | if (minor >= MAX_MD_DEVS) { | ||
65 | printk(KERN_WARNING "md: md=%d, Minor device number too high.\n", minor); | ||
66 | return 0; | ||
67 | } | ||
68 | for (ent=0 ; ent< md_setup_ents ; ent++) | 64 | for (ent=0 ; ent< md_setup_ents ; ent++) |
69 | if (md_setup_args[ent].minor == minor && | 65 | if (md_setup_args[ent].minor == minor && |
70 | md_setup_args[ent].partitioned == partitioned) { | 66 | md_setup_args[ent].partitioned == partitioned) { |
@@ -72,7 +68,7 @@ static int __init md_setup(char *str) | |||
72 | "Replacing previous definition.\n", partitioned?"d":"", minor); | 68 | "Replacing previous definition.\n", partitioned?"d":"", minor); |
73 | break; | 69 | break; |
74 | } | 70 | } |
75 | if (ent >= MAX_MD_DEVS) { | 71 | if (ent >= ARRAY_SIZE(md_setup_args)) { |
76 | printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); | 72 | printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); |
77 | return 0; | 73 | return 0; |
78 | } | 74 | } |
diff --git a/init/main.c b/init/main.c index 0766e69712..ee123243fb 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -9,8 +9,6 @@ | |||
9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> | 9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define __KERNEL_SYSCALLS__ | ||
13 | |||
14 | #include <linux/types.h> | 12 | #include <linux/types.h> |
15 | #include <linux/module.h> | 13 | #include <linux/module.h> |
16 | #include <linux/proc_fs.h> | 14 | #include <linux/proc_fs.h> |
@@ -703,7 +701,7 @@ static void do_pre_smp_initcalls(void) | |||
703 | static void run_init_process(char *init_filename) | 701 | static void run_init_process(char *init_filename) |
704 | { | 702 | { |
705 | argv_init[0] = init_filename; | 703 | argv_init[0] = init_filename; |
706 | execve(init_filename, argv_init, envp_init); | 704 | kernel_execve(init_filename, argv_init, envp_init); |
707 | } | 705 | } |
708 | 706 | ||
709 | static int init(void * unused) | 707 | static int init(void * unused) |
@@ -723,6 +721,8 @@ static int init(void * unused) | |||
723 | */ | 721 | */ |
724 | child_reaper = current; | 722 | child_reaper = current; |
725 | 723 | ||
724 | cad_pid = task_pid(current); | ||
725 | |||
726 | smp_prepare_cpus(max_cpus); | 726 | smp_prepare_cpus(max_cpus); |
727 | 727 | ||
728 | do_pre_smp_initcalls(); | 728 | do_pre_smp_initcalls(); |
diff --git a/init/version.c b/init/version.c index e290802c6b..8f28344d9c 100644 --- a/init/version.c +++ b/init/version.c | |||
@@ -12,22 +12,27 @@ | |||
12 | #include <linux/utsname.h> | 12 | #include <linux/utsname.h> |
13 | #include <linux/utsrelease.h> | 13 | #include <linux/utsrelease.h> |
14 | #include <linux/version.h> | 14 | #include <linux/version.h> |
15 | #include <linux/sched.h> | ||
15 | 16 | ||
16 | #define version(a) Version_ ## a | 17 | #define version(a) Version_ ## a |
17 | #define version_string(a) version(a) | 18 | #define version_string(a) version(a) |
18 | 19 | ||
19 | int version_string(LINUX_VERSION_CODE); | 20 | int version_string(LINUX_VERSION_CODE); |
20 | 21 | ||
21 | struct new_utsname system_utsname = { | 22 | struct uts_namespace init_uts_ns = { |
22 | .sysname = UTS_SYSNAME, | 23 | .kref = { |
23 | .nodename = UTS_NODENAME, | 24 | .refcount = ATOMIC_INIT(2), |
24 | .release = UTS_RELEASE, | 25 | }, |
25 | .version = UTS_VERSION, | 26 | .name = { |
26 | .machine = UTS_MACHINE, | 27 | .sysname = UTS_SYSNAME, |
27 | .domainname = UTS_DOMAINNAME, | 28 | .nodename = UTS_NODENAME, |
29 | .release = UTS_RELEASE, | ||
30 | .version = UTS_VERSION, | ||
31 | .machine = UTS_MACHINE, | ||
32 | .domainname = UTS_DOMAINNAME, | ||
33 | }, | ||
28 | }; | 34 | }; |
29 | 35 | EXPORT_SYMBOL_GPL(init_uts_ns); | |
30 | EXPORT_SYMBOL(system_utsname); | ||
31 | 36 | ||
32 | const char linux_banner[] = | 37 | const char linux_banner[] = |
33 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" | 38 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" |