Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1521109pxf; Fri, 9 Apr 2021 10:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ6t3NOJYFsCSVqABpFQvjeTvB0dMVed6F+QMxQpyzRkE3DDnxuNYL2/Tmlq9R0lVORKLJ X-Received: by 2002:a63:5fc6:: with SMTP id t189mr13951995pgb.17.1617988933675; Fri, 09 Apr 2021 10:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617988933; cv=none; d=google.com; s=arc-20160816; b=lw0LqJtXWry3m25XuqKFpyY2sXI93fLJpDgI7wR2zSEolDK4CrWMtaPNAxZHv6yEfh 7HwElpklfdMzoW5tpBxulIggML4niVMif0gL5Z/RVkd1YtsAIDMQtsce5Mytq7bayOyD V3f56dSqhmWR59/P9Y7QOw7VW+F/QvYlO2hVPuPI22jINtzZKjjGHSqy/VSAm9YVgVWp U3png/yIe7HdmNHhD9gKOo0oYheLYW+6VBTeBUHjArkrudWx9VxH8jI1qtIh1xpBtHh6 BHTUJX5PdSXhqmN0E7clFRj8CWunntYfSbOBODU7Uh6HUVqo7mhi6CqbDgvjo60niK6R h9vg== 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=DleQ7VeK2meirvzYzHUPaLLy20dHNBvI8Mjkq4A3H1s=; b=IZgX21fJbmtQXS7/e8QFHaeNYlXgCUgJ1hbzPDD5sG5undAQ3FmgsNzQUbF6NcvMFm UogUM3D3hEDF3O5njex9R1I3R9m8lCudw11d/jGakaA08wxCb5KAcJ7UNhJR8hqJrIgW 2NsX/nxQgb+L9+MZhxOkU1fc1szvOjis0MM/DBn0x6NswBl3XIrZ5mIXhIPN5xyBjA1S 9VG8s9AKxK/R55xReHgPIbNCzcJ54uIcXgCUON/NohGgi83qUxECc8vPnaS4vTeVIF7p 3fArB3IZ7YANo+w8Gh2DkYmO/t1mwMyXDdZVaxSIcMk5BFE//xcJOP0C0BPjYYql2xMp Jjwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j22BykHf; 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 t21si3356046pfg.64.2021.04.09.10.22.01; Fri, 09 Apr 2021 10:22: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j22BykHf; 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 S234268AbhDIRUE (ORCPT + 99 others); Fri, 9 Apr 2021 13:20:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234201AbhDIRUD (ORCPT ); Fri, 9 Apr 2021 13:20:03 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6D2C061760; Fri, 9 Apr 2021 10:19:50 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id r9so9840136ejj.3; Fri, 09 Apr 2021 10:19:50 -0700 (PDT) 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=DleQ7VeK2meirvzYzHUPaLLy20dHNBvI8Mjkq4A3H1s=; b=j22BykHfFoyhwXi6yVO9ewnjs4GZk3+4853WEzYDBBJ4lEQHhs0VYUwbgMq8AO3SE3 aQPpLFn75NHmz+AOIAiK5UBPomT6w5Mty5DuPTIsVuT3HQSBu7liBGHu/6nhgZcg1PQY ZkpMYGHo7MTD+ZVXWS7QScEjZoFAs8JQjWj/WK6ebfROWhNPxUaqTwvNPMZi9+q3cM5+ HrL/iIe/6B+RmyrjqO6V02GNnl5KVcK3g49+Fc6DuVED4oAYy36ZrFT/GnIfEzL4srs0 L27TR5myLoiStV72W5TnIlyHGLXhrE/hQ0Uakz/tFSje2vR9DzUxlM1T7xOLR2jSh4cD eiSg== 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=DleQ7VeK2meirvzYzHUPaLLy20dHNBvI8Mjkq4A3H1s=; b=AHBhNDHAMJL4b45Ht9Qu9YVZzljBXTlEZmNqLl2Ki2qnjse/4UaQ+fopCryAQI5ZxD ILInWCiisqHkSuBsG78S0/9vwmmvz7/0PnPF8/DzM79t0Gn6CgB1kODFuxZDpmg/xbzw rwA33LTKYDyTGNqwTjDUEizjAQVlcQ9ICD80tzh0sigKPBgyqPqjfUXDm+vaDzQjlj4x zfbhRF07ZzCo7HS6k74q7uQDuEGASwyF4U8efd8PNiegfEwoAPcEcAeldgOV5aYDEN0t 9kpZbsnCDsYCnOYG1J+wqKhMa3pHikdGTZ3SWb4RF/QpNoroAUmrR97iGK+2qq1tkPC7 05EQ== X-Gm-Message-State: AOAM532GtWYC7n3Jmv08SUR3vsXr5y4PSVGr/1bEwUol2SYdBFGyqIvh MX96C6fdWMU2DoiJt21EdvY= X-Received: by 2002:a17:906:958f:: with SMTP id r15mr17174327ejx.450.1617988789377; Fri, 09 Apr 2021 10:19:49 -0700 (PDT) Received: from anparri ([151.76.116.20]) by smtp.gmail.com with ESMTPSA id k12sm1762352edo.50.2021.04.09.10.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Apr 2021 10:19:49 -0700 (PDT) Date: Fri, 9 Apr 2021 19:19:40 +0200 From: Andrea Parri To: Michael Kelley Cc: "linux-kernel@vger.kernel.org" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , "davem@davemloft.net" , "kuba@kernel.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Andres Beltran Subject: Re: [PATCH hyperv-next] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer Message-ID: <20210409171940.GA3468@anparri> References: <20210408161439.341988-1-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 03:49:00PM +0000, Michael Kelley wrote: > From: Andrea Parri (Microsoft) Sent: Thursday, April 8, 2021 9:15 AM > > > > Pointers to ring-buffer packets sent by Hyper-V are used within the > > guest VM. Hyper-V can send packets with erroneous values or modify > > packet fields after they are processed by the guest. To defend > > against these scenarios, return a copy of the incoming VMBus packet > > after validating its length and offset fields in hv_pkt_iter_first(). > > In this way, the packet can no longer be modified by the host. > > Andrea -- has anything changed in this version of this patch, except > the value of NETVSC_MAX_XFER_PAGE_RANGES? It used to be a > fixed 375, but now is NVSP_RSC_MAX, which is 562. > > If that's the only change, then > > Reviewed-by: Michael Kelley The only change here is indeed the value of NETVSC_MAX_XFER_PAGE_RANGES, apologies for the omission of the changelog. Thanks for the review. Andrea