Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1092427pxb; Fri, 13 Nov 2020 04:08:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwAs96ssLw/izZ2EetdLASV1FAUXbzq/1V4chveND/haqm5ZR+383UTg+7APGaPoCaeP1M X-Received: by 2002:a17:906:6414:: with SMTP id d20mr1536686ejm.82.1605269321056; Fri, 13 Nov 2020 04:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605269321; cv=none; d=google.com; s=arc-20160816; b=hdp5yDUlrdIdAAEKfDhyqyWy9SG9zgM5Sq/r6LmerjyKEthn0G9ihn3m1yvTXVjpL6 ULN1Q8yXWGiRJm0s0eyJFZ4uZsex3gicE3yw52tkY2w4z0KBYV9Wis20h/l/e/IhGaM7 R6iVV+ctPEoWb8oROt2d1OqLp+u//n0jlgTRhNZ3+aRjGYvaTniKU6vwcJ3aBfKpy98b XzYJS5w4mqkX5bciwvMh4yor5oJJTjIVD9ukGbPclcBBu/LiR0lfqHBl4XQ8n47SwU2c 7srobnG0wSmA31hpiV4Vq5GHiV9DMWiImOsUjIJ2LiPMSy7vdwkX1sjT4dcOk6uk2N69 /Pnw== 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=NDe2ONkXQ2sInU12eibxw5UguccRghPGCP7Yu0BHDUI=; b=Ei4hbO25wtS437g+II2MZWB+idC5Vg33iWyzGYynX/C0odUSjU9EfBTJhG6m0AkM/3 3HN/ZXAXpziNmROseEVVulYDjgqv4EVYOC08ogSsKC8rTTL40zmoyvmyun9EPmPgorx5 fqr6nrU+mKIKDDRWwnIvhNHds7o5932oVzqEVeT04V6bXuMk8l9yb/IaENtCsoJLJdJK 4IkHNHY/q8694JITh1xPUWi2SiV5er+E0DV8ujXA1XZ/CPxFCwQIvpu2NNTz0+RLyuti JfGmsoLdP+o8sX6FZoa9o584jGDOpyWnylSqEdzLCYbQIhgtysJ39rPAu6xU7RR0LsgU I2Yw== 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 rl2si5623893ejb.720.2020.11.13.04.08.16; Fri, 13 Nov 2020 04:08:41 -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 S1726701AbgKMMFD (ORCPT + 99 others); Fri, 13 Nov 2020 07:05:03 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34105 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgKMLca (ORCPT ); Fri, 13 Nov 2020 06:32:30 -0500 Received: by mail-wr1-f66.google.com with SMTP id r17so9447903wrw.1; Fri, 13 Nov 2020 03:32:29 -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=NDe2ONkXQ2sInU12eibxw5UguccRghPGCP7Yu0BHDUI=; b=KtKGDXQEYS9DY/tjLuMNHqIFT1yRJwlp4B4MjRjVe5Qg8WZ0OKRvkE/H9KWtj4jx7V d7YU2CCcv9A7PIj4JOwTPz3OQJguNkgM4mG47qDMVNKT42a29Jxk3Hy7mLORZ3IoGdwv JNBnDF/57P0CkqNhoKcTrdltVy7UP/wLleUBtCtzjFkbLqepwlJUL2vcia/rYlgQNFVw wajoMHTvtwpzGCnNjZLZIVIbYrcqOsiXBsKAq8Ez5dot9cNY+teg2zwor+lyeCgr8TSG bg2DZGc/u/WUZhGHytj9qq0rFWAcAnfYSZEnBdiNR+38QtZO4uM20Rb+S/rLNT2vA33y evqQ== X-Gm-Message-State: AOAM531Qv7p7XVNmOLDwD/MN/veh9wwhrngCP11VT/BnL+KXBic78idq IDO44Zp8zDwmWR4mJ1EtBEs= X-Received: by 2002:a5d:6cc5:: with SMTP id c5mr3029836wrc.301.1605267148490; Fri, 13 Nov 2020 03:32:28 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id n11sm10445889wru.38.2020.11.13.03.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 03:32:27 -0800 (PST) Date: Fri, 13 Nov 2020 11:32:26 +0000 From: Wei Liu To: "Andrea Parri (Microsoft)" Cc: linux-kernel@vger.kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , linux-hyperv@vger.kernel.org, Andres Beltran , Michael Kelley , Saruhan Karademir , Juan Vazquez Subject: Re: [PATCH v9 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Message-ID: <20201113113226.chmgg6hhfamomz5p@liuwe-devbox-debian-v2> References: <20201109100402.8946-1-parri.andrea@gmail.com> <20201109100402.8946-2-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201109100402.8946-2-parri.andrea@gmail.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 09, 2020 at 11:04:00AM +0100, Andrea Parri (Microsoft) wrote: > From: Andres Beltran > > 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. > > Signed-off-by: Andres Beltran > Co-developed-by: Andrea Parri (Microsoft) > Signed-off-by: Andrea Parri (Microsoft) > Reviewed-by: Michael Kelley Reviewed-by: Wei Liu