linux/include
Linus Torvalds 68132b3536 VFIO fixes for v6.10-rc4
- Fix long standing lockdep issue of using remap_pfn_range() from
    the vfio-pci fault handler for mapping device MMIO.  Commit
    ba168b52bf ("mm: use rwsem assertion macros for mmap_lock") now
    exposes this as a warning forcing this to be addressed.
 
    remap_pfn_range() was used here to efficiently map the entire vma,
    but it really never should have been used in the fault handler and
    doesn't handle concurrency, which introduced complex locking.  We
    also needed to track vmas mapping the device memory in order to zap
    those vmas when the memory is disabled resulting in a vma list.
 
    Instead of all that mess, setup an address space on the device fd
    such that we can use unmap_mapping_range() for zapping to avoid
    the tracking overhead and use the standard vmf_insert_pfn() to
    insert mappings on fault.  For now we'll iterate the vma and
    opportunistically try to insert mappings for the entire vma.  This
    aligns with typical use cases, but hopefully in the future we can
    drop the iterative approach and make use of huge_fault instead,
    once vmf_insert_pfn{pud,pmd}() learn to handle pfnmaps.
    (Alex Williamson)
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmZsu1AbHGFsZXgud2ls
 bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsiliUQAIYXnii7HumOdcMIPnre
 twv9K4JFixpaH1bRCKd+bCoAH/7RZDRj0oSKa5OHtYiOfnlalzLAKCq84BRiUndj
 cj9gYlpSlEpZl4Aa9gr2YR9ng5poQjeVq5GIzWQGZwszX2hYCk7Bz5zKbdG95zAm
 qVOIFYTU+i+9D5NRMXwXEnDyKmazwuCwbmlYp4nZijMsP3/rNAy3dmDZ6ljEhIa0
 p0QKvRi7L3BbTu1Zy6PXEowo1neF4d8KgViY7B1eYLsR48awmnXzMcHmvcBk14Mb
 79GwripnXI2SXiGdzzqt0ODuVHs2xyV4P/Ddb6lUpZhO5KgpuxVblW5NMKSKm9ta
 /12WrknWlpIKcPljWVgyDU70O9Umm3f39lUQ6Ns4e/ieS8c8GHC+5Nl5Q8PSEpqj
 VYbSRuObwXSa6qzyB6O2QtNaJ8B55/bjl+FSoN4qnfccprZ7R4k96O/4hu+StZOZ
 4wNaQXyB0FIakelotBy9T/ZbI4YQmhlC4FcsDXugz4wOdVUkwOVVFZ8R7jAUTNxn
 Ty8RzBTSAX4alvpYhe+WFBLq3TnS+c8J7tK1q9ihfwjrEWd3gnx4M+if60XPpPHt
 WxKJnvSzYvasO32AF2yTSmm3S5NlEQvQ2LTY3yfsGHfk0x/W4FEi78KcnjLZLTFk
 dhf3X5qIIw8AGrLHKlgKcu61
 =bSXX
 -----END PGP SIGNATURE-----

Merge tag 'vfio-v6.10-rc4' of https://github.com/awilliam/linux-vfio

Pull VFIO fixes from Alex Williamson:
 "Fix long standing lockdep issue of using remap_pfn_range() from the
  vfio-pci fault handler for mapping device MMIO. Commit ba168b52bf
  ("mm: use rwsem assertion macros for mmap_lock") now exposes this as a
  warning forcing this to be addressed.

  remap_pfn_range() was used here to efficiently map the entire vma, but
  it really never should have been used in the fault handler and doesn't
  handle concurrency, which introduced complex locking. We also needed
  to track vmas mapping the device memory in order to zap those vmas
  when the memory is disabled resulting in a vma list.

  Instead of all that mess, setup an address space on the device fd
  such that we can use unmap_mapping_range() for zapping to avoid the
  tracking overhead and use the standard vmf_insert_pfn() to insert
  mappings on fault.

  For now we'll iterate the vma and opportunistically try to insert
  mappings for the entire vma. This aligns with typical use cases, but
  hopefully in the future we can drop the iterative approach and make
  use of huge_fault instead, once vmf_insert_pfn{pud,pmd}() learn to
  handle pfnmaps"

* tag 'vfio-v6.10-rc4' of https://github.com/awilliam/linux-vfio:
  vfio/pci: Insert full vma on mmap'd MMIO fault
  vfio/pci: Use unmap_mapping_range()
  vfio: Create vfio_fs_type with inode per device
2024-06-14 18:46:53 -07:00
..
acpi ACPI: EC: Evaluate orphan _REG under EC device 2024-06-13 11:28:54 +02:00
asm-generic asm-generic cleanups for 6.10 2024-05-20 15:18:34 -07:00
clocksource
crypto This push fixes a bug in the new ecc P521 code as well as a buggy 2024-05-20 08:47:54 -07:00
drm Short summary of fixes pull: 2024-05-27 13:47:14 +10:00
dt-bindings dt-bindings: net: dp8386x: Add MIT license along with GPL-2.0 2024-06-07 12:16:22 +01:00
keys Hi, 2024-05-13 10:40:15 -07:00
kunit
kvm
linux VFIO fixes for v6.10-rc4 2024-06-14 18:46:53 -07:00
math-emu
media
memory
misc
net Bluetooth: L2CAP: Fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ 2024-06-10 09:48:27 -04:00
pcmcia
ras tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
rdma The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
rv
scsi scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
soc I'm actually surprised this time. There aren't any new Qualcomm SoC clk 2024-05-18 12:48:37 -07:00
sound ALSA: pcm: fix typo in comment 2024-05-29 10:40:36 +02:00
target
trace Merge patch series "cachefiles: some bugfixes and cleanups for ondemand requests" 2024-05-29 13:03:40 +02:00
uapi vfs-6.10-rc4.fixes 2024-06-11 12:04:21 -07:00
ufs
vdso
video
xen