Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp191456ybp; Thu, 3 Oct 2019 12:06:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTd2DR6UEGhTci2Hf7HmZA4JzU5owxQsoGmLSU0D0UnoKXYrwyLQt0iX7UXfaETMUnvtyM X-Received: by 2002:a17:906:6994:: with SMTP id i20mr9116526ejr.239.1570129588242; Thu, 03 Oct 2019 12:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570129588; cv=none; d=google.com; s=arc-20160816; b=TzXJjiwnCRNuAVOSLOSBwzaB2OkbZ0bzfaMh1cSg0/Msi5BEMh+6eBR8F5Ol53j1yG 3YjascWKrg3mpp5FkL0J9j9i7sF0nCU9+99UHptgkqQo2X8nendedDu+5+QbyDZl5Dfy zOFDgJIKLqhbY8thWOjCqVAZ4S7V9VBJgr7GMPwlijdHgHkJxHcdwb/Bl+w1pK+3thJR kx1c2SEAk7WeZEdgTqJ77MUmdNiCyJDYuKGpDhn/ntXoKUvPDTWPc07yczPIbYzieiLm jhJEp84wp0Ld+PkQs/yo/Hg+S4w8WPOp5xnAErmMsaDvfpy1uu4MNHKSrMhGjMLX54nT Wk3w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Wu8P7PyalQ0XpWOsNnM/EF4kLH0C87+2JQ9c/88edMk=; b=zhWAwRu2guBnjiGRofRsse32ed7xkNbM36pFDvW8qOFyP+zkGWgJwR7kygdIk8bFNz g0Nu1K0ZfYEmE22ZRaM/CSEbuK0NnbBosjwRKTg211U3SX/5B0NdLN7+4mXHAHTmh3Ol oPKjOIGyrM9/pfi3Cfn6n7Ve37Qht9qqo3ZSyu9CHsnrPekBbeiFAZnl9FdiIjJO93Fs Je7p43VI6houWsd2X8TJ5gYDT1CFLZZVUnxe/Z31mYaONCVCQmtwiL6o+ggzae9xFl1m 8ZuOW7S+CAMA4eorJyiGdQSxgr7gJEZc6XCagv7n/fPfDZkH+D+Bbooreq5sqEADJGWu 8C5g== 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 g13si1700722ejf.133.2019.10.03.12.06.04; Thu, 03 Oct 2019 12:06:28 -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 S2388936AbfJCSdN (ORCPT + 99 others); Thu, 3 Oct 2019 14:33:13 -0400 Received: from mga17.intel.com ([192.55.52.151]:57758 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729993AbfJCSdM (ORCPT ); Thu, 3 Oct 2019 14:33:12 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 11:33:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,253,1566889200"; d="scan'208";a="221875838" Received: from okiselev-mobl1.ccr.corp.intel.com (HELO localhost) ([10.251.93.117]) by fmsmga002.fm.intel.com with ESMTP; 03 Oct 2019 11:33:08 -0700 Date: Thu, 3 Oct 2019 21:33:06 +0300 From: Jarkko Sakkinen To: Mimi Zohar Cc: linux-integrity@vger.kernel.org, Jerry Snitselaar , James Bottomley , Sumit Garg , Stefan Berger , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: Re: [PATCH] tpm: Detach page allocation from tpm_buf Message-ID: <20191003183306.GC20683@linux.intel.com> References: <20190925134842.19305-1-jarkko.sakkinen@linux.intel.com> <20190926124635.GA6040@linux.intel.com> <20190926131227.GA6582@linux.intel.com> <1570020024.4999.104.camel@linux.ibm.com> <20191003113211.GC8933@linux.intel.com> <20191003113313.GD8933@linux.intel.com> <1570116261.4421.199.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1570116261.4421.199.camel@linux.ibm.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 Thu, Oct 03, 2019 at 11:24:21AM -0400, Mimi Zohar wrote: > On Thu, 2019-10-03 at 14:33 +0300, Jarkko Sakkinen wrote: > > > > > Will this delay the TPM initialization, causing IMA to go into "TPM > > > > bypass mode"? > > > > > > Of course it will delay the init. > > > > > > As I've stated before the real fix for the bypass issue would be > > > to make TPM as part of the core but this has not received much > > > appeal. I think I've sent patch for this once. > > IMA initialization is way later than the TPM. ?IMA is on the > late_initcall(), while the TPM is on the subsys_initcall(). ?I'm not > sure moving the TPM to core would make a difference. ?There must be a > way of deferring IMA until after the TPM has been initialized. ?Any > suggestions would be much appreciated. > > (The TPM on the Pi still has a dependency on clock.)? Right. I seriously need to study IMA code in near future with time. > > It has been like that people reject a fix to a race condition and > > then I get complains on adding minor latency to the init because > > of the existing race. It is ridicilous, really. > > I agree, but adding any latency will cause a regression. OK, I get the picture here now. I have to some day look at the IMA code and see if I could draft something that would improve the situation. Thanks for explaining all this! /Jarkko