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: <aSnWyePbCKPvjpKq@wunner.de>
Date: Fri, 28 Nov 2025 18:07:21 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Darshit Shah <darnshah@...zon.de>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
	Krzysztof WilczyƄski <kwilczynski@...nel.org>,
	Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>,
	Jonathan Cameron <Jonthan.Cameron@...wei.com>, darnir@....org,
	Feng Tang <feng.tang@...ux.alibaba.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, nh-open-source@...zon.com
Subject: Re: [PATCH] drivers/pci: Allow attaching AER to non-RP devices that
 support MSI

On Fri, Nov 28, 2025 at 12:20:53PM +0000, Darshit Shah wrote:
> Previously portdrv tried to prevent non-Root Port (RP) and non-Root
> Complex Event Collector (RCEC) devices from enabling AER capability.
> This was done because some switches enable AER but do not support MSI.

The AER driver only binds to RPs and RCECs, see aer_probe():

	if ((pci_pcie_type(port) != PCI_EXP_TYPE_RC_EC) &&
	    (pci_pcie_type(port) != PCI_EXP_TYPE_ROOT_PORT))
		return -ENODEV;

So there's no point in adding PCIE_PORT_SERVICE_AER to "services"
for other port types (as your patch does).

> However, it is possible to have switches upstream of an endpoint that
> support MSI and AER. Without AER capability being enabled on such
> a switch, portdrv will refuse to enable the DPC capability as well,
> preventing a PCIe error on an endpoint from being handled by the switch.

I assume you're referring to this clause in get_port_device_capability():

	if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) &&
	    pci_aer_available() &&
	    (pcie_ports_dpc_native || (services & PCIE_PORT_SERVICE_AER)))
		services |= PCIE_PORT_SERVICE_DPC;

Presumably on your system, BIOS doesn't grant AER handling to the OS
upon _OSC negotiation?  Is there a BIOS knob to change that?
Alternatively, does passing "pcie_ports=dpc-native" fix the issue?
If it does, why do you need the patch instead of using the command line
option?

> Allow enabling the AER service on non-RP, non-RCEC devices if they still
> support both AER and MSI. This allows switches upstream of an endpoint
> to generate and handle DPC events.

Per PCIe r7.0 sec 7.8.4.9, regarding the Root Error Command Register:

   "For Functions other than Root Ports and Root Complex Event Collectors:
   when End-End TLP Prefix Supported is Set or Flit Mode Supported is Set,
   this register is RsvdP, otherwise [...] this register is not required
   to be implemented."

Hence we can't enable AER handling on anything else than RPs and RCECs.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ