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] [day] [month] [year] [list]
Date:   Thu, 13 Feb 2020 18:09:05 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        "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 (20/02/13 09:39), Petr Mladek wrote:
> > >  	struct console_cmdline *c;
> > >  	int i;
> > > @@ -2131,6 +2131,8 @@ static int __add_preferred_console(char *name, int idx, char *options,
> > >  		if (strcmp(c->name, name) == 0 && c->index == idx) {
> > >  			if (!brl_options)
> > >  				preferred_console = i;
> > > +                       if (user_specified)
> > > +                               c->user_specified = true;
> > >  			return 0;
> > >  		}
> > >  	}

[..]

> > A silly question:
> > 
> > Can the same console first be added by
> > 	console_setup()->__add_preferred_console(true)
> > and then by
> > 	add_preferred_console()->__add_preferred_console(false)
> 
> I guess that this might happen. It should be safe because
> user_specified flag is set only to true when found again,
> see:
> 
>                        if (user_specified)
>                                c->user_specified = true;

Yikes, I didn't see the if-condition. Yes, you are right.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ