linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] support setting sysctl parameters from kernel command line
@ 2020-03-30 11:55 Vlastimil Babka
  2020-03-30 11:55 ` [PATCH 1/3] kernel/sysctl: " Vlastimil Babka
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Vlastimil Babka @ 2020-03-30 11:55 UTC (permalink / raw)
  To: Luis Chamberlain, Kees Cook, Iurii Zaikin
  Cc: linux-kernel, linux-api, linux-mm, Ivan Teterevkov, Michal Hocko,
	David Rientjes, Matthew Wilcox, Eric W . Biederman,
	Guilherme G . Piccoli, Alexey Dobriyan, Thomas Gleixner,
	Greg Kroah-Hartman, Christian Brauner, Vlastimil Babka

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

Anyway I hope that Patch 1 is mature enough to go regardless of the fate of the
less important second part.

Changes since RFCv2
- make proc_mnt internal to functions (Kees)
- use kasprintf when building path (Kees)
- improve error reporting - common errnos are translated to more obvious
  messages and the rest uses %pe

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

 .../admin-guide/kernel-parameters.txt         |  11 +-
 fs/proc/proc_sysctl.c                         | 135 ++++++++++++++++++
 include/linux/sysctl.h                        |   4 +
 init/main.c                                   |   2 +
 kernel/hung_task.c                            |  10 --
 mm/page_alloc.c                               |   9 --
 6 files changed, 151 insertions(+), 20 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2020-04-15  6:08 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 11:55 [PATCH 0/3] support setting sysctl parameters from kernel command line Vlastimil Babka
2020-03-30 11:55 ` [PATCH 1/3] kernel/sysctl: " Vlastimil Babka
2020-03-30 16:23   ` Vlastimil Babka
2020-03-30 17:40     ` Kees Cook
2020-03-30 17:39   ` Kees Cook
2020-03-30 22:44   ` Luis Chamberlain
2020-03-31  7:42     ` Vlastimil Babka
2020-03-31  7:48       ` Michal Hocko
2020-03-31 18:26         ` Kees Cook
2020-03-31 14:31       ` Luis Chamberlain
2020-04-01 11:01     ` Vlastimil Babka
2020-04-02 16:04       ` Luis Chamberlain
2020-04-02 17:23         ` Kees Cook
2020-04-02 20:59           ` Luis Chamberlain
2020-04-03 23:57             ` Kees Cook
2020-04-06 14:08               ` Luis Chamberlain
2020-04-06 15:58                 ` Kees Cook
2020-04-06 17:08                   ` Luis Chamberlain
2020-04-14 11:25                     ` Vlastimil Babka
2020-04-15  3:23                       ` Masami Hiramatsu
2020-04-15  6:08                       ` Luis Chamberlain
2020-03-30 11:55 ` [PATCH 2/3] kernel/sysctl: support handling command line aliases Vlastimil Babka
2020-03-30 17:41   ` Kees Cook
2020-03-31 14:35   ` Luis Chamberlain
2020-03-30 11:55 ` [PATCH 3/3] kernel/hung_task convert hung_task_panic boot parameter to sysctl Vlastimil Babka
2020-03-30 17:43   ` Kees Cook
2020-03-31  0:34     ` John Hubbard
2020-03-31  7:27       ` Vlastimil Babka
2020-03-31 15:49         ` John Hubbard
2020-03-31 23:12   ` Tetsuo Handa
2020-04-01  8:47     ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).