diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 79 |
1 files changed, 58 insertions, 21 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index e82726faeeff..362a0cc37138 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Removed it and replaced it with older style, 03/23/00, Bill Wendling | 18 | * Removed it and replaced it with older style, 03/23/00, Bill Wendling |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
24 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
@@ -59,6 +58,7 @@ extern int proc_nr_files(ctl_table *table, int write, struct file *filp, | |||
59 | extern int C_A_D; | 58 | extern int C_A_D; |
60 | extern int sysctl_overcommit_memory; | 59 | extern int sysctl_overcommit_memory; |
61 | extern int sysctl_overcommit_ratio; | 60 | extern int sysctl_overcommit_ratio; |
61 | extern int sysctl_panic_on_oom; | ||
62 | extern int max_threads; | 62 | extern int max_threads; |
63 | extern int sysrq_enabled; | 63 | extern int sysrq_enabled; |
64 | extern int core_uses_pid; | 64 | extern int core_uses_pid; |
@@ -72,6 +72,7 @@ extern int printk_ratelimit_burst; | |||
72 | extern int pid_max_min, pid_max_max; | 72 | extern int pid_max_min, pid_max_max; |
73 | extern int sysctl_drop_caches; | 73 | extern int sysctl_drop_caches; |
74 | extern int percpu_pagelist_fraction; | 74 | extern int percpu_pagelist_fraction; |
75 | extern int compat_log; | ||
75 | 76 | ||
76 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 77 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) |
77 | int unknown_nmi_panic; | 78 | int unknown_nmi_panic; |
@@ -131,6 +132,10 @@ extern int acct_parm[]; | |||
131 | extern int no_unaligned_warning; | 132 | extern int no_unaligned_warning; |
132 | #endif | 133 | #endif |
133 | 134 | ||
135 | #ifdef CONFIG_RT_MUTEXES | ||
136 | extern int max_lock_depth; | ||
137 | #endif | ||
138 | |||
134 | static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, | 139 | static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, |
135 | ctl_table *, void **); | 140 | ctl_table *, void **); |
136 | static int proc_doutsstring(ctl_table *table, int write, struct file *filp, | 141 | static int proc_doutsstring(ctl_table *table, int write, struct file *filp, |
@@ -142,7 +147,6 @@ static struct ctl_table_header root_table_header = | |||
142 | 147 | ||
143 | static ctl_table kern_table[]; | 148 | static ctl_table kern_table[]; |
144 | static ctl_table vm_table[]; | 149 | static ctl_table vm_table[]; |
145 | static ctl_table proc_table[]; | ||
146 | static ctl_table fs_table[]; | 150 | static ctl_table fs_table[]; |
147 | static ctl_table debug_table[]; | 151 | static ctl_table debug_table[]; |
148 | static ctl_table dev_table[]; | 152 | static ctl_table dev_table[]; |
@@ -150,7 +154,7 @@ extern ctl_table random_table[]; | |||
150 | #ifdef CONFIG_UNIX98_PTYS | 154 | #ifdef CONFIG_UNIX98_PTYS |
151 | extern ctl_table pty_table[]; | 155 | extern ctl_table pty_table[]; |
152 | #endif | 156 | #endif |
153 | #ifdef CONFIG_INOTIFY | 157 | #ifdef CONFIG_INOTIFY_USER |
154 | extern ctl_table inotify_table[]; | 158 | extern ctl_table inotify_table[]; |
155 | #endif | 159 | #endif |
156 | 160 | ||
@@ -202,12 +206,6 @@ static ctl_table root_table[] = { | |||
202 | }, | 206 | }, |
203 | #endif | 207 | #endif |
204 | { | 208 | { |
205 | .ctl_name = CTL_PROC, | ||
206 | .procname = "proc", | ||
207 | .mode = 0555, | ||
208 | .child = proc_table, | ||
209 | }, | ||
210 | { | ||
211 | .ctl_name = CTL_FS, | 209 | .ctl_name = CTL_FS, |
212 | .procname = "fs", | 210 | .procname = "fs", |
213 | .mode = 0555, | 211 | .mode = 0555, |
@@ -398,7 +396,7 @@ static ctl_table kern_table[] = { | |||
398 | .strategy = &sysctl_string, | 396 | .strategy = &sysctl_string, |
399 | }, | 397 | }, |
400 | #endif | 398 | #endif |
401 | #ifdef CONFIG_HOTPLUG | 399 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) |
402 | { | 400 | { |
403 | .ctl_name = KERN_HOTPLUG, | 401 | .ctl_name = KERN_HOTPLUG, |
404 | .procname = "hotplug", | 402 | .procname = "hotplug", |
@@ -683,6 +681,27 @@ static ctl_table kern_table[] = { | |||
683 | .proc_handler = &proc_dointvec, | 681 | .proc_handler = &proc_dointvec, |
684 | }, | 682 | }, |
685 | #endif | 683 | #endif |
684 | #ifdef CONFIG_COMPAT | ||
685 | { | ||
686 | .ctl_name = KERN_COMPAT_LOG, | ||
687 | .procname = "compat-log", | ||
688 | .data = &compat_log, | ||
689 | .maxlen = sizeof (int), | ||
690 | .mode = 0644, | ||
691 | .proc_handler = &proc_dointvec, | ||
692 | }, | ||
693 | #endif | ||
694 | #ifdef CONFIG_RT_MUTEXES | ||
695 | { | ||
696 | .ctl_name = KERN_MAX_LOCK_DEPTH, | ||
697 | .procname = "max_lock_depth", | ||
698 | .data = &max_lock_depth, | ||
699 | .maxlen = sizeof(int), | ||
700 | .mode = 0644, | ||
701 | .proc_handler = &proc_dointvec, | ||
702 | }, | ||
703 | #endif | ||
704 | |||
686 | { .ctl_name = 0 } | 705 | { .ctl_name = 0 } |
687 | }; | 706 | }; |
688 | 707 | ||
@@ -702,6 +721,14 @@ static ctl_table vm_table[] = { | |||
702 | .proc_handler = &proc_dointvec, | 721 | .proc_handler = &proc_dointvec, |
703 | }, | 722 | }, |
704 | { | 723 | { |
724 | .ctl_name = VM_PANIC_ON_OOM, | ||
725 | .procname = "panic_on_oom", | ||
726 | .data = &sysctl_panic_on_oom, | ||
727 | .maxlen = sizeof(sysctl_panic_on_oom), | ||
728 | .mode = 0644, | ||
729 | .proc_handler = &proc_dointvec, | ||
730 | }, | ||
731 | { | ||
705 | .ctl_name = VM_OVERCOMMIT_RATIO, | 732 | .ctl_name = VM_OVERCOMMIT_RATIO, |
706 | .procname = "overcommit_ratio", | 733 | .procname = "overcommit_ratio", |
707 | .data = &sysctl_overcommit_ratio, | 734 | .data = &sysctl_overcommit_ratio, |
@@ -906,19 +933,29 @@ static ctl_table vm_table[] = { | |||
906 | .extra1 = &zero, | 933 | .extra1 = &zero, |
907 | }, | 934 | }, |
908 | { | 935 | { |
909 | .ctl_name = VM_ZONE_RECLAIM_INTERVAL, | 936 | .ctl_name = VM_MIN_UNMAPPED, |
910 | .procname = "zone_reclaim_interval", | 937 | .procname = "min_unmapped_ratio", |
911 | .data = &zone_reclaim_interval, | 938 | .data = &sysctl_min_unmapped_ratio, |
912 | .maxlen = sizeof(zone_reclaim_interval), | 939 | .maxlen = sizeof(sysctl_min_unmapped_ratio), |
913 | .mode = 0644, | 940 | .mode = 0644, |
914 | .proc_handler = &proc_dointvec_jiffies, | 941 | .proc_handler = &sysctl_min_unmapped_ratio_sysctl_handler, |
915 | .strategy = &sysctl_jiffies, | 942 | .strategy = &sysctl_intvec, |
943 | .extra1 = &zero, | ||
944 | .extra2 = &one_hundred, | ||
945 | }, | ||
946 | #endif | ||
947 | #ifdef CONFIG_X86_32 | ||
948 | { | ||
949 | .ctl_name = VM_VDSO_ENABLED, | ||
950 | .procname = "vdso_enabled", | ||
951 | .data = &vdso_enabled, | ||
952 | .maxlen = sizeof(vdso_enabled), | ||
953 | .mode = 0644, | ||
954 | .proc_handler = &proc_dointvec, | ||
955 | .strategy = &sysctl_intvec, | ||
956 | .extra1 = &zero, | ||
916 | }, | 957 | }, |
917 | #endif | 958 | #endif |
918 | { .ctl_name = 0 } | ||
919 | }; | ||
920 | |||
921 | static ctl_table proc_table[] = { | ||
922 | { .ctl_name = 0 } | 959 | { .ctl_name = 0 } |
923 | }; | 960 | }; |
924 | 961 | ||
@@ -1028,7 +1065,7 @@ static ctl_table fs_table[] = { | |||
1028 | .mode = 0644, | 1065 | .mode = 0644, |
1029 | .proc_handler = &proc_doulongvec_minmax, | 1066 | .proc_handler = &proc_doulongvec_minmax, |
1030 | }, | 1067 | }, |
1031 | #ifdef CONFIG_INOTIFY | 1068 | #ifdef CONFIG_INOTIFY_USER |
1032 | { | 1069 | { |
1033 | .ctl_name = FS_INOTIFY, | 1070 | .ctl_name = FS_INOTIFY, |
1034 | .procname = "inotify", | 1071 | .procname = "inotify", |