Restore kernel control of PCIe DPC via option

Bug #1869423 reported by Jay Vosburgh
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

SRU Justification:

Impact:

 Since upstream commit eed85ff4c0da7 (4.16), control of PCIe DPC
(Downstream Port Containment) is coupled with control of AER (Advanced
Error Reporting), eliminating the option for the kernel to separately
manage DPC (which was previously the default behavior).

Fix:

 The upstream commit log explains the change:

commit 35a0b2378c199d4f26e458b2ca38ea56aaf2d9b8
Author: Olof Johansson <email address hidden>
Date: Wed Oct 23 12:22:05 2019 -0700

    PCI/DPC: Add "pcie_ports=dpc-native" to allow DPC without AER control

    Prior to eed85ff4c0da7 ("PCI/DPC: Enable DPC only if AER is available"),
    Linux handled DPC events regardless of whether firmware had granted it
    ownership of AER or DPC, e.g., via _OSC.

    PCIe r5.0, sec 6.2.10, recommends that the OS link control of DPC to
    control of AER, so after eed85ff4c0da7, Linux handles DPC events only if it
    has control of AER.

    On platforms that do not grant OS control of AER via _OSC, Linux DPC
    handling worked before eed85ff4c0da7 but not after.

    To make Linux DPC handling work on those platforms the same way they did
    before, add a "pcie_ports=dpc-native" kernel parameter that makes Linux
    handle DPC events regardless of whether it has control of AER.

    [bhelgaas: commit log, move pcie_ports_dpc_native to drivers/pci/]
    Link: https://<email address hidden>
    Signed-off-by: Olof Johansson <email address hidden>
    Signed-off-by: Bjorn Helgaas <email address hidden>

Testcase:

 Control of DPC can be determined from kernel boot messages when
pciehp probes a capable slot; when the kernel controls DPC, messages
of the format:

pcieport 0000:2d:00.0: pciehp: Slot #0
pcieport 0000:2d:00.0: DPC: error containment capabilities:

 will appear; if the kernel does not control DPC, the DPC line will
not be present (only the "pciehp: Slot" message).

 Additionally, devices bound to the kernel DPC PCIe port service
driver will be found in the /sys/bus/pci_express/drivers/dpc/ sysfs
directory; this will be empty of devices if the kernel does not control
DPC.

Regression Potential:

 The risk of regression is low as (a) by default, the patch has no
effect (the default setting is to not enable the option), and (b) when
enabled, the patch restores functionality that previously worked, and was,
in fact, the default behavior.

CVE References

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1869423

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Eoan):
status: New → In Progress
Changed in linux (Ubuntu Focal):
status: Incomplete → In Progress
Changed in linux (Ubuntu Eoan):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Revision history for this message
dann frazier (dannf) wrote :
Download full text (9.2 KiB)

= eoan verification =
ubuntu@akis:~$ ls /sys/bus/pci_express/drivers/dpc/
0000:2d:00.0:pcie208 0000:50:10.0:pcie208 0000:bb:04.0:pcie208
0000:2d:01.0:pcie208 0000:56:00.0:pcie208 0000:bb:10.0:pcie208
0000:2d:02.0:pcie208 0000:56:04.0:pcie208 0000:d9:00.0:pcie208
0000:2d:03.0:pcie208 0000:56:10.0:pcie208 0000:d9:01.0:pcie208
0000:2d:04.0:pcie208 0000:5b:00.0:pcie208 0000:d9:02.0:pcie208
0000:2d:0c.0:pcie208 0000:5b:04.0:pcie208 0000:d9:03.0:pcie208
0000:33:00.0:pcie208 0000:5b:10.0:pcie208 0000:d9:04.0:pcie208
0000:33:04.0:pcie208 0000:b0:00.0:pcie208 0000:d9:0c.0:pcie208
0000:33:10.0:pcie208 0000:b0:01.0:pcie208 0000:df:00.0:pcie208
0000:38:00.0:pcie208 0000:b0:02.0:pcie208 0000:df:04.0:pcie208
0000:38:04.0:pcie208 0000:b0:03.0:pcie208 0000:df:10.0:pcie208
0000:38:10.0:pcie208 0000:b0:04.0:pcie208 0000:e4:00.0:pcie208
0000:50:00.0:pcie208 0000:b0:0c.0:pcie208 0000:e4:04.0:pcie208
0000:50:01.0:pcie208 0000:b0:10.0:pcie208 0000:e4:10.0:pcie208
0000:50:02.0:pcie208 0000:b6:00.0:pcie208 bind
0000:50:03.0:pcie208 0000:b6:04.0:pcie208 uevent
0000:50:04.0:pcie208 0000:b6:10.0:pcie208 unbind
0000:50:0c.0:pcie208 0000:bb:00.0:pcie208
ubuntu@akis:~$ dmesg | grep -i dpc
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-47-generic root=UUID=681029d6-4538-4853-976f-0009512c6e90 ro console=ttyS0,115200n8 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 iommu=pt pcie_ports=dpc-native acpiphp.disable=1
[ 6.146807] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-47-generic root=UUID=681029d6-4538-4853-976f-0009512c6e90 ro console=ttyS0,115200n8 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 iommu=pt pcie_ports=dpc-native acpiphp.disable=1
[ 32.338206] pcieport 0000:2d:00.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.363790] pcieport 0000:2d:01.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.389360] pcieport 0000:2d:02.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.414914] pcieport 0000:2d:03.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.427928] pcieport 0000:2d:04.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.440966] pcieport 0000:2d:0c.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.454209] pcieport 0000:33:00.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.467288] pcieport 0000:33:04.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.480384] pcieport 0000:33:10.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.493574] pcieport 0000:38:00.0: DPC: error containment capabilities: Int Msg #3, RPExt- PoisonedTLP+ SwTrigger+ RP PIO Log 0, DL_ActiveErr+
[ 32.506657] pci...

Read more...

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (35.2 KiB)

This bug was fixed in the package linux - 5.4.0-24.28

---------------
linux (5.4.0-24.28) focal; urgency=medium

  * focal/linux: 5.4.0-24.28 -proposed tracker (LP: #1871939)

  * getitimer returns it_value=0 erroneously (LP: #1349028)
    - [Config] CONTEXT_TRACKING_FORCE policy should be unset

  * 12d1:1038 Dual-Role OTG device on non-HNP port - unable to enumerate USB
    device on port 1 (LP: #1047527)
    - [Config] USB_OTG_FSM policy not needed

  * Add DCPD backlight support for HP CML system (LP: #1871589)
    - SAUCE: drm/i915: Force DPCD backlight mode for HP CML 2020 system

  * Backlight brightness cannot be adjusted using keys (LP: #1860303)
    - SAUCE drm/i915: Force DPCD backlight mode for HP Spectre x360 Convertible
      13t-aw100

  * CVE-2020-11494
    - slcan: Don't transmit uninitialized stack data in padding

  * Ubuntu Kernel Support for OpenPOWER NV Secure & Trusted Boot (LP: #1866909)
    - powerpc: Detect the secure boot mode of the system
    - powerpc/ima: Add support to initialize ima policy rules
    - powerpc: Detect the trusted boot state of the system
    - powerpc/ima: Define trusted boot policy
    - ima: Make process_buffer_measurement() generic
    - certs: Add wrapper function to check blacklisted binary hash
    - ima: Check against blacklisted hashes for files with modsig
    - powerpc/ima: Update ima arch policy to check for blacklist
    - powerpc/ima: Indicate kernel modules appended signatures are enforced
    - powerpc/powernv: Add OPAL API interface to access secure variable
    - powerpc: expose secure variables to userspace via sysfs
    - x86/efi: move common keyring handler functions to new file
    - powerpc: Load firmware trusted keys/hashes into kernel keyring
    - x86/efi: remove unused variables

  * [roce-0227]sync mainline kernel 5.6rc3 roce patchset into ubuntu HWE kernel
    branch (LP: #1864950)
    - RDMA/hns: Cleanups of magic numbers
    - RDMA/hns: Optimize eqe buffer allocation flow
    - RDMA/hns: Add the workqueue framework for flush cqe handler
    - RDMA/hns: Delayed flush cqe process with workqueue
    - RDMA/hns: fix spelling mistake: "attatch" -> "attach"
    - RDMA/hns: Initialize all fields of doorbells to zero
    - RDMA/hns: Treat revision HIP08_A as a special case
    - RDMA/hns: Use flush framework for the case in aeq
    - RDMA/hns: Stop doorbell update while qp state error
    - RDMA/hns: Optimize qp destroy flow
    - RDMA/hns: Optimize qp context create and destroy flow
    - RDMA/hns: Optimize qp number assign flow
    - RDMA/hns: Optimize qp buffer allocation flow
    - RDMA/hns: Optimize qp param setup flow
    - RDMA/hns: Optimize kernel qp wrid allocation flow
    - RDMA/hns: Optimize qp doorbell allocation flow
    - RDMA/hns: Check if depth of qp is 0 before configure

  * [hns3-0316]sync mainline kernel 5.6rc4 hns3 patchset into ubuntu HWE kernel
    branch (LP: #1867586)
    - net: hns3: modify an unsuitable print when setting unknown duplex to fibre
    - net: hns3: add enabled TC numbers and DWRR weight info in debugfs
    - net: hns3: add support for dump MAC ID and loopback status in debugfs
    - net: hns3: add missing help info for QS shaper...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.3.0-51.44

---------------
linux (5.3.0-51.44) eoan; urgency=medium

  * CVE-2020-11884
    - SAUCE: s390/mm: fix page table upgrade vs 2ndary address mode accesses

 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 22 Apr 2020 17:35:41 -0300

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.