Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp324900ybt; Mon, 6 Jul 2020 10:12:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi3CUXleerfXKwwe57lGSnKCAw67khzSQRcS6cg7G7vdh2fGimZOCU/VePNDwoLiQ9C6Zs X-Received: by 2002:a50:ee84:: with SMTP id f4mr55356701edr.183.1594055533984; Mon, 06 Jul 2020 10:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594055533; cv=none; d=google.com; s=arc-20160816; b=IlGOJ6QMHtHS5WUUf1RRfFPGL5ibgSh2o294k662txGztc4wCxupftIYd89wqrb7PP khT3zBgmVsU1Vc81VO/X8NNwQiqSiaAxAyIbzP6cBvkW2npI/0ak4dhiOwnGRIw2Lj9e HJqL9hznfqBmWFB72aBnZt7drjSVU5xHGUl4Xu1badBn6y1ZSJD8LdZjNwuNMyGcnn9Y wBLE1jGIzB986y5pYXIA52Y7ItIs3WQX+7xnUSS75xvE3wSwqiZpIf7fCvrwF0GoLoAz vuKs8+4TozxxpWttg69HQPNZfPNDTnBdgedfqIhJAoGRN0fCLKhH4RC/aznnNpEEBSMe PTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FxwGWQMcLORFbX3FtYwfpy+gCcGxaQVQcEFoLrnat08=; b=FEQd+Mcs1raEH+18OZG4OQzFUEINVaPRipq9DJMGMpwz1Qlv5aloiTE3zTi0vAMmSX +vPnJovii6UBwHPennQJgzl8faCBD4tKM7KFE/yKAz3SvIMjBPKGb4KcgCDhEPEv4hfM UcbrJIg/URfT9HsjWkyHn1VzasvguKeun6zGUIQmiIJXzW87Ku87xV1QCIrP22EX3Be3 mTzZqI7oKkNWow9UvVmRHtMYv4wPOcyc8oKvITkK4SX5Ow4oW4Uf8y3tS2lq2mNmCuF3 qBcqkPfniAJ1TvbO+N8V2YaxboENLSQCS+mYMkInzFlr1sn1zBu8+voPSy+DIygRCPYv aM2w== 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 y5si13002404ejc.674.2020.07.06.10.11.50; Mon, 06 Jul 2020 10:12:13 -0700 (PDT) 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 S1729615AbgGFRLO (ORCPT + 99 others); Mon, 6 Jul 2020 13:11:14 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39965 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729593AbgGFRLO (ORCPT ); Mon, 6 Jul 2020 13:11:14 -0400 Received: by mail-wm1-f68.google.com with SMTP id f139so42930579wmf.5; Mon, 06 Jul 2020 10:11:12 -0700 (PDT) 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=FxwGWQMcLORFbX3FtYwfpy+gCcGxaQVQcEFoLrnat08=; b=YA1glZ2VIxWv/SwHXrJEvLrNZ1etDoX1wM2leoWlhTB5Ti0Jgo1OZgXa6KHw6lw1wt lNrybA6D9INi7MI+pEe+WZ2GBe/W7bcVCqKhLxs9BTgFPHvbDPxoxWOkWQcrWUNGiVeD 66canYWlproHFY8enabVylGWqDhODRweHDc+GO+vhlcLHXpetkHZ5mfgV4R7FbHKBsn5 v8b+n82sRFZM+e3XN2FEcETYaEuse145HHz+ZucCz1aeK1cYLunpDMXwH/HOvYpy45U9 tUeAfhLI6m4H9yUj203F4FPJ9SyzMKAM9hK1S8WVZzQcXGg+eYirRlQP2bCu8GLIecda /YWw== X-Gm-Message-State: AOAM532hbs1/hqjXdl1lCn4ifdCGWFeNM7wDwlsrd3G8iUlDOxfZ7Lk8 6aypf/y+Mm/rQMJtl4eDDZk= X-Received: by 2002:a05:600c:4114:: with SMTP id j20mr173369wmi.74.1594055472137; Mon, 06 Jul 2020 10:11:12 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id u1sm18079994wrb.78.2020.07.06.10.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 10:11:11 -0700 (PDT) Date: Mon, 6 Jul 2020 17:11:10 +0000 From: Wei Liu To: t-mabelt@microsoft.com Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com, parri.andrea@gmail.com, Andres Beltran , "James E . J . Bottomley" , "Martin K . Petersen" , "David S . Miller" Subject: Re: [PATCH v4 0/3] Drivers: hv: vmbus: vmbus_requestor data structure for VMBus hardening Message-ID: <20200706171110.ti5cfhmaoufi3zt6@liuwe-devbox-debian-v2> References: <20200701001221.2540-1-lkmlabelt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701001221.2540-1-lkmlabelt@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 08:12:18PM -0400, Andres Beltran wrote: > Currently, VMbus drivers use pointers into guest memory as request IDs > for interactions with Hyper-V. To be more robust in the face of errors > or malicious behavior from a compromised Hyper-V, avoid exposing > guest memory addresses to Hyper-V. Also avoid Hyper-V giving back a > bad request ID that is then treated as the address of a guest data > structure with no validation. Instead, encapsulate these memory > addresses and provide small integers as request IDs. > > The first patch creates the definitions for the data structure, provides > helper methods to generate new IDs and retrieve data, and > allocates/frees the memory needed for vmbus_requestor. > > The second and third patches make use of vmbus_requestor to send request > IDs to Hyper-V in storvsc and netvsc respectively. > > Thanks. > Andres Beltran > > Cc: James E.J. Bottomley > Cc: Martin K. Petersen > Cc: David S. Miller > > Andres Beltran (3): > Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus > hardening > scsi: storvsc: Use vmbus_requestor to generate transaction IDs for > VMBus hardening > hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus > hardening Series applied to hyperv-next. Thanks.