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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 CEC84C433DF for ; Mon, 6 Jul 2020 17:11:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B090F20702 for ; Mon, 6 Jul 2020 17:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594055474; bh=OKEXFBUa61CwzJctOxdoT1f/iwqy9U/WDdZTk4ak8Dc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=qjGeRor3WrYmE902tHT0bCoH1VDaVg0w7+im+3onpkr0M8DFhEUKYU8aNGjMv6F7s xXrHrEAbsxEJMczGMGH42daIRW+9b69BQisbqDNsIPOj2nyd0r4UEnzAPf7/aH3Kv3 mwXKny04LJBH5tU0cwtvrKfWFuGhMfiPjPBECH7w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729596AbgGFRLO (ORCPT ); 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-Google-Smtp-Source: ABdhPJzXKrdFon+80124TCMwCgNgQMLvdFNCTaVoP4PeQYBGjOmaliZ/ifCvEf2mbU4ivsbJal6eag== 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-hyperv-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@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.