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]
Date:   Tue, 18 Aug 2020 14:52:18 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Tony Lindgren <tony@...mide.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Raul Rangel <rrangel@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH] uart:8250: change lock order in serial8250_do_startup()

On Fri 2020-08-14 12:59:28, Andy Shevchenko wrote:
> On Fri, Aug 14, 2020 at 10:38:02AM +0900, Sergey Senozhatsky wrote:
> > We have a number of "uart.port->desc.lock vs desc.lock->uart.port"
> > lockdep reports coming from 8250 driver; this causes a bit of trouble
> > to people, so let's fix it.
> > 
> 
> I guess we may add some tags here
> 
> Fixes: 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and RT kernels")
> Reported-by: Guenter Roeck <linux@...ck-us.net>
> Reported-by: Raul Rangel <rrangel@...gle.com>
> BugLink: https://bugs.chromium.org/p/chromium/issues/detail?id=1114800
> Link: https://lore.kernel.org/lkml/CAHQZ30BnfX+gxjPm1DUd5psOTqbyDh4EJE=2=VAMW_VDafctkA@mail.gmail.com/T/#u

"Link:" tag should point to the mail that is applied using git am.
I am not sure if there is a tag for related discussion in another
mail threads.

A solution might be to add a comment like:

This solution has been discussed in several threads:
https://lore.kernel.org/lkml/CAHQZ30BnfX+gxjPm1DUd5psOTqbyDh4EJE=2=VAMW_VDafctkA@mail.gmail.com/T/#u
https://lore.kernel.org/lkml/20200812154813.GA46894@roeck-us.net/#t


> > --- a/drivers/tty/serial/8250/8250_port.c
> > +++ b/drivers/tty/serial/8250/8250_port.c
> > @@ -2275,6 +2275,11 @@ int serial8250_do_startup(struct uart_port *port)
> >  
> >  	if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
> >  		unsigned char iir1;
> 
> > +		bool irq_shared = up->port.irqflags & IRQF_SHARED;
> 
> I'm wondering why we need a temporary variable? This flag is not supposed to be
> changed in between, can we leave original conditionals?
> 
> Nevertheless I noticed an inconsistency of the dereference of the flags which
> seems to be brough by dfe42443ea1d ("serial: reduce number of indirections in
> 8250 code").
> 
> I think we can stick with newer:
> 
> 		if (port->irqflags & IRQF_SHARED)

Sounds reasonable to me.

Andy proposed many changes. Sergey, could you please send v2?

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ