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: <1328d293-7c42-b29b-9cce-507cf25de97a@socionext.com>
Date:   Thu, 19 Aug 2021 19:01:39 +0900
From:   Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
To:     Pali Rohár <pali@...nel.org>
Cc:     Marc Zyngier <maz@...nel.org>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: pcie-uniphier: race condition in masking/unmasking interrupts

Hi Pali,

On 2021/08/18 20:38, Pali Rohár wrote:
> Hello!
> 
> Marc pointed during review of pci-aardvark patches one issue which I see
> that is available also in the current pcie-uniphier.c driver.
> 
> When masking or unmasking interrupts there is read-modify-write sequence
> for PCL_RCV_INTX_MASK_SHIFT register without any locking:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-uniphier.c?h=v5.13#n171
> 
> So when trying to mask/unmask two interrupts at the same time there is
> race condition as updating that PCL_RCV_INTX_MASK_SHIFT register is not
> atomic.
> 
> Could you look at it?
Thank you for pointing out.
I'll update the mask/unmask/ack operations to avoid race condition.

Thank you,

---
Best Regards
Kunihiko Hayashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ