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, 30 Jul 2020 10:59:27 +0200
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Horia Geantă <horia.geanta@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Rob Herring <robh+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        André Draszik <git@...red.net>,
        Robin Gong <yibin.gong@....com>,
        Anson Huang <anson.huang@....com>,
        Fabio Estevam <festevam@...il.com>,
        Aymen Sghaier <aymen.sghaier@....com>,
        Adam Ford <aford173@...il.com>, linux-input@...r.kernel.org,
        linux-crypto@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, NXP Linux Team <linux-imx@....com>
Subject: Re: [PATCH v3 3/3] Input: snvs_pwrkey - only IRQ_HANDLED for our own
 events

Hi Dmitry,

On 20-07-29 23:06, Dmitry Torokhov wrote:
> Hi Marco,
> 
> On Wed, Jul 29, 2020 at 09:55:13AM +0200, Marco Felsch wrote:
> > Hi,
> > 
> > On 20-07-23 10:43, Horia Geantă wrote:
> > > From: André Draszik <git@...red.net>
> > > 
> > > The snvs_pwrkey shares the SNVS LPSR status register with the snvs_rtc.
> > > 
> > > This driver here should only return IRQ_HANDLED if the status register
> > > indicates that the event we're handling in the irq handler was genuinely
> > > intended for this driver. Otheriwse the interrupt subsystem will
> > > assume the interrupt was handled successfully even though it wasn't
> > > at all.
> > 
> > After checking the RM and the imx6qdl.dtsi I'm not very sure that this
> > is right since the snvs-powerkey has a seperate irq-line. So we can be
> > sure that this irq is for us. If this is the case we don't need to check
> > the SNVS_LPSR_REG instead we only need to clear it.
> 
> Wouldn't we want to know if for some reason we get spurious interrupts?

We could check the bit at the very begin of the IRQ and return early but
according the RM this should never happen. Anyway you're right HW is
never bug free.

Regards,
  Marco

> Thanks.
> 
> -- 
> Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ