Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6002589ybe; Tue, 10 Sep 2019 12:01:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM9yMegDj+JcHt91LRvzCJdeGARVWbJCaODKDk38Jn/aN5zdjILbpqypNEFwN9v8OVRIaU X-Received: by 2002:a17:906:3b8a:: with SMTP id u10mr26943115ejf.167.1568142065088; Tue, 10 Sep 2019 12:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568142065; cv=none; d=google.com; s=arc-20160816; b=md7fAWZB8V7r6p6rfKKn4m48crfW6lhHK4QWihz50Brts/XooIEN3MSbBOpbZQ9m78 8gUo2bemkHgqouFg5VF9q4WZlvqGUJCmmbVAnICcZ4NEHto4/Map1iC4/x/Eon3pOOvK qHzt1IL7O1MR0Kx7osU0zUUhufSWKnml5IdR+sb0YW+jRECQK4NwuGGrS1GjA/BrCazA 216F//RleZzC0q+ZAGOzOsGgPyAD4CK/LWNkBWcK1ufcvlJ6GbLmbogcNOSheQpwyOjV KnMypKcgHqWvO+DqAj3RkkRaNUpEPWb9l+Qv//OA3wcABiRti4FD910TcV4cShP/nZEg NYVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jLQQQ18t9kh47Ln28osxLYD2aIXlVGXfgv4nf12TujU=; b=ZozgScS3bFwpscl1zLldLVeLal2nf8i3iBx/UmAq3j/VTcgvSCUaANsrd3BBn6G5Li 7p+iNvRmvFcEdWTf8imGVTB2wkusY6AX2ZEBaAbYWgWriK3QXHLvUK/GtBucXFeYfcuk Iw3kQpUrr6B7/82tyOSewVGAQriti0o1O3agLFMB6JkeeDteKfwtYY4DLhv1Sy8oGOeG i4DHfm7Zx2zq5zMUswifk0ifQxKik+aM6fHgSlqsAFvAFwrfod1LFfN/iJ18NCdpxqZF tVtYBidXXHpHsxRdyc1XCsynXK9ffMu57+wFPrS5lRUwTHuUF6Q5Hh6uitg5/I08BNZa lnQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si11053591edr.362.2019.09.10.12.00.40; Tue, 10 Sep 2019 12:01:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404143AbfIJMe7 (ORCPT + 99 others); Tue, 10 Sep 2019 08:34:59 -0400 Received: from mga09.intel.com ([134.134.136.24]:55125 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729890AbfIJMe6 (ORCPT ); Tue, 10 Sep 2019 08:34:58 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 05:34:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="185495499" Received: from mweingar-mobl.ger.corp.intel.com (HELO localhost) ([10.252.53.26]) by fmsmga007.fm.intel.com with ESMTP; 10 Sep 2019 05:34:54 -0700 Date: Tue, 10 Sep 2019 13:34:52 +0100 From: Jarkko Sakkinen To: Seunghun Han Cc: Peter Huewe , Matthew Garrett , "open list:TPM DEVICE DRIVER" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] tpm: tpm_crb: enhance command and response buffer size calculation code Message-ID: <20190910123452.GC7484@linux.intel.com> References: <20190909090906.28700-1-kkamagui@gmail.com> <20190909090906.28700-2-kkamagui@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190909090906.28700-2-kkamagui@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 09, 2019 at 06:09:05PM +0900, Seunghun Han wrote: > The purpose of crb_fixup_cmd_size() function is to work around broken > BIOSes and get the trustable size between the ACPI region and register. > When the TPM has a command buffer and response buffer independently, > the crb_map_io() function calls crb_fixup_cmd_size() twice to calculate > each buffer size. However, the current implementation of it considers > one of two buffers. > > To support independent command and response buffers, I changed > crb_check_resource() function for storing ACPI TPB regions to a list. > I also changed crb_fixup_cmd_size() to use the list for calculating each > buffer size. > > Signed-off-by: Seunghun Han I think as far as the tpm_crb goes I focus on getting Vanya's change landed because it is better structured, more mature and the first version was sent couple of weeks earlier. You are welcome to make your remarks on that patch. /Jarkko