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: <Z7y2e-EJLijQsp8D@wunner.de>
Date: Mon, 24 Feb 2025 19:12:11 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
	Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@...ux.intel.com>,
	Liguang Zhang <zhangliguang@...ux.alibaba.com>,
	Guanghui Feng <guanghuifeng@...ux.alibaba.com>, rafael@...nel.org,
	Markus Elfring <Markus.Elfring@....de>, lkp@...el.com,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	ilpo.jarvinen@...ux.intel.com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/4] PCI/portdrv: Add necessary wait for disabling
 hotplug events

On Mon, Feb 24, 2025 at 11:44:58AM +0800, Feng Tang wrote:
> @@ -255,8 +271,7 @@ static int get_port_device_capability(struct pci_dev *dev)
>  		 * Disable hot-plug interrupts in case they have been enabled
>  		 * by the BIOS and the hot-plug service driver is not loaded.
>  		 */
> -		pcie_capability_clear_word(dev, PCI_EXP_SLTCTL,
> -			  PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_HPIE);
> +		pcie_disable_hp_interrupts_early(dev);
>  	}

Moving the Slot Control code from pciehp to portdrv (as is done in
patch 1 of this series) is hackish.  It should be avoided if at all
possible.

As I've already said before...

https://lore.kernel.org/all/Z6HYuBDP6uvE1Sf4@wunner.de/

...it seems clearing those interrupts is only necessary
in the CONFIG_HOTPLUG_PCI_PCIE=n case.  And in that case,
there is no second Slot Control write, so there is no delay
to be observed.

Hence the proper solution is to make the clearing of the
interrupts conditional on: !IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE)

You keep sending new versions of these patches that do not
incorporate the feedback I provided in the above-linked e-mail.

Please re-read that e-mail and verify if the solution that
I proposed solves the problem.  That solution does not
require moving the Slot Control code from pciehp to portdrv.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ