lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] kernel/sysctl: support setting sysctl parameters from kernel command line
On Wed, Apr 15, 2020 at 06:03:55PM +0900, Masami Hiramatsu wrote:
> On Tue, 14 Apr 2020 13:32:20 +0200
> Vlastimil Babka <vbabka@suse.cz> wrote:
> > diff --git a/init/main.c b/init/main.c
> > index a48617f2e5e5..7b43118215d6 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -1372,6 +1372,8 @@ static int __ref kernel_init(void *unused)
> >
> > rcu_end_inkernel_boot();
> >
> > + do_sysctl_args();
> > +
>
> Ah, I see. Since the sysctl is designed to be called after all __init calls were
> done, it shouldn't use bootconfig directly because bootconfig is full of __init
> call.

The idea is bootconfig would be useful in the sense of a library set of
helpers which could be modified to remove __init, and then used to
instrument the cmdline depending on certain debugging kconfig entries.

We currently have no way to purposely extend / break the cmdline for
debugging purposes, so, bootconfig's parsers, since it already has a
way to extend the cmdlineline, might make it much easier to do this
later.

Without bootconfig, if we wanted to add new kconfig to, for example,
add new funny cmdline arguments to test they worked or not, we'd have
to devise our own set of helpers now. ie, new functionality. bootconfig
however already has existing functionality to tweak the cmdline, and so
some code could be leveraged there for this purpose.

Luis

\
 
 \ /
  Last update: 2020-04-16 03:30    [W:0.733 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site