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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C161DC64E90 for ; Mon, 16 Nov 2020 12:37:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8992E20855 for ; Mon, 16 Nov 2020 12:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729650AbgKPLD7 (ORCPT ); Mon, 16 Nov 2020 06:03:59 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36012 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbgKPLD6 (ORCPT ); Mon, 16 Nov 2020 06:03:58 -0500 Received: by mail-wm1-f66.google.com with SMTP id a65so23241607wme.1; Mon, 16 Nov 2020 03:03:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vzbLBZlhKCzw8aWCXrtL3fgPKqSslz5XBfEd+0EuZTU=; b=Nl6Y7U6D6g412Y5EyvaYTCNVZaNhDCfo/6IeUY5L73MmH1ugGTNqWUfZwNVqFPpUuE 3ca7JXnsSlFG6DkBD0M/W5rYqtXRofEDXF+TGC1G2q5MgiMPqNn4ZVMHnNsGF3eDMVol 2YT3k8VnzGI5DI2Q1i1i/Mmb2t19k1IWvBsMtovrFtcU4HYVg+MBAEnAJcFEMqVjVUYb X/4KrWXSIpLt2kiVIep71sLFfz5F68xjog0jEjALedKlZ7hozjzagEFcRJGnVV616aiD fuEToB58/IdcS+czQed2OlljxjugwaGWAx5JGCTtg6lroVat1YImZhURRNYl3eeN7fug Saog== X-Gm-Message-State: AOAM530JXqUYKao7xX+4mrxemauNSkwj5o4i9fRmWF6wK9JkfgLYKfPl Xppq3jVCrTEH7pK94zayoQ2w/VrrEJE= X-Google-Smtp-Source: ABdhPJxkE593KIIPiNQrAJmMLS9OVFuJKEQLkWmp7EhuYf4WWbZMwfZBIS8Lzv90wIsg3PY9Pwg09A== X-Received: by 2002:a1c:a185:: with SMTP id k127mr14596707wme.23.1605524634488; Mon, 16 Nov 2020 03:03:54 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id w11sm20204620wmg.36.2020.11.16.03.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 03:03:53 -0800 (PST) Date: Mon, 16 Nov 2020 11:03:52 +0000 From: Wei Liu To: Andrea Parri Cc: Wei Liu , linux-kernel@vger.kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , linux-hyperv@vger.kernel.org, Andres Beltran , Michael Kelley , Saruhan Karademir , Juan Vazquez , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Subject: Re: [PATCH v9 2/3] scsi: storvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening Message-ID: <20201116110352.obbqxzxw6etdq4cl@liuwe-devbox-debian-v2> References: <20201109100402.8946-1-parri.andrea@gmail.com> <20201109100402.8946-3-parri.andrea@gmail.com> <20201113113327.dmium67e32iadqbz@liuwe-devbox-debian-v2> <20201113185424.ujdfx6ot7siqr5qh@liuwe-devbox-debian-v2> <20201113213933.GA4937@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201113213933.GA4937@andrea> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 13, 2020 at 10:39:33PM +0100, Andrea Parri wrote: > On Fri, Nov 13, 2020 at 06:54:24PM +0000, Wei Liu wrote: > > On Fri, Nov 13, 2020 at 11:33:27AM +0000, Wei Liu wrote: > > > On Mon, Nov 09, 2020 at 11:04:01AM +0100, Andrea Parri (Microsoft) wrote: > > > > From: Andres Beltran > > > > > > > > Currently, pointers to guest memory are passed to Hyper-V as > > > > transaction IDs in storvsc. In the face of errors or malicious > > > > behavior in Hyper-V, storvsc should not expose or trust the transaction > > > > IDs returned by Hyper-V to be valid guest memory addresses. Instead, > > > > use small integers generated by vmbus_requestor as requests > > > > (transaction) IDs. > > > > > > > > Signed-off-by: Andres Beltran > > > > Co-developed-by: Andrea Parri (Microsoft) > > > > Signed-off-by: Andrea Parri (Microsoft) > > > > Reviewed-by: Michael Kelley > > > > Cc: "James E.J. Bottomley" > > > > Cc: "Martin K. Petersen" > > > > Cc: linux-scsi@vger.kernel.org > > > > > > Reviewed-by: Wei Liu > > > > Martin already gave his ack back in July. I guess nothing substantial > > changed so it should have been carried over? > > The only change here happened in v7 and consisted in moving the > allocation of the request IDs from the VSC code down into the core > vmbus_sendpacket()&co functions. As mentioned in v7 cover letter, > this change was applied to ensure that the allocation in question > is performed after the packet is copied into the ring buffer. On > a positive note, this change greatly reduced the diff of this and > the following (NetVSC) patches. Martin and James, are you happy with this change? I would assume you are because that means this patch to storvsc is leaner. Please give an explicit ack if you can. Thanks. Wei. > > Andrea