From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEBD0C433EF for ; Tue, 26 Oct 2021 07:20:29 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86C1560ED4 for ; Tue, 26 Oct 2021 07:20:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 86C1560ED4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5B36C81036; Tue, 26 Oct 2021 07:20:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3QCjgxC4lYZ7; Tue, 26 Oct 2021 07:20:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 30ECE80DD3; Tue, 26 Oct 2021 07:20:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 048CEC0019; Tue, 26 Oct 2021 07:20:28 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 33F6CC000E for ; Tue, 26 Oct 2021 07:20:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 17178608DF for ; Tue, 26 Oct 2021 07:20:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Uv1XOYJEJC7 for ; Tue, 26 Oct 2021 07:20:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 7DCA0608DA for ; Tue, 26 Oct 2021 07:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635232824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xdOuNDX3/xmLdrBREE9VW7efZLufc82SxJkpEXQ7fj8=; b=CLMRmlgeYiUvO+l/GXH7ehfGFEQ+AwsFo2sffJrpbfvjg2QpFg6wrMEFb5LuclKgJoSpfK 4YSthT/UrvddNCZ3fxW9nJAxb76AyY1cTFKkuyym4OqM1rVUwEsV6ziLngRRdQwc0bodAX Ha0CMrBAMAncsUhX0GenFkndEI4OCqk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-HVBOHg-bMkqAYUDSmK77LA-1; Tue, 26 Oct 2021 03:20:23 -0400 X-MC-Unique: HVBOHg-bMkqAYUDSmK77LA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2AF55074B; Tue, 26 Oct 2021 07:20:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-80.pek2.redhat.com [10.72.12.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id D208619C79; Tue, 26 Oct 2021 07:20:18 +0000 (UTC) From: Jason Wang To: mst@redhat.com, virtualization@lists.linux-foundation.org Subject: [PATCH V4 4/4] virtio-scsi: don't let virtio core to validate used buffer length Date: Tue, 26 Oct 2021 15:20:00 +0800 Message-Id: <20211026072000.8699-5-jasowang@redhat.com> In-Reply-To: <20211026072000.8699-1-jasowang@redhat.com> References: <20211026072000.8699-1-jasowang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Cc: f.hetzelt@tu-berlin.de, linux-kernel@vger.kernel.org, david.kaplan@amd.com, konrad.wilk@oracle.com X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" We never tries to use used length, so the patch prevents the virtio core from validating used length. Signed-off-by: Jason Wang --- drivers/scsi/virtio_scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 07d0250f17c3..03b09ecea42d 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -977,6 +977,7 @@ static unsigned int features[] = { static struct virtio_driver virtio_scsi_driver = { .feature_table = features, .feature_table_size = ARRAY_SIZE(features), + .suppress_used_validation = true, .driver.name = KBUILD_MODNAME, .driver.owner = THIS_MODULE, .id_table = id_table, -- 2.25.1 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12205C433F5 for ; Tue, 26 Oct 2021 07:20:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E939B60ED4 for ; Tue, 26 Oct 2021 07:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234186AbhJZHXD (ORCPT ); Tue, 26 Oct 2021 03:23:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34312 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234027AbhJZHWw (ORCPT ); Tue, 26 Oct 2021 03:22:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635232828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xdOuNDX3/xmLdrBREE9VW7efZLufc82SxJkpEXQ7fj8=; b=Vb0s5D4GHDUOg+WUNwlHcKDExRw7u+94l1gHxPXSikQ6bpXrzMny3KdsnfgG7PKDn2CcGj abtWumQZsO4mPPaMrPqXjT79tEFiuCkJv0DFNbqFgMN2NP/HCNCPlw8fsx3+Uw7oJlwWOw IpwZdK53BOP+UNjXbr1i5k2VCODT9Dw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-HVBOHg-bMkqAYUDSmK77LA-1; Tue, 26 Oct 2021 03:20:23 -0400 X-MC-Unique: HVBOHg-bMkqAYUDSmK77LA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2AF55074B; Tue, 26 Oct 2021 07:20:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-80.pek2.redhat.com [10.72.12.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id D208619C79; Tue, 26 Oct 2021 07:20:18 +0000 (UTC) From: Jason Wang To: mst@redhat.com, virtualization@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, f.hetzelt@tu-berlin.de, david.kaplan@amd.com, konrad.wilk@oracle.com, Jason Wang Subject: [PATCH V4 4/4] virtio-scsi: don't let virtio core to validate used buffer length Date: Tue, 26 Oct 2021 15:20:00 +0800 Message-Id: <20211026072000.8699-5-jasowang@redhat.com> In-Reply-To: <20211026072000.8699-1-jasowang@redhat.com> References: <20211026072000.8699-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We never tries to use used length, so the patch prevents the virtio core from validating used length. Signed-off-by: Jason Wang --- drivers/scsi/virtio_scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 07d0250f17c3..03b09ecea42d 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -977,6 +977,7 @@ static unsigned int features[] = { static struct virtio_driver virtio_scsi_driver = { .feature_table = features, .feature_table_size = ARRAY_SIZE(features), + .suppress_used_validation = true, .driver.name = KBUILD_MODNAME, .driver.owner = THIS_MODULE, .id_table = id_table, -- 2.25.1