Skip to content

vfio: Interrupt eventfd hardening

Alex Williamson kvm lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 12 repliesIn review
  2. v17 patches 18 repliesSuperseded

Changes in v2 from the cover letter

* Add R-b from Kevin & Reinette (thanks!)
* Remove unused hwirqs in 5/ and avoid unnecessary hwirq lookup in cleanup and init unwind in 6/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7vfio/pci: Disable auto-enable of exclusive INTx IRQdrivers/vfio/pci/vfio_pci_intrs.c+10 -72 replies
2/7vfio/pci: Lock external INTx masking opsdrivers/vfio/pci/vfio_pci_intrs.c+28 -61 reply
3/7vfio: Introduce interface to flush virqfd inject workqueuedrivers/vfio/virqfd.c include/linux/vfio.h+23 -01 reply
4/7vfio/pci: Create persistent INTx handlerdrivers/vfio/pci/vfio_pci_intrs.c+78 -671 reply
5/7vfio/platform: Disable virqfds on cleanupdrivers/vfio/platform/vfio_platform_irq.c+4 -12 replies
6/7vfio/platform: Create persistent IRQ handlersdrivers/vfio/platform/vfio_platform_irq.c+68 -323 replies
7/7vfio/fsl-mc: Block calling interrupt handler without triggerdrivers/vfio/fsl-mc/vfio_fsl_mc_intr.c+4 -32 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchKevin TianReinette ChatreEric Auger
1/7R-b
2/7R-b R-b R-b
3/7R-b R-b R-b
4/7R-b R-b R-b
5/7R-b R-b
6/7R-b R-b T-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/7] vfio: Interrupt eventfd hardening

This series hardens interrupt code relative to eventfd registration across several vfio bus drivers, ensuring that NULL eventfds cannot be triggered by users. Several other more minor issues were discovered and fixed along the way.

Thanks to Reinette for identifying this latent vulnerability. Thanks,

Alex

v2:
* Add R-b from Kevin & Reinette (thanks!)
* Remove unused hwirqs in 5/ and avoid unnecessary hwirq lookup in cleanup and init unwind in 6/

Alex Williamson (7):
vfio/pci: Disable auto-enable of exclusive INTx IRQ vfio/pci: Lock external INTx masking ops
vfio: Introduce interface to flush virqfd inject workqueue vfio/pci: Create persistent INTx handler vfio/platform: Disable virqfds on cleanup vfio/platform: Create persistent IRQ handlers vfio/fsl-mc: Block calling interrupt handler without trigger

 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c    |   7 +-
 drivers/vfio/pci/vfio_pci_intrs.c         | 176 +++++++++++++---------
 drivers/vfio/platform/vfio_platform_irq.c | 105 +++++++++----
 drivers/vfio/virqfd.c                     |  21 +++
 include/linux/vfio.h                      |   2 +
 5 files changed, 205 insertions(+), 106 deletions(-)
Signature · 1 line
2.44.0