On Wed, 1 Apr 2026 08:51:48 -0700
Breno Leitao <[email protected]> wrote:

> On Wed, Apr 01, 2026 at 11:02:55PM +0900, Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <[email protected]>
> > 
> > If user configures `kernel.key` in bootconfig, the 'key' is shown
> > in kernel cmdline (/proc/cmdline) and kernel boot parameter
> > handler associated with 'key' is invoked. However, since the
> > bootconfig does not support the parameter defined with early_param,
> > those keys are shown in '/proc/cmdline' but not handled by kernel.
> > 
> > This could easily mislead users who expected to be able to specify
> > early parameters via the boot configuration, leading them to wonder
> > why it doesn't work.
> > 
> > Let's skip printing out early params to cmdline buffer, and warn
> > if there is such parameters in bootconfig.
> > 
> > Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
> 
> Reviewed-by: Breno Leitao <[email protected]>

Thanks, but sashiko found a problem.

https://sashiko.dev/#/patchset/177505217508.1807250.22866077077504564.stgit%40mhiramat.tok.corp.google.com

| Will this inadvertently filter out parameters that have both early and
| normal handlers?
| For example, "console" is defined as both an early parameter and a normal
| parameter. If a user configures kernel.console in bootconfig, this loop
| will find the early_param entry and return true.

Let me update it. I need to check (is_early_param() && !is_normal_param()).

Thanks!

> 
> > +static bool __init is_early_param(const char *param)
> > +{
> > +   const struct obs_kernel_param *p;
> > +
> > +   for (p = __setup_start; p < __setup_end; p++) {
> > +           if (p->early && parameq(param, p->str))
> > +                   return true;
> > +   }
> 
> nit: I don't think you need the parenthesis ({) for the ifs in here.
> 


-- 
Masami Hiramatsu (Google) <[email protected]>

Reply via email to