linux-brain/drivers/virtio
Suzuki K Poulose 904728d760 virtio: pci-legacy: Validate queue pfn
[ Upstream commit 69599206ea ]

Legacy PCI over virtio uses a 32bit PFN for the queue. If the
queue pfn is too large to fit in 32bits, which we could hit on
arm64 systems with 52bit physical addresses (even with 64K page
size), we simply miss out a proper link to the other side of
the queue.

Add a check to validate the PFN, rather than silently breaking
the devices.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Cc: Peter Maydel <peter.maydell@linaro.org>
Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-15 09:42:57 +02:00
..
Kconfig virtio_ring: Support DMA APIs 2016-03-02 17:01:57 +02:00
Makefile Add virtio-input driver. 2015-03-29 12:13:52 +10:30
virtio_balloon.c virtio_balloon: fix another race between migration and ballooning 2018-08-06 16:23:04 +02:00
virtio_input.c virtio: make find_vqs() checkpatch.pl-friendly 2016-01-12 20:47:06 +02:00
virtio_mmio.c virtio_mmio: Set DMA masks appropriately 2017-02-01 08:33:13 +01:00
virtio_pci_common.c PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
virtio_pci_common.h virtio_pci: Use the DMA API if enabled 2016-03-02 17:01:58 +02:00
virtio_pci_legacy.c virtio: pci-legacy: Validate queue pfn 2018-09-15 09:42:57 +02:00
virtio_pci_modern.c virtio: virtio 1.0 cs04 spec compliance for reset 2016-04-07 15:16:39 +03:00
virtio_ring.c virtio_ring: fix num_free handling in error case 2018-03-18 11:18:50 +01:00
virtio.c virtio: release virtio index when fail to device_register 2017-12-14 09:28:10 +01:00