diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 6a463716ecbf..ce664f98e3fb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/reboot.h> | 49 | #include <linux/reboot.h> |
50 | #include <linux/ftrace.h> | 50 | #include <linux/ftrace.h> |
51 | #include <linux/slow-work.h> | 51 | #include <linux/slow-work.h> |
52 | #include <linux/perf_counter.h> | ||
52 | 53 | ||
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
54 | #include <asm/processor.h> | 55 | #include <asm/processor.h> |
@@ -114,6 +115,7 @@ static int ngroups_max = NGROUPS_MAX; | |||
114 | 115 | ||
115 | #ifdef CONFIG_MODULES | 116 | #ifdef CONFIG_MODULES |
116 | extern char modprobe_path[]; | 117 | extern char modprobe_path[]; |
118 | extern int modules_disabled; | ||
117 | #endif | 119 | #endif |
118 | #ifdef CONFIG_CHR_DEV_SG | 120 | #ifdef CONFIG_CHR_DEV_SG |
119 | extern int sg_big_buff; | 121 | extern int sg_big_buff; |
@@ -534,6 +536,17 @@ static struct ctl_table kern_table[] = { | |||
534 | .proc_handler = &proc_dostring, | 536 | .proc_handler = &proc_dostring, |
535 | .strategy = &sysctl_string, | 537 | .strategy = &sysctl_string, |
536 | }, | 538 | }, |
539 | { | ||
540 | .ctl_name = CTL_UNNUMBERED, | ||
541 | .procname = "modules_disabled", | ||
542 | .data = &modules_disabled, | ||
543 | .maxlen = sizeof(int), | ||
544 | .mode = 0644, | ||
545 | /* only handle a transition from default "0" to "1" */ | ||
546 | .proc_handler = &proc_dointvec_minmax, | ||
547 | .extra1 = &one, | ||
548 | .extra2 = &one, | ||
549 | }, | ||
537 | #endif | 550 | #endif |
538 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 551 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) |
539 | { | 552 | { |
@@ -920,6 +933,32 @@ static struct ctl_table kern_table[] = { | |||
920 | .child = slow_work_sysctls, | 933 | .child = slow_work_sysctls, |
921 | }, | 934 | }, |
922 | #endif | 935 | #endif |
936 | #ifdef CONFIG_PERF_COUNTERS | ||
937 | { | ||
938 | .ctl_name = CTL_UNNUMBERED, | ||
939 | .procname = "perf_counter_paranoid", | ||
940 | .data = &sysctl_perf_counter_paranoid, | ||
941 | .maxlen = sizeof(sysctl_perf_counter_paranoid), | ||
942 | .mode = 0644, | ||
943 | .proc_handler = &proc_dointvec, | ||
944 | }, | ||
945 | { | ||
946 | .ctl_name = CTL_UNNUMBERED, | ||
947 | .procname = "perf_counter_mlock_kb", | ||
948 | .data = &sysctl_perf_counter_mlock, | ||
949 | .maxlen = sizeof(sysctl_perf_counter_mlock), | ||
950 | .mode = 0644, | ||
951 | .proc_handler = &proc_dointvec, | ||
952 | }, | ||
953 | { | ||
954 | .ctl_name = CTL_UNNUMBERED, | ||
955 | .procname = "perf_counter_max_sample_rate", | ||
956 | .data = &sysctl_perf_counter_sample_rate, | ||
957 | .maxlen = sizeof(sysctl_perf_counter_sample_rate), | ||
958 | .mode = 0644, | ||
959 | .proc_handler = &proc_dointvec, | ||
960 | }, | ||
961 | #endif | ||
923 | /* | 962 | /* |
924 | * NOTE: do not add new entries to this table unless you have read | 963 | * NOTE: do not add new entries to this table unless you have read |
925 | * Documentation/sysctl/ctl_unnumbered.txt | 964 | * Documentation/sysctl/ctl_unnumbered.txt |
@@ -1233,7 +1272,6 @@ static struct ctl_table vm_table[] = { | |||
1233 | .strategy = &sysctl_jiffies, | 1272 | .strategy = &sysctl_jiffies, |
1234 | }, | 1273 | }, |
1235 | #endif | 1274 | #endif |
1236 | #ifdef CONFIG_SECURITY | ||
1237 | { | 1275 | { |
1238 | .ctl_name = CTL_UNNUMBERED, | 1276 | .ctl_name = CTL_UNNUMBERED, |
1239 | .procname = "mmap_min_addr", | 1277 | .procname = "mmap_min_addr", |
@@ -1242,7 +1280,6 @@ static struct ctl_table vm_table[] = { | |||
1242 | .mode = 0644, | 1280 | .mode = 0644, |
1243 | .proc_handler = &proc_doulongvec_minmax, | 1281 | .proc_handler = &proc_doulongvec_minmax, |
1244 | }, | 1282 | }, |
1245 | #endif | ||
1246 | #ifdef CONFIG_NUMA | 1283 | #ifdef CONFIG_NUMA |
1247 | { | 1284 | { |
1248 | .ctl_name = CTL_UNNUMBERED, | 1285 | .ctl_name = CTL_UNNUMBERED, |