aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c45
1 files changed, 41 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index d93e13d93f24..7063ebc6db05 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,6 +29,7 @@
29#include <linux/utsname.h> 29#include <linux/utsname.h>
30#include <linux/capability.h> 30#include <linux/capability.h>
31#include <linux/smp_lock.h> 31#include <linux/smp_lock.h>
32#include <linux/fs.h>
32#include <linux/init.h> 33#include <linux/init.h>
33#include <linux/kernel.h> 34#include <linux/kernel.h>
34#include <linux/kobject.h> 35#include <linux/kobject.h>
@@ -49,9 +50,6 @@
49#include <asm/uaccess.h> 50#include <asm/uaccess.h>
50#include <asm/processor.h> 51#include <asm/processor.h>
51 52
52extern int proc_nr_files(ctl_table *table, int write, struct file *filp,
53 void __user *buffer, size_t *lenp, loff_t *ppos);
54
55#ifdef CONFIG_X86 53#ifdef CONFIG_X86
56#include <asm/nmi.h> 54#include <asm/nmi.h>
57#include <asm/stacktrace.h> 55#include <asm/stacktrace.h>
@@ -61,6 +59,7 @@ extern int proc_nr_files(ctl_table *table, int write, struct file *filp,
61 59
62/* External variables not in a header file. */ 60/* External variables not in a header file. */
63extern int C_A_D; 61extern int C_A_D;
62extern int print_fatal_signals;
64extern int sysctl_overcommit_memory; 63extern int sysctl_overcommit_memory;
65extern int sysctl_overcommit_ratio; 64extern int sysctl_overcommit_ratio;
66extern int sysctl_panic_on_oom; 65extern int sysctl_panic_on_oom;
@@ -202,7 +201,10 @@ static ctl_table root_table[] = {
202 .mode = 0555, 201 .mode = 0555,
203 .child = dev_table, 202 .child = dev_table,
204 }, 203 },
205 204/*
205 * NOTE: do not add new entries to this table unless you have read
206 * Documentation/sysctl/ctl_unnumbered.txt
207 */
206 { .ctl_name = 0 } 208 { .ctl_name = 0 }
207}; 209};
208 210
@@ -340,6 +342,14 @@ static ctl_table kern_table[] = {
340 .proc_handler = &proc_dointvec, 342 .proc_handler = &proc_dointvec,
341 }, 343 },
342#endif 344#endif
345 {
346 .ctl_name = CTL_UNNUMBERED,
347 .procname = "print-fatal-signals",
348 .data = &print_fatal_signals,
349 .maxlen = sizeof(int),
350 .mode = 0644,
351 .proc_handler = &proc_dointvec,
352 },
343#ifdef __sparc__ 353#ifdef __sparc__
344 { 354 {
345 .ctl_name = KERN_SPARC_REBOOT, 355 .ctl_name = KERN_SPARC_REBOOT,
@@ -814,6 +824,14 @@ static ctl_table vm_table[] = {
814 .mode = 0644, 824 .mode = 0644,
815 .proc_handler = &proc_dointvec, 825 .proc_handler = &proc_dointvec,
816 }, 826 },
827 {
828 .ctl_name = CTL_UNNUMBERED,
829 .procname = "hugepages_treat_as_movable",
830 .data = &hugepages_treat_as_movable,
831 .maxlen = sizeof(int),
832 .mode = 0644,
833 .proc_handler = &hugetlb_treat_movable_handler,
834 },
817#endif 835#endif
818 { 836 {
819 .ctl_name = VM_LOWMEM_RESERVE_RATIO, 837 .ctl_name = VM_LOWMEM_RESERVE_RATIO,
@@ -958,6 +976,17 @@ static ctl_table vm_table[] = {
958 .mode = 0644, 976 .mode = 0644,
959 .proc_handler = &proc_doulongvec_minmax, 977 .proc_handler = &proc_doulongvec_minmax,
960 }, 978 },
979#ifdef CONFIG_NUMA
980 {
981 .ctl_name = CTL_UNNUMBERED,
982 .procname = "numa_zonelist_order",
983 .data = &numa_zonelist_order,
984 .maxlen = NUMA_ZONELIST_ORDER_LEN,
985 .mode = 0644,
986 .proc_handler = &numa_zonelist_order_handler,
987 .strategy = &sysctl_string,
988 },
989#endif
961#endif 990#endif
962#if defined(CONFIG_X86_32) || \ 991#if defined(CONFIG_X86_32) || \
963 (defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL)) 992 (defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL))
@@ -972,6 +1001,10 @@ static ctl_table vm_table[] = {
972 .extra1 = &zero, 1001 .extra1 = &zero,
973 }, 1002 },
974#endif 1003#endif
1004/*
1005 * NOTE: do not add new entries to this table unless you have read
1006 * Documentation/sysctl/ctl_unnumbered.txt
1007 */
975 { .ctl_name = 0 } 1008 { .ctl_name = 0 }
976}; 1009};
977 1010
@@ -1112,6 +1145,10 @@ static ctl_table fs_table[] = {
1112 .child = binfmt_misc_table, 1145 .child = binfmt_misc_table,
1113 }, 1146 },
1114#endif 1147#endif
1148/*
1149 * NOTE: do not add new entries to this table unless you have read
1150 * Documentation/sysctl/ctl_unnumbered.txt
1151 */
1115 { .ctl_name = 0 } 1152 { .ctl_name = 0 }
1116}; 1153};
1117 1154