[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200414113222.16959-1-vbabka@suse.cz>
Date: Tue, 14 Apr 2020 13:32:19 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>
Cc: linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-mm@...ck.org, Ivan Teterevkov <ivan.teterevkov@...anix.com>,
Michal Hocko <mhocko@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
"Guilherme G . Piccoli" <gpiccoli@...onical.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH v2 0/3] support setting sysctl parameters from kernel command line
This series adds support for something that seems like many people always
wanted but nobody added it yet, so here's the ability to set sysctl parameters
via kernel command line options in the form of sysctl.vm.something=1
The important part is Patch 1. The second, not so important part is an attempt
to clean up legacy one-off parameters that do the same thing as a sysctl.
I don't want to remove them completely for compatibility reasons, but with
generic sysctl support the idea is to remove the one-off param handlers and
treat the parameters as aliases for the sysctl variants.
I have identified several parameters that mention sysctl counterparts in
Documentation/admin-guide/kernel-parameters.txt but there might be more. The
conversion also has varying level of success:
- numa_zonelist_order is converted in Patch 2 together with adding the
necessary infrastructure. It's easy as it doesn't really do anything but warn
on deprecated value these days.
- hung_task_panic is converted in Patch 3, but there's a downside that now it
only accepts 0 and 1, while previously it was any integer value
- nmi_watchdog maps to two sysctls nmi_watchdog and hardlockup_panic, so
there's no straighforward conversion possible
- traceoff_on_warning is a flag without value and it would be required to
handle that somehow in the conversion infractructure, which seems pointless
for a single flag
Vlastimil Babka (3):
kernel/sysctl: support setting sysctl parameters from kernel command
line
kernel/sysctl: support handling command line aliases
kernel/hung_task convert hung_task_panic boot parameter to sysctl
Changes since v1:
- add missing newlines on printk's
- more adjustments to proc mount param passing (Kees)
- rebase to 5.7-rc1
- add acks/reviews
- test driver (how to pass a testing boot parameter without bootloader specific
steps) still under discussion - new Kconfig? bootconfig?
.../admin-guide/kernel-parameters.txt | 11 +-
fs/proc/proc_sysctl.c | 142 ++++++++++++++++++
include/linux/sysctl.h | 4 +
init/main.c | 2 +
kernel/hung_task.c | 10 --
mm/page_alloc.c | 9 --
6 files changed, 158 insertions(+), 20 deletions(-)
--
2.26.0
Powered by blists - more mailing lists