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]
Message-ID: <20200110103752.GB4273@localhost>
Date:   Fri, 10 Jan 2020 11:37:52 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Jiri Slaby <jslaby@...e.cz>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-serial@...r.kernel.org
Subject: Re: [GIT PULL] TTY/Serial driver fixes for 5.5-rc3

On Fri, Dec 27, 2019 at 06:30:11PM +0000, Sudip Mukherjee wrote:
> On Mon, Dec 23, 2019 at 07:06:51AM -0500, Greg KH wrote:
> > On Fri, Dec 20, 2019 at 10:08:03AM -0800, Linus Torvalds wrote:
> > > On Thu, Dec 19, 2019 at 11:07 PM Greg KH <gregkh@...uxfoundation.org> wrote:
> > > >
> > > > The last tty core fix should resolve a long-standing bug with a race
> > > > at port creation time that some people would see, and Sudip finally
> > > > tracked down.
> > > 
> > > Hmm, looks good. But it makes me wonder if we should now try to remove
> > > the second call to tty_port_link_device()?
> > > 
> > > Now we have a number of helpers that do that tty_port_link_device()
> > > call for the driver (eg tty_port_register_device_attr_serdev(),
> > > tty_port_register_device_attr(), and the just added
> > > uart_add_one_port()).
> > > 
> > > But we also have drivers doing it by hand, and presumably we now have
> > > drivers that do it through multiple paths? I guess it's harmless, but
> > > it feels a bit odd. No?
> > 
> > It does.  I'll try to look at this after the holidays unless Sudip beats
> > me to it.
> 
> The second call to tty_port_link_device() is in
> tty_port_register_device_attr_serdev() and tty_port_register_device_attr()
> is being called from many other places apart from uart_add_one_port().
> The attached patch should be safe. I will test and send it properly unless
> someone objects to it.

No, this is horrid. There's certainly room for some clean up here but we
shouldn't make things worse. ;)

Why not look into registering the console only after the port has been
set up and registered and revert fb2b90014d78 ("tty: link tty and port
before configuring it as console") completely instead?

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ