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: <ZVsZ9-v3r-GPfFhF@hovoldconsulting.com>
Date:   Mon, 20 Nov 2023 09:33:59 +0100
From:   Johan Hovold <johan@...nel.org>
To:     "David E. Box" <david.e.box@...ux.intel.com>
Cc:     Johan Hovold <johan+linaro@...nel.org>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Rob Herring <robh@...nel.org>,
        Nirmal Patel <nirmal.patel@...ux.intel.com>,
        Jonathan Derrick <jonathan.derrick@...ux.dev>,
        linux-arm-msm@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 1/6] PCI/ASPM: Add locked helper for enabling link state

On Fri, Nov 17, 2023 at 04:00:46PM -0800, David E. Box wrote:
> On Tue, 2023-11-14 at 14:55 +0100, Johan Hovold wrote:
> > Add a helper for enabling link states that can be used in contexts where
> > a pci_bus_sem read lock is already held (e.g. from pci_walk_bus()).
> > 
> > This helper will be used to fix a couple of potential deadlocks where
> > the current helper is called with the lock already held, hence the CC
> > stable tag.

> This solution is similar to the original one I proposed [1]. It just creates a
> separate locked function rather than using a flag. While the API is consistent
> with pci_disable_link_state_locked(), its usage is not. The vmd driver calls
> pci_enable_link_state() from pci_walk_bus() which was problematic for Bjorn [2].
> I owed an attempt to implement this as a fixup. However, now
> qcom_pcie_enabled_aspm() is also using it from pci_walk_bus(). The fixup could
> make sense for VMD since there it's fixing missing BIOS settings, but I'm not
> sure about qcom. Bjorn, do you still see issues with the use in pci_bus_walk()?

We need this for Qualcomm platforms where the boot firmware does not
enable ASPM, and the hotplug inconsistency was also discussed with Bjorn
here:

	https://lore.kernel.org/linux-pci/20231018164731.GA1365588@bhelgaas/

> [1]
> https://lore.kernel.org/lkml/20230321233849.3408339-1-david.e.box@linux.intel.com/
> 
> [2] https://lore.kernel.org/lkml/20230322205702.GA2493123@bhelgaas/

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ