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: <mxlpkktc34utdc6tr6apf4g5t3cdq6ckdbsern5s24t2bxlsva@e6e667l2wd2j>
Date: Fri, 17 Oct 2025 16:03:00 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Marek Vasut <marek.vasut+renesas@...lbox.org>
Cc: linux-pci@...r.kernel.org, 
	Krzysztof Wilczyński <kwilczynski@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, 
	Christian Bruel <christian.bruel@...s.st.com>, Geert Uytterhoeven <geert+renesas@...der.be>, 
	Inochi Amaoto <inochiama@...il.com>, Lorenzo Pieralisi <lpieralisi@...nel.org>, 
	Magnus Damm <magnus.damm@...il.com>, Mayank Rana <mayank.rana@....qualcomm.com>, 
	Nam Cao <namcao@...utronix.de>, Rob Herring <robh@...nel.org>, 
	Shradha Todi <shradha.t@...sung.com>, Thippeswamy Havalige <thippeswamy.havalige@....com>, 
	Thomas Gleixner <tglx@...utronix.de>, Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>, 
	linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] PCI: controller: Mark controllers which cannot do
 lockless config access with !PCI_LOCKLESS_CONFIG

On Thu, Sep 25, 2025 at 03:49:45PM +0200, Marek Vasut wrote:
> Add 'depends on !PCI_LOCKLESS_CONFIG' to controllers which cannot do config
> access without PCI subsystem level spinlock.

May I know on what basis you have added the Kconfig dependency? Because, all
non-x86 and um drivers are going to suffer from the race if PCI_LOCKLESS_CONFIG
is selected. But you've only added the dependency to selected drivers.

- Mani

> If PCI_LOCKLESS_CONFIG is ever
> enabled, those controllers would have to be updated accordingly.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@...lbox.org>
> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@...nel.org>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Christian Bruel <christian.bruel@...s.st.com>
> Cc: Geert Uytterhoeven <geert+renesas@...der.be>
> Cc: Inochi Amaoto <inochiama@...il.com>
> Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>
> Cc: Magnus Damm <magnus.damm@...il.com>
> Cc: Manivannan Sadhasivam <mani@...nel.org>
> Cc: Mayank Rana <mayank.rana@....qualcomm.com>
> Cc: Nam Cao <namcao@...utronix.de>
> Cc: Rob Herring <robh@...nel.org>
> Cc: Shradha Todi <shradha.t@...sung.com>
> Cc: Thippeswamy Havalige <thippeswamy.havalige@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-pci@...r.kernel.org
> Cc: linux-renesas-soc@...r.kernel.org
> ---
> NOTE: I hope I got them all
> ---
>  drivers/pci/controller/Kconfig      | 6 ++++++
>  drivers/pci/controller/dwc/Kconfig  | 5 +++++
>  drivers/pci/controller/plda/Kconfig | 1 +
>  3 files changed, 12 insertions(+)
> 
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 41748d083b933..1a6e937cca929 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -12,6 +12,7 @@ config PCI_AARDVARK
>  	depends on (ARCH_MVEBU && ARM64) || COMPILE_TEST
>  	depends on OF
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCI_BRIDGE_EMUL
>  	select IRQ_MSI_LIB
>  	help
> @@ -205,6 +206,7 @@ config PCIE_MEDIATEK_GEN3
>  	tristate "MediaTek Gen3 PCIe controller"
>  	depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select IRQ_MSI_LIB
>  	help
>  	  Adds support for PCIe Gen3 MAC controller for MediaTek SoCs.
> @@ -244,6 +246,7 @@ config PCIE_RCAR_HOST
>  	bool "Renesas R-Car PCIe controller (host mode)"
>  	depends on ARCH_RENESAS || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select IRQ_MSI_LIB
>  	help
>  	  Say Y here if you want PCIe controller support on R-Car SoCs in host
> @@ -332,6 +335,7 @@ config PCIE_XILINX_DMA_PL
>  	bool "Xilinx DMA PL PCIe host bridge support"
>  	depends on ARCH_ZYNQMP || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCI_HOST_COMMON
>  	select IRQ_MSI_LIB
>  	help
> @@ -344,6 +348,7 @@ config PCIE_XILINX_NWL
>  	bool "Xilinx NWL PCIe controller"
>  	depends on ARCH_ZYNQMP || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select IRQ_MSI_LIB
>  	help
>  	 Say 'Y' here if you want kernel support for Xilinx
> @@ -354,6 +359,7 @@ config PCIE_XILINX_NWL
>  config PCIE_XILINX_CPM
>  	bool "Xilinx Versal CPM PCI controller"
>  	depends on ARCH_ZYNQMP || COMPILE_TEST
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCI_HOST_COMMON
>  	help
>  	  Say 'Y' here if you want kernel support for the
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 34abc859c1071..8eab27775195f 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -2,6 +2,7 @@
>  
>  menu "DesignWare-based PCIe controllers"
>  	depends on PCI
> +	depends on !PCI_LOCKLESS_CONFIG
>  
>  config PCIE_DW
>  	bool
> @@ -322,6 +323,7 @@ config PCIE_RCAR_GEN4_HOST
>  	tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
>  	depends on ARCH_RENESAS || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCIE_DW_HOST
>  	select PCIE_RCAR_GEN4
>  	help
> @@ -390,6 +392,7 @@ config PCIE_UNIPHIER
>  	depends on ARCH_UNIPHIER || COMPILE_TEST
>  	depends on OF && HAS_IOMEM
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCIE_DW_HOST
>  	help
>  	  Say Y here if you want PCIe host controller support on UniPhier SoCs.
> @@ -410,6 +413,7 @@ config PCIE_SOPHGO_DW
>  	depends on ARCH_SOPHGO || COMPILE_TEST
>  	depends on PCI_MSI
>  	depends on OF
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCIE_DW_HOST
>  	help
>  	  Say Y here if you want PCIe host controller support on
> @@ -488,6 +492,7 @@ config PCI_KEYSTONE_HOST
>  	bool "TI Keystone PCIe controller (host mode)"
>  	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
>  	depends on PCI_MSI
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCIE_DW_HOST
>  	select PCI_KEYSTONE
>  	help
> diff --git a/drivers/pci/controller/plda/Kconfig b/drivers/pci/controller/plda/Kconfig
> index 62120101139cb..2a400678312eb 100644
> --- a/drivers/pci/controller/plda/Kconfig
> +++ b/drivers/pci/controller/plda/Kconfig
> @@ -10,6 +10,7 @@ config PCIE_PLDA_HOST
>  config PCIE_MICROCHIP_HOST
>  	tristate "Microchip AXI PCIe controller"
>  	depends on PCI_MSI && OF
> +	depends on !PCI_LOCKLESS_CONFIG
>  	select PCI_HOST_COMMON
>  	select PCIE_PLDA_HOST
>  	help
> -- 
> 2.51.0
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ