From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 28A4D8045D for ; Thu, 29 Oct 2026 13:00:47 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69TCxSxr032646; Thu, 29 Oct 2026 15:59:29 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TCxSxr032646 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="kAshx0Yj" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69TCxRXd032630 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 29 Oct 2026 15:59:27 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TCxRXd032630 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48c415561aaso1316625f8f.1 for ; Thu, 29 Oct 2026 05:59:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxDBWkpZPGaseZtldO8ZfoEFIN9kpmsgFqhBdKQzdyHjGSuHijIwc4Gp+EssS5TmX0nxTnT0w==@openvz.org X-Gm-Message-State: AFq9FYKGI6rq0obn2158tAPlTXUTVWLQkKPsH8DlEI8J2GasnbfSSKHL 4jvRjazB49BME4ubYyChZUY5iIBWVJSxkm1BgLttTqzQTDsUXFmYl2KvgCi1RcdQ/b7zpQVnjCi cFxcfqh7+WlZmg0VHWhUSshISjs/RJwpwwgr8/bW4OBHHEs5yzfMf1A== X-Gm-Gg: AYBFou1PWEAs87ayIZRjNh77dAzKQo660/aFuEBMbS6ko40uTe7FSmmm6nI656bSwOZ Brfxzoa2KqtvZ/iDincoYCI5W+Jww+tyqTXz/qOxxYIC2BpKzv9pdbvlYfAn1Wsy8WYVJhZAX6C ZAulc8i9A4pXHWMpvRmMwfCXvqWBPHzIhk0oEbMVoQrAAhvgDQXUn+cHrepVeYYHvQPmTt3y+x+ vaXwoiVSmfmbHje1Xwngrh5cjgJxgK8TeiPA6OBl6PUc3QsIp2x+HS11kej5jXRSajMF4mjp3vF lbuA7w1sc3o98yshy75mdPI5RJbz/FoQ5buCAqZdHeri1NuF3AmTGUWPDM+nwxBbk49zPBCHsEz iT1S17t9hq9NJsNj9Q20kalnvxNY= X-Received: by 2002:a5d:5d0f:0:b0:48e:5ea8:308d with SMTP id ffacd0b85a97d-48e5ea83109mr11482850f8f.10.1793278766936; Thu, 29 Oct 2026 05:59:26 -0700 (PDT) X-Received: by 2002:a5d:5d0f:0:b0:48e:5ea8:308d with SMTP id ffacd0b85a97d-48e5ea83109mr11482809f8f.10.1793278766392; Thu, 29 Oct 2026 05:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793278766; cv=none; d=google.com; s=arc-20260327; b=gdIFbsae4IEOcfk83qKkfAGNcVreFv80yoG7yeRhuBAajK6YNyGxyZG7nYLTe7rIQq C3YDcflYcGHSqUinYiVDYk3JYNJFkDfj49ZCKuj04nwth9MVffsQmBEAYQpF9cFqgFSj reKDiunNDE9HTgH+qrItyCM7XxzTOpZNN4pBF0ItrUbWzdqilcHv3/zhyhyHJigPWDAy O/3QeuyY7/0ZKatyec6IO/kMlfGJynRflVz5BzOMZP1td3v7PvVIy/rdFDU1vfAfaLz9 wv9QYxqJvWNiSMsCLsYMDE2IsKhVzx2/lNz2KLlrPAGrOPXkO9Q950wxT9ey5Uzp0qmv hn7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=w5uhp2JRdoGi9ZoXAekys6+z5OMLFaq2g7I60cl/Adg=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=D3BkiBP7aC3gLXuWUMRALI7MaUwgscX16aMhxMM/bQ2Ot3Zj3YvgQdNhPRMkagu6b/ n3ndEW6jus8knp4albJ8CSm6j2geNTlHRA7PXF/gHYzA9FySgwkvdXDDs7zuKi4XjjUG Blziq0iNFb9KGTEYqCS93q/Y8oz3Fu5sYoBHerXx24zDKvqrw//8te5lvDBJy6CS+xRo FJlIJlkh07pB9+4GitLTvH5CpGhzeL04jcRrkB6NKemuArEIhqQ7yCq4jE0dbyKg98mQ Cy48z1VJj9QXbUDGtXbm9EC4qphiFSrmtOKiSoHrNntshm5UVQ8qzDnEmiEMTzH9CfyC +fcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=kAshx0Yj; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e3ed01c2dsi31721764f8f.286.2026.10.29.05.59.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 05:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=kAshx0Yj; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=w5uhp2JRdoGi9ZoXAekys6+z5OMLFaq2g7I60cl/Adg=; b=kAshx0YjeMaV ZA5UilMSR7Xd8AHTpYoSaYQxYzzXBhjr3/7zLt29ALwMd6OBz/3zT77vxTU7RusUXMzXM2meyW7Km CEAOjHrxzntYPW9AOBVqrfB/3m/uU/kewLYwXvw6j/e/uqi33b32dJb2JBYK/h4xMExgStnERxxfU AkDrChMkFRhZ/f1f956inbDfeqsCv/zWuy7zyGn5xnlrwNZOEmvBs833wFV5cPSrlcByI5Ztk7p5f cj6WzFKI8aMTMh483akFP8RLp0VnYl6nu9sAZ4OmbtOJLD6iMm/HdaKOhKLI8wJgPvzBI1UYegTzy sLuMVH1ebshXj/w+l2G5uQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xMPfG-005INM-0f; Thu, 29 Oct 2026 13:59:23 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Thu, 29 Oct 2026 13:59:20 +0100 Message-ID: <20261029125923.3352735-1-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 0/3] drivers/vhost/blk: fix virtio-blk request header and payload parsing X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org vhost-blk parsed guest requests from the whole descriptor chain without telling the device-readable part from the device-writable one, and used the header fields without byte order conversion. Patch 1 converts hdr->type and hdr->sector to CPU byte order. Patch 2 takes the request header only from the readable part and drops requests whose readable part is shorter than the header. Patch 3 takes the write payload from the readable part and the payload of other requests from the writable part, reads the status byte from the end of the writable part, and completes reads and writes with an empty, oversized or misaligned payload with VIRTIO_BLK_S_IOERR. v2: - patch 2, 3: fix the description of the old behaviour in the commit messages, no code changes. https://virtuozzo.atlassian.net/browse/VSTOR-142755 Alexander Ivanov (3): drivers/vhost/blk: convert virtio_blk_outhdr fields to CPU byte order drivers/vhost/blk: take virtio_blk_outhdr only from the readable part drivers/vhost/blk: take req->len from one side of the descriptor chain drivers/vhost/blk.c | 56 ++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 16 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel