Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp12016288imu; Tue, 1 Jan 2019 12:04:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/UWj7cxgMG4tiiEdO5ojxIzzDESve6+UdiMbXFNbQ2gMKRVqaEn/0kzPcwnAqUXQ+7Qc4tw X-Received: by 2002:a62:6799:: with SMTP id t25mr42148798pfj.139.1546373049484; Tue, 01 Jan 2019 12:04:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si50505091pfi.261.2019.01.01.12.03.39; Tue, 01 Jan 2019 12:04:09 -0800 (PST) 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; arc=fail (body hash mismatch); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728971AbfAAQsH convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 Jan 2019 11:48:07 -0500 Received: from sender-of-o53.zoho.com ([135.84.80.218]:21775 "EHLO sender-of-o53.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728838AbfAAQsH (ORCPT ); Tue, 1 Jan 2019 11:48:07 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1546361267; cv=none; d=zoho.com; s=zohoarc; b=RErHK0Ha/nF6vT4wl7AHcIf3q8r4TeYwgKc4kM9I1FTPlcSC+UYV9dI4VdcA3N++jLr3KDgj1k1F6n2pL5172jeAizsvG9h+nI+9beVMdmnAAxgflB085BHwt6eqQoERmGD9KHReerCfr9ZAosY4EbcvJzsmYargMdF/whCU/dk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1546361267; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=UuX9reaX5WI8yKfjBOOKqmdJjhx+JD0KabMxNjbQv8I=; b=bIjS18VUgPSTQ37WLD5cvODIxQ/KTfC7StIRZzuG76ybxqq5DFCOUX+brOlEPDSDBwwajuyGuwXSTVaFuXu0TOWOlup9i2p6FbFE6G5e2c6MM9PVqr9C6BTnrpz8deMi8KHneyBUGeCGDIZ20txVp/4wfFHq1QQPVUU8Yq8Gi/o= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=mniewoehner.de; spf=pass smtp.mailfrom=linux@mniewoehner.de; dmarc=pass header.from= header.from= Received: from z3r0 (31.187.91.78 [31.187.91.78]) by mx.zohomail.com with SMTPS id 1546361265826649.2616507766807; Tue, 1 Jan 2019 08:47:45 -0800 (PST) Message-ID: Subject: Re: tpm_tis TPM2.0 not detected on cold boot From: Michael =?ISO-8859-1?Q?Niew=F6hner?= To: Mimi Zohar , Jarkko Sakkinen , James Bottomley , peterhuewe@gmx.de, jgg@ziepe.ca, arnd@arndb.de, linux-integrity@vger.kernel.org, linux-kernel , Nayna Jain , Ken Goldman In-Reply-To: <1546360701.4069.168.camel@linux.ibm.com> References: <1f281756bb1f041e55be8dd090670a1a7b1d1c94.camel@mniewoehner.de> <1545519232.3940.115.camel@linux.ibm.com> <1546140837.4069.81.camel@linux.ibm.com> <912668ea1d74f526f78f03f562fdaf17fc06f62c.camel@mniewoehner.de> <1546291059.4069.158.camel@linux.ibm.com> <0902784697eea3fc522e21a89cdecb745f12c83c.camel@mniewoehner.de> <1546360701.4069.168.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 01 Jan 2019 17:47:41 +0100 Mime-Version: 1.0 User-Agent: Evolution 3.30.3 Content-Transfer-Encoding: 8BIT X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-01-01 at 11:38 -0500, Mimi Zohar wrote: > On Tue, 2019-01-01 at 17:15 +0100, Michael Niewöhner wrote: > > On Mon, 2018-12-31 at 16:17 -0500, Mimi Zohar wrote: > > > On Sun, 2018-12-30 at 14:22 +0100, Michael Niewöhner wrote: > > > > > > > > difference is that on a cold boot, the TPM takes longer to initialize. > > > > > > > > Well, as I said. Waiting for 10, 20 or even 60 seconds in the boot > > > > manager > > > > does > > > > not solve the problem. So the problem is NOT that the TPM takes longer > > > > to > > > > initialize. Even adding a delay of 20 seconds before TPM init does not > > > > solve > > > > that while that should be more than enough time. > > > > > > The purpose of commenting out the TPM2 selftest was to minimize the > > > TPM initialization delay, so that the TPM is ready before IMA. After > > > James' patch that wasn't needed anymore. > > > > > > Looking back at this thread, I see you're using systemd-boot, not > > > grub2. When you commented out the systemd-boot timeout, IMA found the > > > TPM. The question is why isn't the TPM ready with the timeout before > > > IMA (like above)? Has systemd-boot done the selftest? > > > > I am not sure wether systemd-boot touches TPM at all but I get the same > > behaviour with syslinux-efi. > > From looking at the source code, it depends on whether systemd was > compiled with ENABLE_TPM enabled(eg. src/boot/efi/boot.c, > src/boot/efi/measure.c, src/boot/efi/stub.c). Debian build it with TPM enabled. I just checked syslinux-efi which does not do anything TPM-related. > > Mimi >