Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] vfio: Fix racy bitfields and tighten struct layout
@ 2026-05-11 22:16 Alex Williamson
  2026-05-11 22:16 ` [PATCH v2 1/2] vfio/pci: " Alex Williamson
  2026-05-11 22:16 ` [PATCH v2 2/2] vfio/mlx5: " Alex Williamson
  0 siblings, 2 replies; 6+ messages in thread
From: Alex Williamson @ 2026-05-11 22:16 UTC (permalink / raw)
  To: Alex Williamson, kvm
  Cc: Alex Williamson, Jason Gunthorpe, Kevin Tian, linux-kernel,
	Yishai Hadas, rananta

A recent patch[1] proposed by Raghavendra triggered a Sashiko
review[2] flagging that the proposed new bitfield shares storage
with neighbors and that concurrent updates via RMW may clobber
adjacent fields.

Auditing bitfield users in vfio_pci_core_device finds several
pre-existing fields with the same hazard, and an analogous pattern
in mlx5_vhca_page_tracker / mlx5vf_pci_core_device.  This series
splits all such fields out of their shared storage words, resolving
the existing cases.

v2: Uncouple from Raghavendra's patch so that Sashiko can apply
    and review (new field dropped), we can handle merge on commit.

Thanks,
Alex

[1] https://lore.kernel.org/all/20260504224142.1041477-1-rananta@google.com/
[2] https://sashiko.dev/#/patchset/20260504224142.1041477-1-rananta@google.com

Alex Williamson (2):
  vfio/pci: Fix racy bitfields and tighten struct layout
  vfio/mlx5: Fix racy bitfields and tighten struct layout

 drivers/vfio/pci/mlx5/cmd.h   | 8 ++++----
 include/linux/vfio_pci_core.h | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-05-12 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 22:16 [PATCH v2 0/2] vfio: Fix racy bitfields and tighten struct layout Alex Williamson
2026-05-11 22:16 ` [PATCH v2 1/2] vfio/pci: " Alex Williamson
2026-05-12 13:17   ` David Laight
2026-05-12 13:26     ` Alex Williamson
2026-05-12 13:18   ` Jason Gunthorpe
2026-05-11 22:16 ` [PATCH v2 2/2] vfio/mlx5: " Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox