• Xiaoming Ni's avatar
    sysctl: move some boundary constants from sysctl.c to sysctl_vals · 78e36f3b
    Xiaoming Ni authored
    sysctl has helpers which let us specify boundary values for a min or max
    int value.  Since these are used for a boundary check only they don't
    change, so move these variables to sysctl_vals to avoid adding duplicate
    variables.  This will help with our cleanup of kernel/sysctl.c.
    
    [akpm@linux-foundation.org: update it for "mm/pagealloc: sysctl: change watermark_scale_factor max limit to 30%"]
    [mcgrof@kernel.org: major rebase]
    
    Link: https://lkml.kernel.org/r/20211123202347.818157-3-mcgrof@kernel.orgSigned-off-by: default avatarXiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Amir Goldstein <amir73il@gmail.com>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Benjamin LaHaise <bcrl@kvack.org>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Paul Turner <pjt@google.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Petr Mladek <pmladek@suse.com>
    Cc: Qing Wang <wangqing@vivo.com>
    Cc: Sebastian Reichel <sre@kernel.org>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Clemens Ladisch <clemens@ladisch.de>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Julia Lawall <julia.lawall@inria.fr>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Phillip Potter <phil@philpotter.co.uk>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Douglas Gilbert <dgilbert@interlog.com>
    Cc: James E.J. Bottomley <jejb@linux.ibm.com>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Cc: John Ogness <john.ogness@linutronix.de>
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: "Rafael J. Wysocki" <rafael@kernel.org>
    Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    78e36f3b
proc_sysctl.c 47.1 KB