diff options
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index b2970d56fb76..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 | { |
| @@ -731,6 +744,14 @@ static struct ctl_table kern_table[] = { | |||
| 731 | }, | 744 | }, |
| 732 | { | 745 | { |
| 733 | .ctl_name = CTL_UNNUMBERED, | 746 | .ctl_name = CTL_UNNUMBERED, |
| 747 | .procname = "bootloader_version", | ||
| 748 | .data = &bootloader_version, | ||
| 749 | .maxlen = sizeof (int), | ||
| 750 | .mode = 0444, | ||
| 751 | .proc_handler = &proc_dointvec, | ||
| 752 | }, | ||
| 753 | { | ||
| 754 | .ctl_name = CTL_UNNUMBERED, | ||
| 734 | .procname = "kstack_depth_to_print", | 755 | .procname = "kstack_depth_to_print", |
| 735 | .data = &kstack_depth_to_print, | 756 | .data = &kstack_depth_to_print, |
| 736 | .maxlen = sizeof(int), | 757 | .maxlen = sizeof(int), |
| @@ -912,6 +933,32 @@ static struct ctl_table kern_table[] = { | |||
| 912 | .child = slow_work_sysctls, | 933 | .child = slow_work_sysctls, |
| 913 | }, | 934 | }, |
| 914 | #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 | ||
| 915 | /* | 962 | /* |
| 916 | * 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 |
| 917 | * Documentation/sysctl/ctl_unnumbered.txt | 964 | * Documentation/sysctl/ctl_unnumbered.txt |
| @@ -1225,7 +1272,6 @@ static struct ctl_table vm_table[] = { | |||
| 1225 | .strategy = &sysctl_jiffies, | 1272 | .strategy = &sysctl_jiffies, |
| 1226 | }, | 1273 | }, |
| 1227 | #endif | 1274 | #endif |
| 1228 | #ifdef CONFIG_SECURITY | ||
| 1229 | { | 1275 | { |
| 1230 | .ctl_name = CTL_UNNUMBERED, | 1276 | .ctl_name = CTL_UNNUMBERED, |
| 1231 | .procname = "mmap_min_addr", | 1277 | .procname = "mmap_min_addr", |
| @@ -1234,7 +1280,6 @@ static struct ctl_table vm_table[] = { | |||
| 1234 | .mode = 0644, | 1280 | .mode = 0644, |
| 1235 | .proc_handler = &proc_doulongvec_minmax, | 1281 | .proc_handler = &proc_doulongvec_minmax, |
| 1236 | }, | 1282 | }, |
| 1237 | #endif | ||
| 1238 | #ifdef CONFIG_NUMA | 1283 | #ifdef CONFIG_NUMA |
| 1239 | { | 1284 | { |
| 1240 | .ctl_name = CTL_UNNUMBERED, | 1285 | .ctl_name = CTL_UNNUMBERED, |
