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:   Fri, 17 Dec 2021 20:09:29 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Zhiyong Tao <zhiyong.tao@...iatek.com>,
        linux-serial@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Jiri Slaby <jirislaby@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>
Subject: Re: [PATCH v1 1/1] serial: 8520_mtk: Prepare for
 platform_get_irq_optional() changes

On Fri, Dec 17, 2021 at 05:54:55PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Dec 17, 2021 at 05:10:34PM +0200, Andy Shevchenko wrote:
> > The platform_get_irq_optional() is going to be changed in a way
> > that the result of it:
> >    = 0 means no IRQ is provided
> >    < 0 means the error which needs to be propagated to the upper layers
> >    > 0 valid vIRQ is allocated
> 
> What about 0 being a valid irq?

For this driver it can't be possible. The driver is instantiated via DT only
and OF APIs never return 0 for IRQ. If it's the case, it's a regression in the
OF APIs.

I can elaborate in the commit message.

> > In this case, drop check for 0. Note, the 0 is not valid vIRQ and
> > platform_get_irq_optional() issues a big WARN() in such case,
> 
> But it still is a valid irq, so why did you just break things?  Yes, a
> warning will happen, but the driver and platform will still work.

In general yes, but not in this case. See above.

...

> > -	if (irq >= 0)
> > +	if (irq > 0)
> >  		disable_irq_wake(irq);
> 
> Why change this now?  What does this solve at this point in time?

As explained in the commit message, it's a preparation patch to fix the logic
behind platform_get_irq_optional().

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ