Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2208085imu; Thu, 10 Jan 2019 10:03:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN6nL4Mrt6CX+VsGcBU6oWGdTXVmr4nrmYiJo0NttgOth3w0310RnaT8tsZa0y+ATXwlWt2b X-Received: by 2002:a63:3c58:: with SMTP id i24mr10402572pgn.284.1547143389102; Thu, 10 Jan 2019 10:03:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si8883063plo.293.2019.01.10.10.02.54; Thu, 10 Jan 2019 10:03: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 S1730820AbfAJSA4 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 10 Jan 2019 13:00:56 -0500 Received: from sender-of-o53.zoho.com ([135.84.80.218]:21840 "EHLO sender-of-o53.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729480AbfAJSAz (ORCPT ); Thu, 10 Jan 2019 13:00:55 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1547143234; cv=none; d=zoho.com; s=zohoarc; b=Zr8qqRaZTYf+vaDNoyqcxCT+3sWnfarhI0eLTbYvNAObjutoFwGK2NmNCEL4Bu7okNm5wYUryvT+IxYmXMbxmtv3HGyBzhTvuSKAYkhZGlLniXqPJfTSgvA4bq9rZL5sw6N/C3+3Ku9K+gY+wd1rc3MMb1oc5g+E+wmfWlTxRVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1547143234; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=y7Ug1hh2YUjlfSyroPaXvQSS+T5lVCs5wbg4QTW3dmM=; b=dGc4zpunH6nYbkl7GLD4ILdPFc2eeq8nbZQ+0/gl7ph7n8xy6k3Sd4WOp2VJ/kAyhcOhsNKQAK4T5fdKwGHrS0P2PkRnyHW12QQGQnHr3qFZS89LbDeRrM0ZaI/tu0DOFIdHtNUko4G8HVqNPv4zmTXtmST3eDDrFdUYb1ZCNog= 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 1547143233258132.69536931174787; Thu, 10 Jan 2019 10:00:33 -0800 (PST) Message-ID: <3245408721bf1480f24af08db668fa7e3e7c848b.camel@mniewoehner.de> Subject: Re: tpm_tis TPM2.0 not detected on cold boot From: Michael =?ISO-8859-1?Q?Niew=F6hner?= To: Jarkko Sakkinen Cc: Mimi Zohar , 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: <20190110171923.GC6589@linux.intel.com> References: <1f281756bb1f041e55be8dd090670a1a7b1d1c94.camel@mniewoehner.de> <1545519232.3940.115.camel@linux.ibm.com> <20190103132737.GD10491@linux.intel.com> <6c1bf9815bfcb5d2bc0cfedfc49c7feda0173dc9.camel@mniewoehner.de> <20190103150434.GC17015@linux.intel.com> <5aa2fc082b6b0657574918b025005ad569da6412.camel@mniewoehner.de> <20190110171923.GC6589@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 10 Jan 2019 19:00:28 +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 Thu, 2019-01-10 at 19:19 +0200, Jarkko Sakkinen wrote: > On Thu, Jan 03, 2019 at 04:47:31PM +0100, Michael Niewöhner wrote: > > On Thu, 2019-01-03 at 17:04 +0200, Jarkko Sakkinen wrote: > > > On Thu, Jan 03, 2019 at 02:38:11PM +0100, Michael Niewöhner wrote: > > > > On Thu, 2019-01-03 at 15:27 +0200, Jarkko Sakkinen wrote: > > > > > On Sun, Dec 23, 2018 at 12:55:12PM +0100, Michael Niewöhner wrote: > > > > > > There is another issue but I don't know if both are related. Maybe > > > > > > that's > > > > > > just a > > > > > > timing issue... > > > > > > > > > > > > root@debian:~# dd if=/dev/hwrng bs=1 count=1 > > > > > > dd: error reading '/dev/hwrng': Operation not permitted > > > > > > 0+0 records in > > > > > > 0+0 records out > > > > > > 0 bytes copied, 0.755958 s, 0.0 kB/s > > > > > > root@debian:~# dd if=/dev/hwrng bs=1 count=1 | xxd; dd if=/dev/hwrng > > > > > > bs=1 > > > > > > count=1 | xxd > > > > > > dd: error reading '/dev/hwrng': Operation not permitted > > > > > > 0+0 records in > > > > > > 0+0 records out > > > > > > 0 bytes copied, 0.755697 s, 0.0 kB/s > > > > > > 1+0 records in > > > > > > 1+0 records out > > > > > > 00000000: 52 R > > > > > > 1 byte copied, 0.0106268 s, 0.1 kB/s > > > > > > > > > > > > > > > > > > Michael > > > > > > > > > > What does /sys/devices/virtual/misc/hw_random/rng_current show? > > > > > > > > > > Did run commands as a sanity check on my laptop and seem to work. > > > > > > > > > > /Jarkko > > > > > > > > rng_current says "tpm-rng-0", which should be correct > > > > > > Is /dev/tpm0 accessible and usable? > > > > > > /Jarkko > > > > No, it does not seem to work: > > > > root@debian:~# tpm_version > > Tspi_Context_Connect failed: 0x00003011 - layer=tsp, code=0011 (17), > > Communication failure > > root@debian:~# tcsd -f > > TCSD TDDL ioctl: (25) Inappropriate ioctl for device > > TCSD TDDL Falling back to Read/Write device support. > > TCSD TDDL ERROR: write to device /dev/tpm0 failed: Operation not permitted > > TCSD TCS ERROR: TCS GetCapability failed with result = 0x1087 > > root@debian:~# stat /dev/tpm0 > > File: /dev/tpm0 > > Size: 0 Blocks: 0 IO Block: 4096 character special > > file > > Device: 6h/6d Inode: 1114 Links: 1 Device type: a,e0 > > Access: (0600/crw-------) Uid: ( 104/ tss) Gid: ( 112/ tss) > > Access: 2019-01-03 16:39:20.627635333 +0100 > > Modify: 2019-01-03 16:39:20.627635333 +0100 > > Change: 2019-01-03 16:39:20.627635333 +0100 > > Birth: - > > But those tools should not work because TrouSerS is for TPM 1.2. > > /Jarkko Right. I realized that too late... Have a look at my email from Fri, 04 Jan 2019 19:26:10 +0100 Michael