linux/drivers/virtio
Will Deacon 6cb6a94380 virtio: force vring descriptors to be allocated from lowmem
commit b92b1b89a3 upstream.

Virtio devices may attempt to add descriptors to a virtqueue from atomic
context using GFP_ATOMIC allocation. This is problematic because such
allocations can fall outside of the lowmem mapping, causing virt_to_phys
to report bogus physical addresses which are subsequently passed to
userspace via the buffers for the virtual device.

This patch masks out __GFP_HIGH and __GFP_HIGHMEM from the requested
flags when allocating descriptors for a virtqueue. If an atomic
allocation is requested and later fails, we will return -ENOSPC which
will be handled by the driver.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 09:06:47 -08:00
..
config.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig virtio: add HAS_IOMEM dependency to MMIO platform bus driver 2011-11-24 13:04:47 +10:30
Makefile virtio: Add platform bus driver for memory mapped virtio device 2011-11-02 11:41:01 +10:30
virtio_balloon.c virtio: balloon: let host know of updated balloon size before module removal 2012-05-17 12:14:34 +03:00
virtio_mmio.c virtio: harsher barriers for rpmsg. 2012-01-12 15:44:42 +10:30
virtio_pci.c virtio-pci: switch to PM ops macro to initialise PM functions 2012-03-31 08:09:51 +05:30
virtio_ring.c virtio: force vring descriptors to be allocated from lowmem 2013-01-11 09:06:47 -08:00
virtio.c virtio: Add module.h to drivers/virtio users. 2011-10-31 19:32:14 -04:00