Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp323650imm; Fri, 5 Oct 2018 04:32:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61zr/vquN0t8R2EFFHMq9DarDA53VbBHpjkR1glhwMYQgjfSirsMMU9xfzxic7dddY3ZZ/a X-Received: by 2002:a62:e511:: with SMTP id n17-v6mr11441795pff.210.1538739161775; Fri, 05 Oct 2018 04:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538739161; cv=none; d=google.com; s=arc-20160816; b=caP/oS4m9f7qz2qcPgUkMWBAuo20Oz0Sq+dezIhg3ieeZC8055u7eT0PgbxzPQKmTF CvmjRGE6wqU36I8A46ryPcMuU+DWpPhZ1p26jvsVeBhQ2NSzVLHz93GlMW4upwFgGYn5 Lux/KTpVSDrCbTVC48F5Abrxhh0rSF5LNygxT1dmpMh3NoLXunVSmKN+ExRSakVszzjS HDkfprRhWKIonZNj7p8NjsqvzuK4lSRON/njRfLXEnkyUn2eULRLhEGVIfRaWB9iVCHu ICDiEAtvmhLYWYjf/7UYM0RgJp8xOy3vRdU1Za7V3Sqa2TWFe+eQ7LoQQbyH6TAybfT4 NAqw== 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=xhpKPRJ4xoOB7jmhUD9W8ohsJ/cGFSOpIj3d4uxFWo0=; b=KZ92r0JOtt/lUPkRjJU8bNyO1W1w5HtPhDNyVaN3cRzf5sxuuEAAaWiFOwOepbm5RZ T4EvKRcVGGZO5GUEp87McKoqQ9EIRzuS6pDYulyN0wgeMc2wkrJEOb0QpJRZQtn1/HMi ucp0jLKw27x1vXGBpuZ165p0jIblY1HEC5cBeqJZnOQyzv8xPRntzFLpGX1Lr1HzibQ/ d1UhEKxfk2toFwt9i1BQMjlX5zs0nAj/En1iWRUF6s+vLja6g+nyqZ+cYmKRKQlexS3T oR0bBv10XHSW4/1uZ4Ik40sFjrwUx4Yzx54cb1fMJLL7K7AG7/4+k1eWp0x3qL8Ok2M7 D8qg== 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 f6-v6si8731745pgg.182.2018.10.05.04.32.25; Fri, 05 Oct 2018 04:32:41 -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 S1728216AbeJESai (ORCPT + 99 others); Fri, 5 Oct 2018 14:30:38 -0400 Received: from mga06.intel.com ([134.134.136.31]:64572 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727581AbeJESah (ORCPT ); Fri, 5 Oct 2018 14:30:37 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 04:32:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,344,1534834800"; d="scan'208";a="238743793" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.74]) by orsmga004.jf.intel.com with ESMTP; 05 Oct 2018 04:31:48 -0700 Date: Fri, 5 Oct 2018 14:31:47 +0300 From: Jarkko Sakkinen To: "Winkler, Tomas" Cc: Jason Gunthorpe , Nayna Jain , "Usyskin, Alexander" , "Struk, Tadeusz" , "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "roberto.sassu@huawei.com" Subject: Re: [PATCH v5 12/21] tpm: move pcr extend code to tpm2-cmd.c Message-ID: <20181005113147.GA25985@linux.intel.com> References: <20180928223035.14471-1-tomas.winkler@intel.com> <20180928223035.14471-13-tomas.winkler@intel.com> <20181002005208.GH23753@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9D9DFAA5@hasmsx109.ger.corp.intel.com> <20181003120141.GA7969@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9D9E5343@hasmsx109.ger.corp.intel.com> <20181004113502.GA12498@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9D9E6D00@hasmsx109.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9D9E6D00@hasmsx109.ger.corp.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 04, 2018 at 11:45:30AM +0000, Winkler, Tomas wrote: > There is no API change, in that sense. > The exported API is in tpm-interface.c int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash) > that is used is outside of the tpm reminds the same, only the open coded implementation of tpm2_pcr_extned has moved to > tpm2-cmd.c, This code is not called out of tpm module. > Please review the code again. I did now revisit this and you are right that my choice of word was not exactly correct. I apologize for that. The patch introduces API that we would take away and that does make much sense. The best way to sort things out is to just fix the warnings and leave the TPM 2.0 part open coded inside tpm_pcr_extend(). The rationale for this is to avoid unnecessary mainline changes when ever possible (which is bad for backporting for stable kernels). > Thanks > Tomas /Jarkko