aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c88878db491e..afc1dc60f3f8 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -61,6 +61,7 @@
61#include <linux/kmod.h> 61#include <linux/kmod.h>
62#include <linux/capability.h> 62#include <linux/capability.h>
63#include <linux/binfmts.h> 63#include <linux/binfmts.h>
64#include <linux/sched/sysctl.h>
64 65
65#include <asm/uaccess.h> 66#include <asm/uaccess.h>
66#include <asm/processor.h> 67#include <asm/processor.h>
@@ -104,7 +105,6 @@ extern char core_pattern[];
104extern unsigned int core_pipe_limit; 105extern unsigned int core_pipe_limit;
105#endif 106#endif
106extern int pid_max; 107extern int pid_max;
107extern int min_free_kbytes;
108extern int pid_max_min, pid_max_max; 108extern int pid_max_min, pid_max_max;
109extern int sysctl_drop_caches; 109extern int sysctl_drop_caches;
110extern int percpu_pagelist_fraction; 110extern int percpu_pagelist_fraction;
@@ -157,14 +157,20 @@ extern int sysctl_tsb_ratio;
157 157
158#ifdef __hppa__ 158#ifdef __hppa__
159extern int pwrsw_enabled; 159extern int pwrsw_enabled;
160#endif
161
162#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
160extern int unaligned_enabled; 163extern int unaligned_enabled;
161#endif 164#endif
162 165
163#ifdef CONFIG_IA64 166#ifdef CONFIG_IA64
164extern int no_unaligned_warning;
165extern int unaligned_dump_stack; 167extern int unaligned_dump_stack;
166#endif 168#endif
167 169
170#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
171extern int no_unaligned_warning;
172#endif
173
168#ifdef CONFIG_PROC_SYSCTL 174#ifdef CONFIG_PROC_SYSCTL
169static int proc_do_cad_pid(struct ctl_table *table, int write, 175static int proc_do_cad_pid(struct ctl_table *table, int write,
170 void __user *buffer, size_t *lenp, loff_t *ppos); 176 void __user *buffer, size_t *lenp, loff_t *ppos);
@@ -403,6 +409,13 @@ static struct ctl_table kern_table[] = {
403 .mode = 0644, 409 .mode = 0644,
404 .proc_handler = sched_rt_handler, 410 .proc_handler = sched_rt_handler,
405 }, 411 },
412 {
413 .procname = "sched_rr_timeslice_ms",
414 .data = &sched_rr_timeslice,
415 .maxlen = sizeof(int),
416 .mode = 0644,
417 .proc_handler = sched_rr_handler,
418 },
406#ifdef CONFIG_SCHED_AUTOGROUP 419#ifdef CONFIG_SCHED_AUTOGROUP
407 { 420 {
408 .procname = "sched_autogroup_enabled", 421 .procname = "sched_autogroup_enabled",
@@ -545,6 +558,8 @@ static struct ctl_table kern_table[] = {
545 .mode = 0644, 558 .mode = 0644,
546 .proc_handler = proc_dointvec, 559 .proc_handler = proc_dointvec,
547 }, 560 },
561#endif
562#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
548 { 563 {
549 .procname = "unaligned-trap", 564 .procname = "unaligned-trap",
550 .data = &unaligned_enabled, 565 .data = &unaligned_enabled,
@@ -911,7 +926,7 @@ static struct ctl_table kern_table[] = {
911 .proc_handler = proc_doulongvec_minmax, 926 .proc_handler = proc_doulongvec_minmax,
912 }, 927 },
913#endif 928#endif
914#ifdef CONFIG_IA64 929#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
915 { 930 {
916 .procname = "ignore-unaligned-usertrap", 931 .procname = "ignore-unaligned-usertrap",
917 .data = &no_unaligned_warning, 932 .data = &no_unaligned_warning,
@@ -919,6 +934,8 @@ static struct ctl_table kern_table[] = {
919 .mode = 0644, 934 .mode = 0644,
920 .proc_handler = proc_dointvec, 935 .proc_handler = proc_dointvec,
921 }, 936 },
937#endif
938#ifdef CONFIG_IA64
922 { 939 {
923 .procname = "unaligned-dump-stack", 940 .procname = "unaligned-dump-stack",
924 .data = &unaligned_dump_stack, 941 .data = &unaligned_dump_stack,
@@ -2006,7 +2023,7 @@ static int proc_taint(struct ctl_table *table, int write,
2006 int i; 2023 int i;
2007 for (i = 0; i < BITS_PER_LONG && tmptaint >> i; i++) { 2024 for (i = 0; i < BITS_PER_LONG && tmptaint >> i; i++) {
2008 if ((tmptaint >> i) & 1) 2025 if ((tmptaint >> i) & 1)
2009 add_taint(i); 2026 add_taint(i, LOCKDEP_STILL_OK);
2010 } 2027 }
2011 } 2028 }
2012 2029
@@ -2083,7 +2100,7 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
2083static void validate_coredump_safety(void) 2100static void validate_coredump_safety(void)
2084{ 2101{
2085#ifdef CONFIG_COREDUMP 2102#ifdef CONFIG_COREDUMP
2086 if (suid_dumpable == SUID_DUMPABLE_SAFE && 2103 if (suid_dumpable == SUID_DUMP_ROOT &&
2087 core_pattern[0] != '/' && core_pattern[0] != '|') { 2104 core_pattern[0] != '/' && core_pattern[0] != '|') {
2088 printk(KERN_WARNING "Unsafe core_pattern used with "\ 2105 printk(KERN_WARNING "Unsafe core_pattern used with "\
2089 "suid_dumpable=2. Pipe handler or fully qualified "\ 2106 "suid_dumpable=2. Pipe handler or fully qualified "\