public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] virtio: silence KCSAN warnings
@ 2026-01-27 15:25 Johannes Thumshirn
  2026-01-27 15:25 ` [PATCH v2 1/2] virtio: silence KCSAN warning in virtqueue_get_buf_ctx_split Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Johannes Thumshirn @ 2026-01-27 15:25 UTC (permalink / raw)
  To: virtualization
  Cc: Michael S . Tsirkin, Jason Wang, Xuan Zhuo, Eugenio Pérez,
	Alexander Graf, linux-kernel, Johannes Thumshirn

When booting a Qemu VM whith KCSAN to debug filesystem races I
encountered a bunch of KCSAN splats in virtio.

All of them are false positives, as the racy unknown origin is the
hypervisor.

Alex suggested to annotate the vring structure as racy for KCSAN, but
the __data_racy annotation turns into "volatile" and as such it cannot
be used to annotate the whole structure. Annotating every structure
embedding a pointer to the vring turned out to be way more invasive than
annotating only the few sites consumers.

Changes to v1:
- Annotate the return of more_used_split() as racy so both call sites
  are covered
- Annotate vring_avail_event() as racy so we can condense two patches
  into one.

Link to v1:
https://lore.kernel.org/virtualization/20260127083926.865555-1-johannes.thumshirn@wdc.com/

Johannes Thumshirn (2):
  virtio: silence KCSAN warning in virtqueue_get_buf_ctx_split
  virtio: silence KCSAN warning in virtqueue_kick_prepare

 drivers/virtio/virtio_ring.c     | 4 ++--
 include/uapi/linux/virtio_ring.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-01-28 22:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 15:25 [PATCH v2 0/2] virtio: silence KCSAN warnings Johannes Thumshirn
2026-01-27 15:25 ` [PATCH v2 1/2] virtio: silence KCSAN warning in virtqueue_get_buf_ctx_split Johannes Thumshirn
2026-01-27 16:30   ` Alexander Graf
2026-01-28  8:47     ` Johannes Thumshirn
2026-01-28  9:03       ` Alexander Graf
2026-01-28  9:13         ` Johannes Thumshirn
2026-01-28 10:30           ` Alexander Graf
2026-01-28 10:34             ` Michael S. Tsirkin
2026-01-28 10:38               ` Alexander Graf
2026-01-28 10:48                 ` Michael S. Tsirkin
2026-01-27 15:25 ` [PATCH v2 2/2] virtio: silence KCSAN warning in virtqueue_kick_prepare Johannes Thumshirn
2026-01-28 12:28   ` kernel test robot
2026-01-28 22:23   ` kernel test robot
2026-01-27 15:44 ` [PATCH v2 0/2] virtio: silence KCSAN warnings Michael S. Tsirkin

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