linux-stable/drivers/virtio
David Hildenbrand 61082ad6a6 virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
The initial virtio-mem spec states that while unplugged memory should not
be read, the device still has to allow for reading unplugged memory inside
the usable region. The primary motivation for this default handling was
to simplify bringup of virtio-mem, because there were corner cases where
Linux might have accidentially read unplugged memory inside added Linux
memory blocks.

In the meantime, we:
1. Removed /dev/kmem in commit bbcd53c960 ("drivers/char: remove
   /dev/kmem for good")
2. Disallowed access to virtio-mem device memory via /dev/mem in
   commit 2128f4e21a ("virtio-mem: disallow mapping virtio-mem memory via
   /dev/mem")
3. Sanitized access to virtio-mem device memory via /proc/kcore in
   commit 0daa322b8f ("fs/proc/kcore: don't read offline sections,
   logically offline pages and hwpoisoned pages")
4. Sanitized access to virtio-mem device memory via /proc/vmcore in
   commit ce2814622e ("virtio-mem: kdump mode to sanitize /proc/vmcore
   access")

"Accidential" access to unplugged memory is no longer possible; we can
support the new VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE feature that will be
required by some hypervisors implementing virtio-mem in the near future.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Marek Kedzierski <mkedzier@redhat.com>
Cc: Hui Zhu <teawater@gmail.com>
Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
2021-11-10 15:32:38 +01:00
..
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
Makefile virtio-pci: introduce legacy device module 2021-11-01 04:30:34 -04:00
virtio.c virtio: write back F_VERSION_1 before validate 2021-10-13 08:35:36 -04:00
virtio_balloon.c virtio-balloon: Use virtio_find_vqs() helper 2021-09-06 07:20:56 -04:00
virtio_dma_buf.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
virtio_input.c virtio-input: add multi-touch support 2021-02-23 07:52:59 -05:00
virtio_mem.c virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE 2021-11-10 15:32:38 +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 virtio-pci: harden INTX interrupts 2021-11-01 05:26:48 -04:00
virtio_pci_common.h virtio-pci: harden INTX interrupts 2021-11-01 05:26:48 -04:00
virtio_pci_legacy.c virtio_pci: harden MSI-X interrupts 2021-11-01 05:26:48 -04:00
virtio_pci_legacy_dev.c virtio-pci: introduce legacy device module 2021-11-01 04:30:34 -04:00
virtio_pci_modern.c virtio_pci: harden MSI-X interrupts 2021-11-01 05:26:48 -04:00
virtio_pci_modern_dev.c virtio-pci library: introduce vp_modern_get_driver_features() 2021-07-08 07:49:01 -04:00
virtio_ring.c virtio_ring: validate used buffer length 2021-11-01 05:26:48 -04:00
virtio_vdpa.c vdpa: Introduce and use vdpa device get, set config helpers 2021-11-01 05:26:49 -04:00