aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig22
-rw-r--r--init/main.c18
2 files changed, 31 insertions, 9 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 54c655ce9c04..a23da9f01803 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1079,6 +1079,28 @@ config SLOB
1079 1079
1080endchoice 1080endchoice
1081 1081
1082config MMAP_ALLOW_UNINITIALIZED
1083 bool "Allow mmapped anonymous memory to be uninitialized"
1084 depends on EMBEDDED && !MMU
1085 default n
1086 help
1087 Normally, and according to the Linux spec, anonymous memory obtained
1088 from mmap() has it's contents cleared before it is passed to
1089 userspace. Enabling this config option allows you to request that
1090 mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
1091 providing a huge performance boost. If this option is not enabled,
1092 then the flag will be ignored.
1093
1094 This is taken advantage of by uClibc's malloc(), and also by
1095 ELF-FDPIC binfmt's brk and stack allocator.
1096
1097 Because of the obvious security issues, this option should only be
1098 enabled on embedded devices where you control what is run in
1099 userspace. Since that isn't generally a problem on no-MMU systems,
1100 it is normally safe to say Y here.
1101
1102 See Documentation/nommu-mmap.txt for more information.
1103
1082config PROFILING 1104config PROFILING
1083 bool "Profiling support (EXPERIMENTAL)" 1105 bool "Profiling support (EXPERIMENTAL)"
1084 help 1106 help
diff --git a/init/main.c b/init/main.c
index 4051d75dd2d6..c3db4a98b369 100644
--- a/init/main.c
+++ b/init/main.c
@@ -691,10 +691,10 @@ asmlinkage void __init start_kernel(void)
691static void __init do_ctors(void) 691static void __init do_ctors(void)
692{ 692{
693#ifdef CONFIG_CONSTRUCTORS 693#ifdef CONFIG_CONSTRUCTORS
694 ctor_fn_t *call = (ctor_fn_t *) __ctors_start; 694 ctor_fn_t *fn = (ctor_fn_t *) __ctors_start;
695 695
696 for (; call < (ctor_fn_t *) __ctors_end; call++) 696 for (; fn < (ctor_fn_t *) __ctors_end; fn++)
697 (*call)(); 697 (*fn)();
698#endif 698#endif
699} 699}
700 700
@@ -755,10 +755,10 @@ extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[];
755 755
756static void __init do_initcalls(void) 756static void __init do_initcalls(void)
757{ 757{
758 initcall_t *call; 758 initcall_t *fn;
759 759
760 for (call = __early_initcall_end; call < __initcall_end; call++) 760 for (fn = __early_initcall_end; fn < __initcall_end; fn++)
761 do_one_initcall(*call); 761 do_one_initcall(*fn);
762 762
763 /* Make sure there is no pending stuff from the initcall sequence */ 763 /* Make sure there is no pending stuff from the initcall sequence */
764 flush_scheduled_work(); 764 flush_scheduled_work();
@@ -785,10 +785,10 @@ static void __init do_basic_setup(void)
785 785
786static void __init do_pre_smp_initcalls(void) 786static void __init do_pre_smp_initcalls(void)
787{ 787{
788 initcall_t *call; 788 initcall_t *fn;
789 789
790 for (call = __initcall_start; call < __early_initcall_end; call++) 790 for (fn = __initcall_start; fn < __early_initcall_end; fn++)
791 do_one_initcall(*call); 791 do_one_initcall(*fn);
792} 792}
793 793
794static void run_init_process(char *init_filename) 794static void run_init_process(char *init_filename)