lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52b18db7c4c74fc759bf455e7e4acfb1a404951b.camel@kernel.crashing.org>
Date:   Tue, 11 Feb 2020 16:33:57 +0100
From:   Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/3] printk: Fix preferred console selection with
 multiple matches

On Tue, 2020-02-11 at 15:41 +0100, Petr Mladek wrote:
> 
> > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> > index 17602d7b7ffc..5cf47a7b880c 100644
> > --- a/kernel/printk/printk.c
> > +++ b/kernel/printk/printk.c
> > @@ -2674,8 +2679,13 @@ static int try_enable_new_console(struct console *newcon)
> >  	/*
> >           * Some consoles, such as pstore and netconsole, can be enabled even
> >           * without matching.
> > +	 *
> > +	 * Note: We only do this test on the !user_specified pass so that such
> > +	 * a statically enabled console that isn't user specified gets a chance
> > +	 * to have its match() or setup() function called on our second pass
> > +	 * through this function.
> 
> I had some troubles to part the comment. I wonder if the following is
> more clear:
> 
> 	* Accept pre-enabled consoles only when match() and setup()
> 	* was called.

Yeah the sentence is a bit convoluted, I agree. As for the fix, see
below

> And I would do the same check as in the for cycle:
> 
> 	if (newcon->flags & CON_ENABLED && c->user_specified ==	user_specified)
> 		return 0;

Fair enough, this is simpler.

> With the above change:
> 
> Reviewed-by: Petr Mladek <pmladek@...e.com>
> 
> I could do the change when pushing if you agree and v4 is not needed
> for other reasons.

Of course. I'm travelling this week (which is why I somewhat rushed
sending you the patches last week, hence the glitches you noted), so I
won't have a chance to repost until sometime next week.

> 
> PS: JFYI, I am going to look at the 3rd patch tomorrow. I have to go now.

No worries. It's not super important, it's a minor thing I noticed
while testing (when I artifically make my consoles not match to test
the "default" fallback). It's not directly related to the fix in patch
2, but is completely standlaone.

Cheers,
Ben.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ