Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp233393pxb; Wed, 4 Nov 2020 21:02:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoBXgCK+LOEKeSOzkVdM2PdD38SCbr7LoIbergCdDkrOwAi3w8J5DwxCVI5R764RDF/wf6 X-Received: by 2002:a17:906:374b:: with SMTP id e11mr549869ejc.339.1604552566081; Wed, 04 Nov 2020 21:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604552566; cv=none; d=google.com; s=arc-20160816; b=z0Tm5VHW8pJQlrEIzdfiw3lo9GOBaE0HWoXmku6bqRFob4q558TYe10NRk12r7xQXh TSN4FHrHAfxUy/C7sDOIrIaWP6Boux0c51Hx29T3Fg3C6X/XphcAOHH0Fj0CbFlPtCUb Ja926L1gctLGUCH7muGnd+UAep5bhCMJfB+NJigmHgCX3o9eVxvHhbj0Ur8JTOnvQj36 YxrLVclMv9lKMbiwvlzpJA/HBAYHJAE+pi1VEMTTIVqME2967OMbrNiiXBEUYv1vIOwv ItJrQhsx6leS5FeAqwzsk4ikk9nnDVEZ35IG+jPDQFGfoaTT5+e829ozCedWx30Yr1WL uHFQ== 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=2QtdhLn6dbQgBdJcNj2XZy1nXB4zinTDtHIxteWe2Ok=; b=ZDs9bXtuuxqZ8i2WKBw0oGmQ9+uphTmkT/IwEneHQjcpZsXmHA20AMrpUCzbKwXjVx rQJwKYU+luDCzO2o76FVxjsOy2flCVwMXSgHhcdb+2nGRQwhYfdTnandWe9yM182Gd0x 0b1xYGZEigC8Md6lDAUNVm2x8G0r0xcMrEtwkoK4/j5wNx62ZjmCC9mHDOw3EGGZylDb vDbkMncbMm/bDXW9H4m8wLNITLjVoxXE7IpfcZwhARXSVsM8K5M8Eic+YQ1kPhcPxL7W MOPMw5h4FaLklWEUHC+Roi2pBdz3C+rQL7rmDEknd1LX4Xsud4GXGA7LiUni3S+6hIao 69PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lekAQ+Vs; 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 c4si351967edd.464.2020.11.04.21.02.24; Wed, 04 Nov 2020 21:02:46 -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=lekAQ+Vs; 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 S2388600AbgKEDdJ (ORCPT + 99 others); Wed, 4 Nov 2020 22:33:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728511AbgKEDdJ (ORCPT ); Wed, 4 Nov 2020 22:33:09 -0500 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F988C0613CF; Wed, 4 Nov 2020 19:33:08 -0800 (PST) Received: by mail-ej1-x641.google.com with SMTP id za3so528307ejb.5; Wed, 04 Nov 2020 19:33:08 -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=2QtdhLn6dbQgBdJcNj2XZy1nXB4zinTDtHIxteWe2Ok=; b=lekAQ+Vs/f1h1OIgWwz9UDPTUe8NXyK8/7tmffXxLp/lB7jC3Zj1n1UGEnvyQrRzYS MOh/pTyY1ylDqIdyeQNIzj/7k1nvZ0DE619EG7fU6GJ4mKBHrCm13lHLeVPoOAtLEwk1 p0v8klJ+jGnr+/HP5CYX1oGXvrCiKmlf5Jgme5q4fSLfvXtQvrDrSWimMi9637HHAEKN WRQbsS6JEwzzs1oycmHxxlZBSCWrrBEtJ0hFllLaoVpaYB1diIhPShHBLat7VINQ4jSQ xaU943CCmAhii1WjYWRevNxwIEyVyl1056y89u9Up8GjPjeixL+bxyyS0uXZ/D9Hmcbb KZZw== 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=2QtdhLn6dbQgBdJcNj2XZy1nXB4zinTDtHIxteWe2Ok=; b=OLzzNiMEAzEecZL145OMhHE3D9c0Z0eNxOEbpLHDA+UK19rl2elSOZ3mroYLB7Xt4S CWLFrwd5ornI3urJgTMqwInAzLodgWkW0TQv2bMN/rSbb4IQkxqUjz/SDA1jSnCPs7uN 2NsL9EjWIEjZlpEb08WwaJFU81HaWZYJFZn4CGe/2QvdiEp2oUn+yGtwNo1fMo9oC2aA +vzq0b+qkiKt5vwpauCo+LzDFyDCB/iPrUL0hW8wRExk9QOyidfE/kMXE96XgY907alB /s26SjOH5iD65pumx4R5M5IJQAgESQ2vm5Cx1yZOwZHo7mhPPyD9hTFQYw9Ns7wOLvtn ZPDw== X-Gm-Message-State: AOAM532udaf8Q13w4JO7EOFMVBzkHwmbEMaE6VdLfiKt1uqn//UcdDct wyfEvv8tbCj0etdTGJTtx+8= X-Received: by 2002:a17:906:74c6:: with SMTP id z6mr378220ejl.448.1604547187200; Wed, 04 Nov 2020 19:33:07 -0800 (PST) Received: from andrea (host-87-7-71-164.retail.telecomitalia.it. [87.7.71.164]) by smtp.gmail.com with ESMTPSA id k11sm101717edh.72.2020.11.04.19.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 19:33:06 -0800 (PST) Date: Thu, 5 Nov 2020 04:32:58 +0100 From: Andrea Parri To: Jakub Kicinski 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 , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH v8 3/3] hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening Message-ID: <20201105033258.GA3079@andrea> References: <20201104154027.319432-1-parri.andrea@gmail.com> <20201104154027.319432-4-parri.andrea@gmail.com> <20201104134348.39feba74@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201104134505.44d8c4d7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201104134505.44d8c4d7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 04, 2020 at 01:45:05PM -0800, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 13:43:48 -0800 Jakub Kicinski wrote: > > On Wed, 4 Nov 2020 16:40:27 +0100 Andrea Parri (Microsoft) wrote: > > > From: Andres Beltran > > > > > > Currently, pointers to guest memory are passed to Hyper-V as > > > transaction IDs in netvsc. In the face of errors or malicious > > > behavior in Hyper-V, netvsc 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 > > > > I'm assuming this is targeting net-next? If so could you please tag it > > as [PATCH net-next vN]? > > Ah, you don't 'cause you only sent us the third patch. In that case with > the nit below addressed: > > Acked-by: Jakub Kicinski I fixed the declarations locally. Thank you for the review, Jakub. (Yes, FWIW, I was imaging the series to go via hyperv-next...) Thanks, Andrea > > > > @@ -695,10 +695,19 @@ static void netvsc_send_tx_complete(struct net_device *ndev, > > > const struct vmpacket_descriptor *desc, > > > int budget) > > > { > > > - struct sk_buff *skb = (struct sk_buff *)(unsigned long)desc->trans_id; > > > + struct sk_buff *skb; > > > struct net_device_context *ndev_ctx = netdev_priv(ndev); > > > > Swap these two lines please to keep the variables declaration lines > > longest to shortest. >