All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/5] fixes for virtual address update
@ 2022-12-13 19:40 Steve Sistare
  2022-12-13 19:40 ` [PATCH V2 1/5] vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR Steve Sistare
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Steve Sistare @ 2022-12-13 19:40 UTC (permalink / raw)
  To: kvm; +Cc: Alex Williamson, Cornelia Huck, Steve Sistare

Fix bugs in the interfaces that allow the underlying memory object of an
iova range to be mapped in a new address space.  They allow userland to
indefinitely block vfio mediated device kernel threads, and do not
propagate the locked_vm count to a new mm.

The fixes impose restrictions that eliminate waiting conditions, so
revert the dead code:
  commit 898b9eaeb3fe ("vfio/type1: block on invalid vaddr")
  commit 487ace134053 ("vfio/type1: implement notify callback")
  commit ec5e32940cc9 ("vfio: iommu driver notify callback")

Changes from V1 (thanks Alex):
  * do not allow group attach while vaddrs are invalid
  * add patches to delete dead code
  * add WARN_ON for never-should-happen conditions
  * check for changed mm in unmap.
  * check for vfio_lock_acct failure in remap

Steve Sistare (5):
  vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR
  vfio/type1: prevent locked_vm underflow
  vfio/type1: revert "block on invalid vaddr"
  vfio/type1: revert "implement notify callback"
  vfio: revert "iommu driver notify callback"

 drivers/vfio/container.c        |   5 --
 drivers/vfio/vfio.h             |   7 --
 drivers/vfio/vfio_iommu_type1.c | 163 +++++++++++++---------------------------
 include/uapi/linux/vfio.h       |  15 ++--
 4 files changed, 63 insertions(+), 127 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2022-12-13 21:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 19:40 [PATCH V2 0/5] fixes for virtual address update Steve Sistare
2022-12-13 19:40 ` [PATCH V2 1/5] vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR Steve Sistare
2022-12-13 20:22   ` Alex Williamson
2022-12-13 20:37     ` Steven Sistare
2022-12-13 20:59       ` Alex Williamson
2022-12-13 21:16         ` Steven Sistare
2022-12-13 21:26           ` Alex Williamson
2022-12-13 19:40 ` [PATCH V2 2/5] vfio/type1: prevent locked_vm underflow Steve Sistare
2022-12-13 20:23   ` Alex Williamson
2022-12-13 21:01     ` Steven Sistare
2022-12-13 21:31       ` Alex Williamson
2022-12-13 21:56         ` Steven Sistare
2022-12-13 19:40 ` [PATCH V2 3/5] vfio/type1: revert "block on invalid vaddr" Steve Sistare
2022-12-13 19:40 ` [PATCH V2 4/5] vfio/type1: revert "implement notify callback" Steve Sistare
2022-12-13 19:40 ` [PATCH V2 5/5] vfio: revert "iommu driver " Steve Sistare

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.