Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4634948iob; Sun, 8 May 2022 20:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUq19e8Rbgq9UBsejM6xEiCCfrr4DdD7ghykqT0tj+AByqpEBK+0MI/FSr46uB55a2c6Bw X-Received: by 2002:a63:5fcf:0:b0:3c6:3a10:9b38 with SMTP id t198-20020a635fcf000000b003c63a109b38mr11554003pgb.568.1652065389898; Sun, 08 May 2022 20:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652065389; cv=none; d=google.com; s=arc-20160816; b=v1EfMtKBrDIOeeyAEa2/JEcJDbJ0eeiSVhsmR/NY7+JTc5bCm9qXM55cSIzT3FPr0V 2skQ2YI42Kf7XGu9RdpjeXOjG84jUvmuryJmo6THkuLw8M9eszfwlmbs5unz+S4TlUDl jEJvBIJlRH4v38UCztCX4kQvD3/PnaBBhAzpm+8x85uiWOZZo1fHBLaCKu7++idzSoW3 er50BD549N/QbxubtdxpXbqg91Ry+UA19M1ZpOc60y7C5fgH5JZUFIghD71upgRGOPkq wmAo6dY3SOtF86G11XDV8C+yXQ9dVU/WQtAwWcYKijyiFlt/z7kvr6soUxznbIUKXTIq fhxw== 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=Ft3fc9QL1+iQ008reNvM/ifI2x+9VqujLjdVk3BAeKE=; b=x/pToii2THUIPAKvEAqWbI+MusTsKiCpAxAJ53fRQLxWHKPv+gsy72r8k3zDH33rkf scpI6UhgD5f744S9qpB6WS5sZZIp9/X6yTLJH0Tec3HwWnnr567y6bPVA+bddT7+KHmr KGUZ7tStMqo1ez2tFto/uQir9/X8l4SBQ1knX54PaJhoOYNAdd/Rs6fGVi+4fTTTOdsq C1mrHIFHZQd+RRgfghUqCX6Wc/Te4yHqr4YpA0nag3beHmRSCsGtMyfDJcd+bx1D14Bh 9pt4r2zPykjSs384X8wj+yAHXVP/GuFGFWqlhRUMMU5Y6xj9ml6SLluzJ09AZjwpvAoU AkYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="OZk+O/7K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k9-20020a056a00168900b0050da3377440si14394649pfc.183.2022.05.08.20.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:03:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="OZk+O/7K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F8FA8720B; Sun, 8 May 2022 20:01:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389701AbiEFHvx (ORCPT + 99 others); Fri, 6 May 2022 03:51:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389679AbiEFHvs (ORCPT ); Fri, 6 May 2022 03:51:48 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34D60674F8; Fri, 6 May 2022 00:48:06 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id bv19so12893072ejb.6; Fri, 06 May 2022 00:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ft3fc9QL1+iQ008reNvM/ifI2x+9VqujLjdVk3BAeKE=; b=OZk+O/7KtBby4smjTuDPTjrl3oDJTDhPtG5EGl8/TXE5iHBSCTMIv4DRcnawTyo5dv tdYP82kIiXUngTkDdS2y1NofcKP4v/2S1CHtAksTdkCqrHFp1DCbT1v9aoXXIB6vzaCo mm6hPQatzFU8dQ1Uca2EkRR7VQAaXdk5IY+JJlVTxktUE+ofK/3BDkRpsL8MBhmNOub2 Z0IYw6QW1sW8pCmY73iaRLLTu6FJETywMGthz52s6RtQ6kuRpQAurIAYF3zMbCFnrpEn zjTd2qO99mmDTGE618ALE3847Y74DtMdLlEO80jFvIXKWHSY4kWT2Lz+pPTzM5oLCEds 4mhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ft3fc9QL1+iQ008reNvM/ifI2x+9VqujLjdVk3BAeKE=; b=fKsXpu8ue8QVJO+amlLP0E/pdnu2rYaGljq6JUSRJX5IXTPRELlIJO/INV5kzSerIt hZ7+uB2jKjvKVm35mTENMnwDQ8Ja2wLKoMUdu7d92CcEfCwzqsvF5szP8Gj9W+g8nXuh ssCZtOt2GomD5TwFyCHV7uk+hgz4R3r9Fc84kdVhOUNNXUB/aK29CuoNNBd0ZqpPZHfY SplLM783gSwpnO7tM5sM139OwHkkoxLgwEvSMWjM1UOY5ocSlE3sS8xzA9YdIEHybDaO Eq6Ix42BFAock/23VoKpED2CAaOLJNmv0jtL0yl5IfBZOCeZobeetGgiil3lwiobKklx a1MA== X-Gm-Message-State: AOAM532gSMtbfFQ1EbAE1Kw/MMKmYIBl60CgE5IW6yPgxviT8jeIln7i vWh+Fam6RvghK5TcUfolqDY= X-Received: by 2002:a17:907:62a9:b0:6da:7953:4df0 with SMTP id nd41-20020a17090762a900b006da79534df0mr1858291ejc.316.1651823284534; Fri, 06 May 2022 00:48:04 -0700 (PDT) Received: from anparri (host-2-117-178-169.business.telecomitalia.it. [2.117.178.169]) by smtp.gmail.com with ESMTPSA id gz12-20020a170906f2cc00b006f3ef214de8sm1602215ejb.78.2022.05.06.00.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 00:48:04 -0700 (PDT) Date: Fri, 6 May 2022 09:47:55 +0200 From: Andrea Parri To: "Michael Kelley (LINUX)" Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczynski , Bjorn Helgaas , "linux-hyperv@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] PCI: hv: Add validation for untrusted Hyper-V values Message-ID: <20220506074755.GA239213@anparri> References: <20220504125039.2598-1-parri.andrea@gmail.com> <20220504125039.2598-2-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I don't see any issues with the code here. But check the function > q_resource_requirements(). Doesn't it need the same treatment as you've > done above with hv_pci_compose_compl()? For completeness, the > fix for q_resource_requirements() should be included in this patch as well. Yes, indeed. Will do for v2. Thanks, Andrea