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: <aDLFG06J-kXnvckG@wunner.de>
Date: Sun, 25 May 2025 09:22:03 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: bhelgaas@...gle.com, lpieralisi@...nel.org, kw@...ux.com,
	linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org, cassel@...nel.org,
	wilfred.mallawa@....com
Subject: Re: [PATCH 1/2] PCI: Save and restore root port config space in
 pcibios_reset_secondary_bus()

On Sun, May 25, 2025 at 12:23:03AM +0530, Manivannan Sadhasivam wrote:
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4985,10 +4985,19 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
>  	struct pci_host_bridge *host = pci_find_host_bridge(dev->bus);
>  	int ret;
>  
> -	if (host->reset_slot) {
> +	if (pci_is_root_bus(dev->bus) && host->reset_slot) {
> +		/*
> +		 * Save the config space of the root port before doing the
> +		 * reset, since the state could be lost. The device state
> +		 * should've been saved by the caller.
> +		 */
> +		pci_save_state(dev);
>  		ret = host->reset_slot(host, dev);

Nit:  Capitalize terms as the PCIe Base Spec does, i.e. "Root Port".

"The device state" is ambiguous as the Root Port is a device itself
and even referred to by the "dev" variable.  I think what you mean
is "The Endpoint state".

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ