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]
Message-ID: <VI1PR0402MB3824CCEEB23EF38126BEF50DAE4B0@VI1PR0402MB3824.eurprd04.prod.outlook.com>
Date:   Wed, 5 Aug 2020 06:30:13 +0000
From:   Jason Liu <jason.hui.liu@....com>
To:     Sudeep Holla <sudeep.holla@....com>
CC:     "will@...nel.org" <will@...nel.org>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        "maz@...nel.org" <maz@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] arm64: kexec: no need to do irq_chip->irq_mask if it
 already masked


> -----Original Message-----
> From: Sudeep Holla <sudeep.holla@....com>
> Sent: Tuesday, August 4, 2020 6:20 PM
> To: Jason Liu <jason.hui.liu@....com>
> Cc: will@...nel.org; catalin.marinas@....com; ashal@...nel.org;
> maz@...nel.org; linux-arm-kernel@...ts.infradead.org;
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 1/1] arm64: kexec: no need to do irq_chip->irq_mask if it
> already masked
> 
> +Marc Z
> 
> On Tue, Aug 04, 2020 at 04:56:57PM +0800, Jason Liu wrote:
> > No need to do the irq_chip->irq_mask() if it already masked.
> > BTW, unconditionally do the irq_chip->irq_mask() will also bring
> > issues when the irq_chip in the runtime PM suspend. Accessing
> > registers of the irq_chip will bring in the exceptions. For example on the i.MX:
> >
> 
> The change looks good and is inline with the additional checks we do for eoi
> and disable. However, the imx_irqsteer_irq_mask is not safe to be called with
> runtime suspend. 

Yes, you are right. imx_irqsteer_irq_mask can not be called with irqchip runtime suspend.
IMO, this might apply to all platforms which implement the irq_chip->mask function with
directly access the registers.

> What happens if some driver using the irq on this chip calls
> disable_irq when this irqchip is suspended ?

IMO, only free_irq will call the irq_chip_pm_put which will bring the irqchip to suspend if that irq is the last user.
Otherwise, the irqchip is in active state. free_irq will set the IRQ state to DISABLED and MASKED.
So, if the irqchip in suspend state, which means all the irqs(associated with irqchip) were DISABLED and MASKED.
If call the common API disable_irq, that is fine due to the disable_irq will nop if the irq was DISABLED and masked. 

> 
> --
> Regards,
> Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ