[Devel] [PATCH hci-8.1 1/3] drivers/vhost/blk: convert virtio_blk_outhdr fields to CPU byte order

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Oct 21 11:49:59 MSK 2026


> hdr->type and hdr->sector are __virtio32 and __virtio64 but were used
> without conversion. Since VIRTIO_F_VERSION_1 is offered, on a big-endian
> host with a little-endian guest the request header was misinterpreted.
> 
> Convert both with vhost32_to_cpu()/vhost64_to_cpu() once, when the
> request is set up.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-142755
> Fixes: 1629db092dd7 ("drivers/vhost: vhost-blk accelerator for virtio-blk guests")
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>

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

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




More information about the Devel mailing list