aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c88878db491e..d1b4ee67d2df 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;
@@ -161,10 +161,13 @@ extern int unaligned_enabled;
161#endif 161#endif
162 162
163#ifdef CONFIG_IA64 163#ifdef CONFIG_IA64
164extern int no_unaligned_warning;
165extern int unaligned_dump_stack; 164extern int unaligned_dump_stack;
166#endif 165#endif
167 166
167#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
168extern int no_unaligned_warning;
169#endif
170
168#ifdef CONFIG_PROC_SYSCTL 171#ifdef CONFIG_PROC_SYSCTL
169static int proc_do_cad_pid(struct ctl_table *table, int write, 172static int proc_do_cad_pid(struct ctl_table *table, int write,
170 void __user *buffer, size_t *lenp, loff_t *ppos); 173 void __user *buffer, size_t *lenp, loff_t *ppos);
@@ -403,6 +406,13 @@ static struct ctl_table kern_table[] = {
403 .mode = 0644, 406 .mode = 0644,
404 .proc_handler = sched_rt_handler, 407 .proc_handler = sched_rt_handler,
405 }, 408 },
409 {
410 .procname = "sched_rr_timeslice_ms",
411 .data = &sched_rr_timeslice,
412 .maxlen = sizeof(int),
413 .mode = 0644,
414 .proc_handler = sched_rr_handler,
415 },
406#ifdef CONFIG_SCHED_AUTOGROUP 416#ifdef CONFIG_SCHED_AUTOGROUP
407 { 417 {
408 .procname = "sched_autogroup_enabled", 418 .procname = "sched_autogroup_enabled",
@@ -911,7 +921,7 @@ static struct ctl_table kern_table[] = {
911 .proc_handler = proc_doulongvec_minmax, 921 .proc_handler = proc_doulongvec_minmax,
912 }, 922 },
913#endif 923#endif
914#ifdef CONFIG_IA64 924#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
915 { 925 {
916 .procname = "ignore-unaligned-usertrap", 926 .procname = "ignore-unaligned-usertrap",
917 .data = &no_unaligned_warning, 927 .data = &no_unaligned_warning,
@@ -919,6 +929,8 @@ static struct ctl_table kern_table[] = {
919 .mode = 0644, 929 .mode = 0644,
920 .proc_handler = proc_dointvec, 930 .proc_handler = proc_dointvec,
921 }, 931 },
932#endif
933#ifdef CONFIG_IA64
922 { 934 {
923 .procname = "unaligned-dump-stack", 935 .procname = "unaligned-dump-stack",
924 .data = &unaligned_dump_stack, 936 .data = &unaligned_dump_stack,
@@ -2006,7 +2018,7 @@ static int proc_taint(struct ctl_table *table, int write,
2006 int i; 2018 int i;
2007 for (i = 0; i < BITS_PER_LONG && tmptaint >> i; i++) { 2019 for (i = 0; i < BITS_PER_LONG && tmptaint >> i; i++) {
2008 if ((tmptaint >> i) & 1) 2020 if ((tmptaint >> i) & 1)
2009 add_taint(i); 2021 add_taint(i, LOCKDEP_STILL_OK);
2010 } 2022 }
2011 } 2023 }
2012 2024
@@ -2083,7 +2095,7 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
2083static void validate_coredump_safety(void) 2095static void validate_coredump_safety(void)
2084{ 2096{
2085#ifdef CONFIG_COREDUMP 2097#ifdef CONFIG_COREDUMP
2086 if (suid_dumpable == SUID_DUMPABLE_SAFE && 2098 if (suid_dumpable == SUID_DUMP_ROOT &&
2087 core_pattern[0] != '/' && core_pattern[0] != '|') { 2099 core_pattern[0] != '/' && core_pattern[0] != '|') {
2088 printk(KERN_WARNING "Unsafe core_pattern used with "\ 2100 printk(KERN_WARNING "Unsafe core_pattern used with "\
2089 "suid_dumpable=2. Pipe handler or fully qualified "\ 2101 "suid_dumpable=2. Pipe handler or fully qualified "\