[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200416150835.13c0b13e406c694d63bdcd47@kernel.org>
Date: Thu, 16 Apr 2020 15:08:35 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
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>
Subject: Re: [PATCH v2 0/3] support setting sysctl parameters from kernel
command line
On Wed, 15 Apr 2020 10:56:35 +0200
Vlastimil Babka <vbabka@...e.cz> wrote:
> On 4/15/20 5:23 AM, Masami Hiramatsu wrote:
> > Hi Vlastimil,
> >
> > On Tue, 14 Apr 2020 13:32:19 +0200
> > Vlastimil Babka <vbabka@...e.cz> wrote:
> >
> >> 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
> >
> > Sounds good. And would you consider to use the bootconfig instead of (or
> > in addition to) the kernel command line, because it is too short to describe
> > the sysctl options?
>
> "Instead of" - no, as that would defeat the scenario of "I just want to set this
> one sysctl in grub (possibly interactively) and not update initrd for that". If
> constructing bootconfig is of similar effort of loading sysctl.conf from initrd,
> then I see little benefit?
>
> "in addition to" - sure! but I hoped that's what already happens as it seemed to
> me that options from bootconfig are appended to the command line that's then
> parsed by everyone else, no? But I'll try it to be sure.
Yes, all configurations under "kernel" key are passed to kernel command line,
so you don't need to change anything :)
> > With the bootconfig, you can describe the sysctl parameters in an
> > independent file as same as /etc/sysctl.conf. It is easy to convert
> > form sysctl.conf to bootconfig because bootconfig format is simply
> > enhanced structured sysctl.conf :). What we just need is;
> >
> > (echo "sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf
> > bootconfig -a sysctl.bconf /boot/initrd.img
> >
> > Even with only your patch, since bootconfig can pass the options which
> > start with "kernel." prefix to kernel command line, so;
> >
> > (echo "kernel.sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf
> > bootconfig -a sysctl.bconf /boot/initrd.img
>
> Hmm I hope I figure out if the way virtme creates initrd on the fly supports
> hooking a bootconfig addition :)
Would you mean how to hook the mkinitrd to add /etc/bootconfig?
Thank you,
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists