aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 706309f9ed84..acf0a5a06da7 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -63,11 +63,12 @@
63#include <linux/capability.h> 63#include <linux/capability.h>
64#include <linux/binfmts.h> 64#include <linux/binfmts.h>
65#include <linux/sched/sysctl.h> 65#include <linux/sched/sysctl.h>
66#include <linux/sched/coredump.h>
66#include <linux/kexec.h> 67#include <linux/kexec.h>
67#include <linux/bpf.h> 68#include <linux/bpf.h>
68#include <linux/mount.h> 69#include <linux/mount.h>
69 70
70#include <asm/uaccess.h> 71#include <linux/uaccess.h>
71#include <asm/processor.h> 72#include <asm/processor.h>
72 73
73#ifdef CONFIG_X86 74#ifdef CONFIG_X86
@@ -347,13 +348,6 @@ static struct ctl_table kern_table[] = {
347 .mode = 0644, 348 .mode = 0644,
348 .proc_handler = proc_dointvec, 349 .proc_handler = proc_dointvec,
349 }, 350 },
350 {
351 .procname = "sched_shares_window_ns",
352 .data = &sysctl_sched_shares_window,
353 .maxlen = sizeof(unsigned int),
354 .mode = 0644,
355 .proc_handler = proc_dointvec,
356 },
357#ifdef CONFIG_SCHEDSTATS 351#ifdef CONFIG_SCHEDSTATS
358 { 352 {
359 .procname = "sched_schedstats", 353 .procname = "sched_schedstats",
@@ -423,7 +417,7 @@ static struct ctl_table kern_table[] = {
423 }, 417 },
424 { 418 {
425 .procname = "sched_rr_timeslice_ms", 419 .procname = "sched_rr_timeslice_ms",
426 .data = &sched_rr_timeslice, 420 .data = &sysctl_sched_rr_timeslice,
427 .maxlen = sizeof(int), 421 .maxlen = sizeof(int),
428 .mode = 0644, 422 .mode = 0644,
429 .proc_handler = sched_rr_handler, 423 .proc_handler = sched_rr_handler,
@@ -634,7 +628,7 @@ static struct ctl_table kern_table[] = {
634 .data = &tracepoint_printk, 628 .data = &tracepoint_printk,
635 .maxlen = sizeof(tracepoint_printk), 629 .maxlen = sizeof(tracepoint_printk),
636 .mode = 0644, 630 .mode = 0644,
637 .proc_handler = proc_dointvec, 631 .proc_handler = tracepoint_printk_sysctl,
638 }, 632 },
639#endif 633#endif
640#ifdef CONFIG_KEXEC_CORE 634#ifdef CONFIG_KEXEC_CORE
@@ -990,13 +984,6 @@ static struct ctl_table kern_table[] = {
990 .proc_handler = proc_dointvec, 984 .proc_handler = proc_dointvec,
991 }, 985 },
992 { 986 {
993 .procname = "kstack_depth_to_print",
994 .data = &kstack_depth_to_print,
995 .maxlen = sizeof(int),
996 .mode = 0644,
997 .proc_handler = proc_dointvec,
998 },
999 {
1000 .procname = "io_delay_type", 987 .procname = "io_delay_type",
1001 .data = &io_delay_type, 988 .data = &io_delay_type,
1002 .maxlen = sizeof(int), 989 .maxlen = sizeof(int),
@@ -2403,9 +2390,11 @@ static void validate_coredump_safety(void)
2403#ifdef CONFIG_COREDUMP 2390#ifdef CONFIG_COREDUMP
2404 if (suid_dumpable == SUID_DUMP_ROOT && 2391 if (suid_dumpable == SUID_DUMP_ROOT &&
2405 core_pattern[0] != '/' && core_pattern[0] != '|') { 2392 core_pattern[0] != '/' && core_pattern[0] != '|') {
2406 printk(KERN_WARNING "Unsafe core_pattern used with "\ 2393 printk(KERN_WARNING
2407 "suid_dumpable=2. Pipe handler or fully qualified "\ 2394"Unsafe core_pattern used with fs.suid_dumpable=2.\n"
2408 "core dump path required.\n"); 2395"Pipe handler or fully qualified core dump path required.\n"
2396"Set kernel.core_pattern before fs.suid_dumpable.\n"
2397 );
2409 } 2398 }
2410#endif 2399#endif
2411} 2400}
@@ -2487,6 +2476,7 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
2487 break; 2476 break;
2488 if (neg) 2477 if (neg)
2489 continue; 2478 continue;
2479 val = convmul * val / convdiv;
2490 if ((min && val < *min) || (max && val > *max)) 2480 if ((min && val < *min) || (max && val > *max))
2491 continue; 2481 continue;
2492 *i = val; 2482 *i = val;