Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5750127ybe; Tue, 10 Sep 2019 08:16:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmOy1xX9svi2YgqZvNSAQ3lPr1dLLWpp9uAzSVVgz/RuVsboT6lPd8Vn44LRPTmLlbZUJr X-Received: by 2002:a05:6402:1685:: with SMTP id a5mr19365423edv.304.1568128609024; Tue, 10 Sep 2019 08:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568128609; cv=none; d=google.com; s=arc-20160816; b=GH3JZhgQTGYSKBH9reFnx86JATq+V/LsdKkYy1HS63sKP/e2PMbEOcbO3sYuX4VuwL YEYHP+ZDsIi4ZU3qXsSxSgCBu730siDaZgnRuH6GG7yyauo58k4hZQreGiqMUQxvh3xd ZUUU6o9yFXQETkSP6eViwXf4bmNFounARpBs+1iB/4Q/Tp8on2I0E1OUZzwWSaSj218t HC5sPdcu5lyW6GUdgfj2l3USl6QiHkQcEMjNrHf/pQcRWnftq8L+NrlISWLSA5NyWsrm fAZuxL1Vxvd72m82n06qHW9lVPHmCmYAFZP30CTX6XisG8NKoiHzJX7IQU2uBFNMcC8T mVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dBN0mOQb7kVuILysF+ico+GsGc+Un+rEP0RRGf2F7fA=; b=JpHafpqQiBUk1EJd14ZY8nPYHxZ7f72uzbaBbjsc6W3Zhg0v70X7hHzQPGciAQXarN O92iwnChGHG/HAw5RE8pHeD1NpSkpmWi2uQCEVYw4YGvqDagSYCku+9S6qXldkXX/QaD 1KezL2xCx6EdfPa2Nwpojr7c8ClyM9nZCJiS2kBZw/jckpzA2u2WRZYybkccV4qCi8Fd F7ZFPYD2QBTI2arhvbJV8U3Dsn4K7hfOZWNKpDlee4MYi7djTLaNg8HtBZ6cEWC8TSJl Mpi6hcwbWV0r79vA6zcNbYHm4eFo13OZAK4lr+VPKuDc1qkgSv1PFiSEqfz9HLWFE0yt driw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eEeKL2c0; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pj15si9667100ejb.284.2019.09.10.08.16.23; Tue, 10 Sep 2019 08:16:49 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eEeKL2c0; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404907AbfIJPMm (ORCPT + 99 others); Tue, 10 Sep 2019 11:12:42 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:34218 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730177AbfIJPMl (ORCPT ); Tue, 10 Sep 2019 11:12:41 -0400 Received: by mail-yb1-f195.google.com with SMTP id u68so6255786ybg.1; Tue, 10 Sep 2019 08:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dBN0mOQb7kVuILysF+ico+GsGc+Un+rEP0RRGf2F7fA=; b=eEeKL2c0kgpkANsPqQ+OIL4UrNqXsOrPBNDv5Xhb76Uh8VRM8yrYt8RSubFZZq9FnY XAjaFqFhfc4Tn/mPWNpvnB7AebGsGxLQg7jlJuPXz1dm+vuSlzdXZ986Rm042VT9M/7y tzNjkF4qB8bJ3YvoaRJVX5BZ+nNbuOpyDAZWGu0PJxn75Uhgkz5VwiS3LgIVAaAFHnbI MOI1IaSDmoMObywmoGlSUXpQfRG9DBjQh27guB1HgKqz5MinaEwK2lhx8MyLDs+Wc3z8 +vg9neqlu5GqBlnCvjB9SjhhCVO/0mYBcHFweHtFnGdcRf2uUG8LqYqHbW51FHjzwhPX N2tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dBN0mOQb7kVuILysF+ico+GsGc+Un+rEP0RRGf2F7fA=; b=j5MiRcjcFD9ZGGeHrfJpr0EJ4mbju26VxoQ4vMYIFWFEB+FYND5/GsEeB6gJQM7HIb e12LEnjbb+Q7d5YoDOpI0o3z2bOBqZXcLHXq02DAkzH73CLO5w03L9/zOmW420qJsVeg xfwAvHX3WJEm85WnYmPaYvT3SS2/bAVG11RSCWfiQQFg1fWNu17IT9ddSpuzFgwA0DHQ pclyORe8rNVzsv93OBktEphztCLc8MjgKKVLYGcAAXewoSVHjldIBIZRwChYMgcMYof7 DBJl3cldXMTPfXMPwPg/pQnFqd6xCjkDI2n3wSSvMQ+qE+CnLhKQNeMZyy1nV9SWAfrZ LJBg== X-Gm-Message-State: APjAAAXTz+sAPMLHtK0LVm+nvk95/Q4mlJE0GU2YTtK7UFKwT9BHDtTD G+jPDngu75/5++8PoSWIsPQoCDeFbkwgEwNLy7Y= X-Received: by 2002:a25:d751:: with SMTP id o78mr21368658ybg.101.1568128360022; Tue, 10 Sep 2019 08:12:40 -0700 (PDT) MIME-Version: 1.0 References: <20190909090906.28700-1-kkamagui@gmail.com> <20190909090906.28700-2-kkamagui@gmail.com> <20190910123452.GC7484@linux.intel.com> In-Reply-To: <20190910123452.GC7484@linux.intel.com> From: Seunghun Han Date: Wed, 11 Sep 2019 00:12:25 +0900 Message-ID: Subject: Re: [PATCH v2 1/2] tpm: tpm_crb: enhance command and response buffer size calculation code To: Jarkko Sakkinen Cc: Peter Huewe , Matthew Garrett , "open list:TPM DEVICE DRIVER" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" 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. Thank you for your review. I already knew Vanya's patch, https://lkml.org/lkml/2019/8/11/151, and this patch didn't work for me. I also couldn't agree on some points like memory allocating inside the ACPI walker and changing many parts of TPM driver. I would like to support AMD's fTPM with the smallest changes since this is a workaround as you know. I didn't understand clearly what your point is. Do you want me to change my patches structurally like Vanya's patch and make patch v3? or want me to give some advice to Vanya? > > /Jarkko