platform_kernel-5.15/drivers/virtio
Keir Fraser 59a389919e UPSTREAM: virtio: pci: check bar values read from virtio config space
virtio pci config structures may in future have non-standard bar
values in the bar field. We should anticipate this by skipping any
structures containing such a reserved value.

The bar value should never change: check for harmful modified values
we re-read it from the config space in vp_modern_map_capability().

Also clean up an existing check to consistently use PCI_STD_NUM_BARS.

Signed-off-by: Keir Fraser <keirf@google.com>
Link: https://lore.kernel.org/r/20220323140727.3499235-1-keirf@google.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 3f63a1d7f6f500b6891b1003cec3e23ea4996a2e)
Bug: 222232623
Signed-off-by: Keir Fraser <keirf@google.com>
Change-Id: Idbba48154a051cf173b9cb0bd40c77fcf02902a4
2022-04-01 15:02:16 +00:00
..
Kconfig Merge fecfd01539 ("Merge tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds") into android-mainline 2021-03-07 08:45:40 +01:00
Makefile virtio-pci: introduce modern device module 2021-02-23 07:52:58 -05:00
virtio.c virtio: acknowledge all features before access 2022-03-16 14:23:43 +01:00
virtio_balloon.c virtio-balloon: Use virtio_find_vqs() helper 2021-09-06 07:20:56 -04:00
virtio_dma_buf.c ANDROID: virtio: disable virtio_dma_buf callback checks with CFI 2021-09-13 18:32:57 +00:00
virtio_input.c ANDROID: virtio: virtio_input: Do not call input_mt_init_slots in virtinput_cfg_abs 2021-07-21 23:08:02 +00:00
virtio_mem.c virtio/virtio_mem: handle a possible NULL as a memcpy parameter 2022-01-27 11:02:59 +01:00
virtio_mmio.c virtio-mmio: Use to_virtio_mmio_device() to simply code 2021-03-14 04:37:35 -04:00
virtio_pci_common.c UPSTREAM: Revert "virtio_pci: harden MSI-X interrupts" 2022-04-01 10:17:31 +00:00
virtio_pci_common.h UPSTREAM: Revert "virtio_pci: harden MSI-X interrupts" 2022-04-01 10:17:31 +00:00
virtio_pci_legacy.c UPSTREAM: Revert "virtio_pci: harden MSI-X interrupts" 2022-04-01 10:17:31 +00:00
virtio_pci_modern.c UPSTREAM: virtio: pci: check bar values read from virtio config space 2022-04-01 15:02:16 +00:00
virtio_pci_modern_dev.c UPSTREAM: virtio: pci: check bar values read from virtio config space 2022-04-01 15:02:16 +00:00
virtio_ring.c virtio_ring: mark ring unused on error 2022-01-27 11:05:35 +01:00
virtio_vdpa.c virtio_vdpa: reject invalid vq indices 2021-08-11 06:44:23 -04:00