aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9d048fa2d902..ff6d45c7626f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -121,6 +121,10 @@ extern int sg_big_buff;
121#include <asm/system.h> 121#include <asm/system.h>
122#endif 122#endif
123 123
124#ifdef CONFIG_SPARC64
125extern int sysctl_tsb_ratio;
126#endif
127
124#ifdef __hppa__ 128#ifdef __hppa__
125extern int pwrsw_enabled; 129extern int pwrsw_enabled;
126extern int unaligned_enabled; 130extern int unaligned_enabled;
@@ -176,6 +180,9 @@ extern struct ctl_table random_table[];
176#ifdef CONFIG_INOTIFY_USER 180#ifdef CONFIG_INOTIFY_USER
177extern struct ctl_table inotify_table[]; 181extern struct ctl_table inotify_table[];
178#endif 182#endif
183#ifdef CONFIG_EPOLL
184extern struct ctl_table epoll_table[];
185#endif
179 186
180#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT 187#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
181int sysctl_legacy_va_layout; 188int sysctl_legacy_va_layout;
@@ -448,6 +455,16 @@ static struct ctl_table kern_table[] = {
448 .proc_handler = &proc_dointvec, 455 .proc_handler = &proc_dointvec,
449 }, 456 },
450#endif 457#endif
458#ifdef CONFIG_SPARC64
459 {
460 .ctl_name = CTL_UNNUMBERED,
461 .procname = "tsb-ratio",
462 .data = &sysctl_tsb_ratio,
463 .maxlen = sizeof (int),
464 .mode = 0644,
465 .proc_handler = &proc_dointvec,
466 },
467#endif
451#ifdef __hppa__ 468#ifdef __hppa__
452 { 469 {
453 .ctl_name = KERN_HPPA_PWRSW, 470 .ctl_name = KERN_HPPA_PWRSW,
@@ -484,6 +501,26 @@ static struct ctl_table kern_table[] = {
484 .proc_handler = &ftrace_enable_sysctl, 501 .proc_handler = &ftrace_enable_sysctl,
485 }, 502 },
486#endif 503#endif
504#ifdef CONFIG_STACK_TRACER
505 {
506 .ctl_name = CTL_UNNUMBERED,
507 .procname = "stack_tracer_enabled",
508 .data = &stack_tracer_enabled,
509 .maxlen = sizeof(int),
510 .mode = 0644,
511 .proc_handler = &stack_trace_sysctl,
512 },
513#endif
514#ifdef CONFIG_TRACING
515 {
516 .ctl_name = CTL_UNNUMBERED,
517 .procname = "ftrace_dump_on_oops",
518 .data = &ftrace_dump_on_oops,
519 .maxlen = sizeof(int),
520 .mode = 0644,
521 .proc_handler = &proc_dointvec,
522 },
523#endif
487#ifdef CONFIG_MODULES 524#ifdef CONFIG_MODULES
488 { 525 {
489 .ctl_name = KERN_MODPROBE, 526 .ctl_name = KERN_MODPROBE,
@@ -1325,6 +1362,13 @@ static struct ctl_table fs_table[] = {
1325 .child = inotify_table, 1362 .child = inotify_table,
1326 }, 1363 },
1327#endif 1364#endif
1365#ifdef CONFIG_EPOLL
1366 {
1367 .procname = "epoll",
1368 .mode = 0555,
1369 .child = epoll_table,
1370 },
1371#endif
1328#endif 1372#endif
1329 { 1373 {
1330 .ctl_name = KERN_SETUID_DUMPABLE, 1374 .ctl_name = KERN_SETUID_DUMPABLE,
@@ -1641,7 +1685,7 @@ out:
1641 1685
1642static int test_perm(int mode, int op) 1686static int test_perm(int mode, int op)
1643{ 1687{
1644 if (!current->euid) 1688 if (!current_euid())
1645 mode >>= 6; 1689 mode >>= 6;
1646 else if (in_egroup_p(0)) 1690 else if (in_egroup_p(0))
1647 mode >>= 3; 1691 mode >>= 3;