FreeBSD Errata Notice FreeBSD-EN-23:10.pci
6 September, 2023 by errata-notices@freebsd.org | freebsd
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-EN-23:10.pci Errata Notice The FreeBSD Project Topic: PCI-e hot-plug is broken with certain devices Category: core Module: pci Announced: 2023-09-06 Affects: FreeBSD 13.2 Corrected: 2023-06-28 01:32:47 UTC (stable/13, 13.2-STABLE) 2023-09-06 16:57:02 UTC (releng/13.2, 13.2-RELEASE-p3) For general information regarding FreeBSD Errata Notices and Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit <URL:https://security.FreeBSD.org/>. I. Background FreeBSD's pcib(4) PCI-e bridge driver implements support for hot-plugging PCIe devices. When attaching to a hot-plug-capable slot, the pcib(4) driver allocates a MSI or MSI-X vector used to trigger handling of hot-plug events. II. Problem Description The code which allocated the hot-plug interrupt did not allocate MSI-X vectors properly. When attaching to devices which support only MSI-X messages, the interrupt would not be allocated. III. Impact PCIe hot-plug would fail to work for certain devices. In particular, this affects certain Amazon EC2 instance types which require functional hot-plug support in order to attach network devices. IV. Workaround No workaround is available for affected devices. V. Solution Upgrade your system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date and reboot. Perform one of the following: 1) To update your system via a binary patch: Systems running a RELEASE version of FreeBSD on the amd64, i386, or (on FreeBSD 13 and later) arm64 platforms can be updated via the freebsd-update(8) utility: # freebsd-update fetch # freebsd-update install # shutdown -r +10min "Rebooting for an erratum update" 2) To update your system via a source code patch: The following patches have been verified to apply to the applicable FreeBSD release branches. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch https://security.FreeBSD.org/patches/EN-23:10/pci.patch # fetch https://security.FreeBSD.org/patches/EN-23:10/pci.patch.asc # gpg --verify pci.patch.asc b) Apply the patch. Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile your kernel as described in <URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the system. VI. Correction details This issue is corrected by the corresponding Git commit hash or Subversion revision number in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/13/ 12ce57e6d3e7 stable/13-n255700 releng/13.2/ e80d2d894ff1 releng/13.2-n254629 - ------------------------------------------------------------------------- Run the following command to see which files were modified by a particular commit: # git show --stat <commit hash> Or visit the following URL, replacing NNNNNN with the hash: <URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN> To determine the commit count in a working tree (for comparison against nNNNNNN in the table above), run: # git rev-list --count --first-parent HEAD VII. References <URL:https://reviews.freebsd.org/D40581> The latest revision of this advisory is available at <URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-23:10.pci.asc> -----BEGIN PGP SIGNATURE----- iQIyBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmT4vyUACgkQbljekB8A Gu9jsQ/3cpks/UuN/HHjGQdnqwRbwwMI44jysniwnetaXwZ+z6JoDQYFZyRFZGGb BKNo7asZlPgfrRYCqaZ3sH6pwzj7aU/ImLvQyLuTWo14C/29nM8koFi0vCGnJD/2 oQK8GUZLR5PZfGIsW0swGcmPYQ7NQtBiBQj/B+xqpPIllIcrTK0vCyCf2JIIGohy o8YIvd//FOs738Yb8ZAX6wta3KUu92SiWZH49BI/dJjkXbXSfhshDupx9EP2cfx/ uxYzdcEvLPWvpd0KaaVqbYMpw05wRt/23ir/E1fj4uDBL9tDWEgn150uqVbErm8F /W+gP9DMjkA6IlredXLD1Q0pZpUlo/CbjNQLpojQcJcuQhzcy7msb9TP6oHjW2Gi JRed3MqBWxrZJ/KdmCttC5qlzEPVq05aejRQXM1F3+FG/hUXo5a7tSUNvZ2LIQYC CW4C+AbWsQwzPUdRxidAhUflRBM95p8ifKZC8qWZ0f67FBYvo3OB0hGo+5PReimc fIzJDVL05/XgaXX2dH+sUjZO2PgG07Q343uVPCqYwFYPx43PMYlfWkqT99G1dleV rWryNrO3WtLpzxWmY15h8f1I4sq8E+8rboN/HdVZm6vCLSOqfvAbnAN5Kf/hWMRj logaqv/WE7DX3qpoY9eZ/foMvF72Q+FXJ5atSIWJX3w6UrzKRA== =N9UQ -----END PGP SIGNATURE-----