ARC: mmu: clarify the MMUv3 programming model
[linux-2.6-microblaze.git] / kernel / sysctl.c
index a13bbda..8dbaec0 100644 (file)
@@ -65,8 +65,9 @@
 #include <linux/sched/sysctl.h>
 #include <linux/kexec.h>
 #include <linux/bpf.h>
+#include <linux/mount.h>
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <asm/processor.h>
 
 #ifdef CONFIG_X86
@@ -106,9 +107,8 @@ extern unsigned int core_pipe_limit;
 extern int pid_max;
 extern int pid_max_min, pid_max_max;
 extern int percpu_pagelist_fraction;
-extern int compat_log;
 extern int latencytop_enabled;
-extern int sysctl_nr_open_min, sysctl_nr_open_max;
+extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
 #ifndef CONFIG_MMU
 extern int sysctl_nr_trim_pages;
 #endif
@@ -347,13 +347,6 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
        },
-       {
-               .procname       = "sched_shares_window_ns",
-               .data           = &sysctl_sched_shares_window,
-               .maxlen         = sizeof(unsigned int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
 #ifdef CONFIG_SCHEDSTATS
        {
                .procname       = "sched_schedstats",
@@ -634,7 +627,7 @@ static struct ctl_table kern_table[] = {
                .data           = &tracepoint_printk,
                .maxlen         = sizeof(tracepoint_printk),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = tracepoint_printk_sysctl,
        },
 #endif
 #ifdef CONFIG_KEXEC_CORE
@@ -989,13 +982,6 @@ static struct ctl_table kern_table[] = {
                .mode           = 0444,
                .proc_handler   = proc_dointvec,
        },
-       {
-               .procname       = "kstack_depth_to_print",
-               .data           = &kstack_depth_to_print,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
        {
                .procname       = "io_delay_type",
                .data           = &io_delay_type,
@@ -1084,15 +1070,6 @@ static struct ctl_table kern_table[] = {
                .extra1         = &neg_one,
        },
 #endif
-#ifdef CONFIG_COMPAT
-       {
-               .procname       = "compat-log",
-               .data           = &compat_log,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-#endif
 #ifdef CONFIG_RT_MUTEXES
        {
                .procname       = "max_lock_depth",
@@ -1692,7 +1669,7 @@ static struct ctl_table fs_table[] = {
        {
                .procname       = "nr_open",
                .data           = &sysctl_nr_open,
-               .maxlen         = sizeof(int),
+               .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
                .extra1         = &sysctl_nr_open_min,
@@ -1838,6 +1815,14 @@ static struct ctl_table fs_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_doulongvec_minmax,
        },
+       {
+               .procname       = "mount-max",
+               .data           = &sysctl_mount_max,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &one,
+       },
        { }
 };
 
@@ -2404,9 +2389,11 @@ static void validate_coredump_safety(void)
 #ifdef CONFIG_COREDUMP
        if (suid_dumpable == SUID_DUMP_ROOT &&
            core_pattern[0] != '/' && core_pattern[0] != '|') {
-               printk(KERN_WARNING "Unsafe core_pattern used with "\
-                       "suid_dumpable=2. Pipe handler or fully qualified "\
-                       "core dump path required.\n");
+               printk(KERN_WARNING
+"Unsafe core_pattern used with fs.suid_dumpable=2.\n"
+"Pipe handler or fully qualified core dump path required.\n"
+"Set kernel.core_pattern before fs.suid_dumpable.\n"
+               );
        }
 #endif
 }