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: <20250220232451.GA319309@bhelgaas>
Date: Thu, 20 Feb 2025 17:24:51 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: manivannan.sadhasivam@...aro.org
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
	Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v3 3/5] PCI/pwrctrl: Skip scanning for the device further
 if pwrctrl device is created

On Thu, Jan 16, 2025 at 07:39:13PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> 
> The pwrctrl core will rescan the bus once the device is powered on. So
> there is no need to continue scanning for the device further.

> @@ -2487,7 +2487,14 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn)
>  	struct pci_dev *dev;
>  	u32 l;
>  
> -	pci_pwrctrl_create_device(bus, devfn);
> +	/*
> +	 * Create pwrctrl device (if required) for the PCI device to handle the
> +	 * power state. If the pwrctrl device is created, then skip scanning
> +	 * further as the pwrctrl core will rescan the bus after powering on
> +	 * the device.
> +	 */
> +	if (pci_pwrctrl_create_device(bus, devfn))
> +		return NULL;

I assume it's possible for the PCI device to already be powered on
even if there's a pwrctrl device for it?

Does this change the enumeration order in that case?  It sounds like
it may delay enumeration of the PCI device until the pwrctrl core
rescans the bus?

I hope that the enumeration order of all devices that are already
powered on at boot time is unchanged.

>  	if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000))
>  		return NULL;
> 
> -- 
> 2.25.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ