OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
	andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1] drivers/vhost/blk: fail guest writes to a read-only backend
Date: Wed, 28 Oct 2026 09:39:23 +0000	[thread overview]
Message-ID: <010701a181e0e983-afb17863-f5ed-42f2-a661-dc371f5dc069-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261028093536.3072110-1-alexander.ivanov@virtuozzo.com>

> When a disk is attached read-only, QEMU opens the backing block device
> O_RDONLY and advertises VIRTIO_BLK_F_RO. vhost_blk_set_backend() checks
> only that the fd is a block device, and requests are submitted as bios
> straight to the bdev, so a guest that ignores VIRTIO_BLK_F_RO and sends
> VIRTIO_BLK_T_OUT gets VIRTIO_BLK_S_OK and modifies the disk.
> 
> Complete VIRTIO_BLK_T_OUT with VIRTIO_BLK_S_IOERR when the backend file
> lacks FMODE_WRITE or the bdev itself is read-only, as the userspace
> virtio-blk device does. The bdev is checked per request since it can be
> switched read-only at runtime. Flush stays allowed: it does not modify
> data.
> 
> Fixes: d8722ff88c5d ("drivers/vhost: vhost-blk accelerator for virtio-blk guests")
> https://virtuozzo.atlassian.net/browse/VSTOR-152127
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> 
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261028093536.3072110-1-alexander.ivanov@virtuozzo.com?part=1


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-10-28  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  9:35 Alexander Ivanov
2026-10-28  9:39 ` no-reply [this message]
2026-10-29 11:33 ` Andrey Zhadchenko
2026-10-29 12:42 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010701a181e0e983-afb17863-f5ed-42f2-a661-dc371f5dc069-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.zhadchenko@virtuozzo.com \
    --cc=devel@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox