Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1472832pxb; Fri, 13 Nov 2020 13:43:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxj6pdwb163HgdxxYE3LGKDourI8kqptLAKCZqRQasrJWaz4BEr3K/GS+NNcxYN1CC//lsQ X-Received: by 2002:aa7:c508:: with SMTP id o8mr4711759edq.339.1605303835122; Fri, 13 Nov 2020 13:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605303835; cv=none; d=google.com; s=arc-20160816; b=yW8ReDYlIVTCyXWQhkVsuvnPtERpxfTmnmMyTjp6kZAT32n74Pw5T2ULv18hwXRehE SxjCOfKsdgCIVhGsDZWa7u6kQIPeAALT0S2K62tyfp+xbLuFABsh83Ygy6RhXVyf3QnQ N55YZEjlTPvv1qnThMc21ZrPqWhVClLBAzP6vi+aNT7ozHwBBOyvF94x7jIcZc5Vv7Yf QAw20oakU84PhkDmkn2J4GqDT8CWMxmgRJVJwFMmprJk9CcKg47K0K8tskmvb8WxWWoP MarKnwPFZ9o5i3w8yOlR5y/oFGOoCOalG+iCol1ozHn/8g1Jel5/RyyjiEQ9mTVe/rOl jNjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GY3sxkg3pkqNwc0wL90fxKYZ45EqrlmAu69mRryF7BM=; b=LkqWOtcao0jYlBwAWokqCkGP6OZ8utbfcgx91PWUOtAw1A/EC3AvuUbjMECuqo08QQ ug/jT6F+U4iLETTiNq3DFmtCF1DQ0TPspySm6arPXu5Gd3ex1yPqm0welhU3j1DuV6c3 SZPPG9astARggTRRS+gIY210XdyuylR6iRJIOzXDIOPy3Ey4lbFS6lByd27eAhZGOxJA uJsfc1Mdu6vwP0O3FnUirtCdrOIgvFmzhM2lwOSSKQxNUC2QOIFsmLHLwEwWlKea/JFO M0nJ9LcOLvQ4MD9pKTHx5ghZeAzJiN+FNMK1d4a75sHZAyoidURPUtsDGyx98QfLkBC+ 1z2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QsOQMrz4; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi9si4999523edb.331.2020.11.13.13.43.31; Fri, 13 Nov 2020 13:43:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QsOQMrz4; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbgKMVjq (ORCPT + 99 others); Fri, 13 Nov 2020 16:39:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbgKMVjo (ORCPT ); Fri, 13 Nov 2020 16:39:44 -0500 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA065C0613D1; Fri, 13 Nov 2020 13:39:42 -0800 (PST) Received: by mail-ed1-x541.google.com with SMTP id v22so12454080edt.9; Fri, 13 Nov 2020 13:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GY3sxkg3pkqNwc0wL90fxKYZ45EqrlmAu69mRryF7BM=; b=QsOQMrz4ShhUlES7isqspW1o38dZdZLYZ3bnw/pYncm8p7NSiCAur8hXoz+MgjoiuC oUETvqL8Opp+A5mRL77tkDmyeoUJNPzhRbwP6sXK/suo4a30oJdLx9sJeV/3wK4idJTP JWktnT9+kU1yb9FdiQ/6HgFNF9DgVoDBa7gNEMmUojuVjHGxxC4GinQVDn682o7A6doU 9HDipvWp0f8ln8xzFQsMcUyd+GdzzOBg6okpdp3D6gkxDVaD0AOEeSGzPgyS0+PK7z9i z6o6KrTmsKKq/6t5c+vWvRpnBrCbo1pzb9ZmO3VXiQIddCjjIxW4yiu+iaU0/Wh0veSb ZhBQ== 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; bh=GY3sxkg3pkqNwc0wL90fxKYZ45EqrlmAu69mRryF7BM=; b=sfSHKQldyK/Yx1/IokCI+jLf5SsgleKXhcFYLU6nzDHCr8po7JtRO3XaV6L1XOTTgS a6piG2rIwtfYrqud/gm7EbRiD6KI1EKbN8A2Nv+rjDP5aYFJoBqO5ibh+FIBi4C2KZJa B9fEKtIj3p24/cjeeMmrYApqLYnRos6gpa+7yXeHt+ynq3dIdxwA7d/t6GTmqWNL3Qjz yNcTi/XLwp6DsEhV+VDIMHc/r/sZDHU0HUZcbkuPZdg1gNqGBC/vVtoqrPbVq1B37e8m 8sNYExgfkYe1Yt2A55D28WQomzTdlFdjZyrqndCmxzfNn5Jk0+r3K9Gwy1Nni2vXaQKR I3Sg== X-Gm-Message-State: AOAM532p7tplJdcHBt7IZRt2IKxt2Tl3yOT7blRDRuo+spxH2V0bn4pd jcZrh5AMliszDg+IcucqiW8= X-Received: by 2002:a50:f392:: with SMTP id g18mr4798636edm.140.1605303581324; Fri, 13 Nov 2020 13:39:41 -0800 (PST) Received: from andrea (host-82-51-6-75.retail.telecomitalia.it. [82.51.6.75]) by smtp.gmail.com with ESMTPSA id p26sm3095853eja.13.2020.11.13.13.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 13:39:40 -0800 (PST) Date: Fri, 13 Nov 2020 22:39:33 +0100 From: Andrea Parri To: Wei Liu Cc: 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: <20201113213933.GA4937@andrea> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201113185424.ujdfx6ot7siqr5qh@liuwe-devbox-debian-v2> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Andrea