Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3000035pxb; Mon, 16 Nov 2020 03:08:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO7nNurlb8SXjoipHrkvawx5LTctwD443y2dg7VjxvYKwjR+TruKv7pmj2KB2Hux/g1foe X-Received: by 2002:a17:906:2e0f:: with SMTP id n15mr5001318eji.157.1605524912710; Mon, 16 Nov 2020 03:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605524912; cv=none; d=google.com; s=arc-20160816; b=tzrNfrluGH66mMghiI9T4Rpp3mWG/I15DQSK6GKBixtr8sknvluXq8Gmf9SHa3u5jf omIaQlG6sqPgxCoKhAAv2YXkqr7JTumpy6c/Bas8SRefrnb2H/4ZTPZEG98QPDXTZEU/ oYgXUZZD/EdXbpvxKZUMFZDt/R0qP0XRMrwNQuLMzAGZlnm2H6bE28QC1Shpbk0GVMSB XjsMBc50QohdUhjLwZOvr/G5iwCWjvc+ugXt9RsmMyPU8h8US8MOIV45z7gAL39f18xE dl+8zyJfBN3GyV35uTAjz18VqkBUhfNlWh2FsNZ4oNL2qHnkfolQQEx5tHOpqrWWH2tI wdcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vzbLBZlhKCzw8aWCXrtL3fgPKqSslz5XBfEd+0EuZTU=; b=X9JgwZ8ICnQzWXA3YzjSpYGr/5Gqa23lMLwdCu5aIG4fqYRcMioXpJE7kaycz2sv8r NdeGUWwxIz2pcTDYKlqv/PN+tXJ6d9/GJPBpb2xTLukJ9vtZ0g0/kTvB86i+CHRI6+wR zPfq6G2Knfmm8v2bEGwFrt+S84CB0rF5JwMeQFIBtkwX+q9p9th0c6fpaAO59CDQnbJs Q6Oax6DQP1caeq+n/wNZEHXv6k+3vhaIbCUnXjHrwX5igINnOY7fRItkxbNJjb+1Pj6a tx7iPm5G63VGfFZlQglsbCzz/RQEkhE5SV4DODq6xRr80xhDo3k7Mt6co2tWjx+ZSffD FH8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si11108098ejr.241.2020.11.16.03.08.09; Mon, 16 Nov 2020 03:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729645AbgKPLD7 (ORCPT + 99 others); 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-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