All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] virtio: pci: Add and fix consistency checks
@ 2022-03-20 11:41 Andrew Scull
  2022-03-20 11:41 ` [PATCH 01/11] virtio: pci: Fix discovery of device config length Andrew Scull
                   ` (10 more replies)
  0 siblings, 11 replies; 35+ messages in thread
From: Andrew Scull @ 2022-03-20 11:41 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, bmeng.cn, adelva, keirf, ptosi, Andrew Scull

The virtio PCI drivers forgo a number of consistency checks,
particularly around pointer validation and bounds checking. This series
focuses on the modern driver to add those checks.

The start of the series adds and fixes some basic bounds checks. Later
patches ensure PCI addresses fall within the expected regions rather
than any arbitrary address.

The series applies atop v2022.04-rc4. I have been boot testing on the
AOSP cuttlefish virtualized device and protected KVM as part of the
Android Virtualization Framework (AVF).

Andrew Scull (11):
  virtio: pci: Fix discovery of device config length
  virtio: pci: Bounds check device config access
  virtio: pci: Bounds check notification writes
  virtio: pci: Check virtio common config size
  virtio: pci: Check virtio capability is in bounds
  virtio: pci: Read entire capability into memory
  virtio: pci: Check virtio configs are mapped
  pci: Check region ranges are addressable
  pci: Add function to validate PCI address range
  virtio: pci: Check mapped range is in a PCI region
  virtio: pci: Allow exclusion of legacy driver

 drivers/pci/pci-uclass.c           |  47 ++++++++-
 drivers/virtio/Kconfig             |   9 ++
 drivers/virtio/Makefile            |   3 +-
 drivers/virtio/virtio_pci_modern.c | 147 ++++++++++++++++++++++-------
 include/pci.h                      |  16 ++++
 5 files changed, 184 insertions(+), 38 deletions(-)

-- 
2.35.1.894.gb6a874cedc-goog


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2022-03-28 14:28 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 11:41 [PATCH 00/11] virtio: pci: Add and fix consistency checks Andrew Scull
2022-03-20 11:41 ` [PATCH 01/11] virtio: pci: Fix discovery of device config length Andrew Scull
2022-03-24  9:32   ` Bin Meng
2022-03-20 11:41 ` [PATCH 02/11] virtio: pci: Bounds check device config access Andrew Scull
2022-03-24 14:07   ` Bin Meng
2022-03-20 11:41 ` [PATCH 03/11] virtio: pci: Bounds check notification writes Andrew Scull
2022-03-24 14:18   ` Bin Meng
2022-03-24 16:24     ` Andrew Scull
2022-03-25  1:41       ` Bin Meng
2022-03-20 11:41 ` [PATCH 04/11] virtio: pci: Check virtio common config size Andrew Scull
2022-03-24 14:22   ` Bin Meng
2022-03-20 11:41 ` [PATCH 05/11] virtio: pci: Check virtio capability is in bounds Andrew Scull
2022-03-24 15:24   ` Bin Meng
2022-03-24 16:27     ` Andrew Scull
2022-03-25  1:27       ` Bin Meng
2022-03-20 11:41 ` [PATCH 06/11] virtio: pci: Read entire capability into memory Andrew Scull
2022-03-25  4:31   ` Bin Meng
2022-03-25  7:03     ` Andrew Scull
2022-03-25  7:51       ` Bin Meng
2022-03-25  9:18         ` Andrew Scull
2022-03-25 10:25           ` Bin Meng
2022-03-28 14:28             ` Andrew Scull
2022-03-20 11:41 ` [PATCH 07/11] virtio: pci: Check virtio configs are mapped Andrew Scull
2022-03-25  4:38   ` Bin Meng
2022-03-25  7:07     ` Andrew Scull
2022-03-25  7:19       ` Bin Meng
2022-03-20 11:41 ` [PATCH 08/11] pci: Check region ranges are addressable Andrew Scull
2022-03-25  7:14   ` Bin Meng
2022-03-20 11:41 ` [PATCH 09/11] pci: Add function to validate PCI address range Andrew Scull
2022-03-25  7:14   ` Bin Meng
2022-03-25 10:26     ` Andrew Scull
2022-03-20 11:41 ` [PATCH 10/11] virtio: pci: Check mapped range is in a PCI region Andrew Scull
2022-03-25  7:14   ` Bin Meng
2022-03-20 11:41 ` [PATCH 11/11] virtio: pci: Allow exclusion of legacy driver Andrew Scull
2022-03-25  7:14   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.