diff options
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a68b2448468..8686b0f5fc12 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/sysctl.h> | 25 | #include <linux/sysctl.h> |
| 26 | #include <linux/signal.h> | ||
| 26 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
| 27 | #include <linux/security.h> | 28 | #include <linux/security.h> |
| 28 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
| @@ -50,6 +51,7 @@ | |||
| 50 | #include <linux/ftrace.h> | 51 | #include <linux/ftrace.h> |
| 51 | #include <linux/slow-work.h> | 52 | #include <linux/slow-work.h> |
| 52 | #include <linux/perf_event.h> | 53 | #include <linux/perf_event.h> |
| 54 | #include <linux/kprobes.h> | ||
| 53 | 55 | ||
| 54 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
| 55 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
| @@ -59,13 +61,23 @@ | |||
| 59 | #include <asm/stacktrace.h> | 61 | #include <asm/stacktrace.h> |
| 60 | #include <asm/io.h> | 62 | #include <asm/io.h> |
| 61 | #endif | 63 | #endif |
| 64 | #ifdef CONFIG_BSD_PROCESS_ACCT | ||
| 65 | #include <linux/acct.h> | ||
| 66 | #endif | ||
| 67 | #ifdef CONFIG_RT_MUTEXES | ||
| 68 | #include <linux/rtmutex.h> | ||
| 69 | #endif | ||
| 70 | #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT) | ||
| 71 | #include <linux/lockdep.h> | ||
| 72 | #endif | ||
| 73 | #ifdef CONFIG_CHR_DEV_SG | ||
| 74 | #include <scsi/sg.h> | ||
| 75 | #endif | ||
| 62 | 76 | ||
| 63 | 77 | ||
| 64 | #if defined(CONFIG_SYSCTL) | 78 | #if defined(CONFIG_SYSCTL) |
| 65 | 79 | ||
| 66 | /* External variables not in a header file. */ | 80 | /* External variables not in a header file. */ |
| 67 | extern int C_A_D; | ||
| 68 | extern int print_fatal_signals; | ||
| 69 | extern int sysctl_overcommit_memory; | 81 | extern int sysctl_overcommit_memory; |
| 70 | extern int sysctl_overcommit_ratio; | 82 | extern int sysctl_overcommit_ratio; |
| 71 | extern int sysctl_panic_on_oom; | 83 | extern int sysctl_panic_on_oom; |
| @@ -87,9 +99,6 @@ extern int sysctl_nr_open_min, sysctl_nr_open_max; | |||
| 87 | #ifndef CONFIG_MMU | 99 | #ifndef CONFIG_MMU |
| 88 | extern int sysctl_nr_trim_pages; | 100 | extern int sysctl_nr_trim_pages; |
| 89 | #endif | 101 | #endif |
| 90 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
| 91 | extern int rcutorture_runnable; | ||
| 92 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | ||
| 93 | #ifdef CONFIG_BLOCK | 102 | #ifdef CONFIG_BLOCK |
| 94 | extern int blk_iopoll_enabled; | 103 | extern int blk_iopoll_enabled; |
| 95 | #endif | 104 | #endif |
| @@ -119,14 +128,6 @@ static int min_percpu_pagelist_fract = 8; | |||
| 119 | 128 | ||
| 120 | static int ngroups_max = NGROUPS_MAX; | 129 | static int ngroups_max = NGROUPS_MAX; |
| 121 | 130 | ||
| 122 | #ifdef CONFIG_MODULES | ||
| 123 | extern char modprobe_path[]; | ||
| 124 | extern int modules_disabled; | ||
| 125 | #endif | ||
| 126 | #ifdef CONFIG_CHR_DEV_SG | ||
| 127 | extern int sg_big_buff; | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #ifdef CONFIG_SPARC | 131 | #ifdef CONFIG_SPARC |
| 131 | #include <asm/system.h> | 132 | #include <asm/system.h> |
| 132 | #endif | 133 | #endif |
| @@ -148,10 +149,6 @@ extern int sysctl_userprocess_debug; | |||
| 148 | extern int spin_retry; | 149 | extern int spin_retry; |
| 149 | #endif | 150 | #endif |
| 150 | 151 | ||
| 151 | #ifdef CONFIG_BSD_PROCESS_ACCT | ||
| 152 | extern int acct_parm[]; | ||
| 153 | #endif | ||
| 154 | |||
| 155 | #ifdef CONFIG_IA64 | 152 | #ifdef CONFIG_IA64 |
| 156 | extern int no_unaligned_warning; | 153 | extern int no_unaligned_warning; |
| 157 | extern int unaligned_dump_stack; | 154 | extern int unaligned_dump_stack; |
| @@ -159,10 +156,6 @@ extern int unaligned_dump_stack; | |||
| 159 | 156 | ||
| 160 | extern struct ratelimit_state printk_ratelimit_state; | 157 | extern struct ratelimit_state printk_ratelimit_state; |
| 161 | 158 | ||
| 162 | #ifdef CONFIG_RT_MUTEXES | ||
| 163 | extern int max_lock_depth; | ||
| 164 | #endif | ||
| 165 | |||
| 166 | #ifdef CONFIG_PROC_SYSCTL | 159 | #ifdef CONFIG_PROC_SYSCTL |
| 167 | static int proc_do_cad_pid(struct ctl_table *table, int write, | 160 | static int proc_do_cad_pid(struct ctl_table *table, int write, |
| 168 | void __user *buffer, size_t *lenp, loff_t *ppos); | 161 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| @@ -201,9 +194,6 @@ extern struct ctl_table epoll_table[]; | |||
| 201 | int sysctl_legacy_va_layout; | 194 | int sysctl_legacy_va_layout; |
| 202 | #endif | 195 | #endif |
| 203 | 196 | ||
| 204 | extern int prove_locking; | ||
| 205 | extern int lock_stat; | ||
| 206 | |||
| 207 | /* The default sysctl tables: */ | 197 | /* The default sysctl tables: */ |
| 208 | 198 | ||
| 209 | static struct ctl_table root_table[] = { | 199 | static struct ctl_table root_table[] = { |
| @@ -1441,7 +1431,7 @@ static struct ctl_table fs_table[] = { | |||
| 1441 | }; | 1431 | }; |
| 1442 | 1432 | ||
| 1443 | static struct ctl_table debug_table[] = { | 1433 | static struct ctl_table debug_table[] = { |
| 1444 | #if defined(CONFIG_X86) || defined(CONFIG_PPC) | 1434 | #if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) |
| 1445 | { | 1435 | { |
| 1446 | .procname = "exception-trace", | 1436 | .procname = "exception-trace", |
| 1447 | .data = &show_unhandled_signals, | 1437 | .data = &show_unhandled_signals, |
| @@ -1450,6 +1440,17 @@ static struct ctl_table debug_table[] = { | |||
| 1450 | .proc_handler = proc_dointvec | 1440 | .proc_handler = proc_dointvec |
| 1451 | }, | 1441 | }, |
| 1452 | #endif | 1442 | #endif |
| 1443 | #if defined(CONFIG_OPTPROBES) | ||
| 1444 | { | ||
| 1445 | .procname = "kprobes-optimization", | ||
| 1446 | .data = &sysctl_kprobes_optimization, | ||
| 1447 | .maxlen = sizeof(int), | ||
| 1448 | .mode = 0644, | ||
| 1449 | .proc_handler = proc_kprobes_optimization_handler, | ||
| 1450 | .extra1 = &zero, | ||
| 1451 | .extra2 = &one, | ||
| 1452 | }, | ||
| 1453 | #endif | ||
| 1453 | { } | 1454 | { } |
| 1454 | }; | 1455 | }; |
| 1455 | 1456 | ||
