Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2351006imu; Thu, 10 Jan 2019 12:36:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN4bjmh0XbHy6ctLApEDulJ+2j52jgxhHG1FZWWwrc2xlzYtSjTZZSb98XgSOCBf4MVWn+1D X-Received: by 2002:a17:902:5a0b:: with SMTP id q11mr11907850pli.186.1547152573606; Thu, 10 Jan 2019 12:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547152573; cv=none; d=google.com; s=arc-20160816; b=KnUbR9eg6t65GlLT0A6CuLM+yFabzXHrSi58H5/gh9fwM3rp/8Cp1a1/zZ2stENbVp 0vxnYZVzu9hzlSNZC/srCvbmzu/hOSfhjQ2OtRu6ip62ac3ExrhE1A5NQ9R2mSuMJO/H f3wLFVGrybbzHwE1rBQZka8pZgK+krJm5bvuIenCgau2OPg+pIABvuCDB8npIYZGVvhP R9shj7Vbt6yKev2XFb4YRGjj40ybBdiZN1AowCemkJhHVcDzbp4Tn+WQz7IN0i9t7i3E NWFNJL7JTp0QKTrvKbHba4CgNBMufXptwd+xLo7xbAq01nsa/2KVTfvg2MO9/kip5vwO Bpyw== 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=9bLHS2zDyiEUhQo8CkpGrZkzijgCuJe8mV7KsJTCuAQ=; b=sMEx0V3Wikr9U+My3vwSz1OE8Ky8pDYjQfmZy0EinzobJuaiDdhlfM35SeJublJAgT Sd8bmY9ONS1LuMLsHedkbMFHOoLeWuWRcNxMg3HyfjdMHaK0JWybIL6VqA1VCmPE83Xn Or7P3pZphNZZSBIW83NtxptZwa9r3TT9XPghJ1anyQQvAr/dTIY8UTQgpRfI59F/G2LQ KFHjsxqJil3ldBeXil4uPDkc1sYuTBwJQBAgsLsMi+nM0esJacJsuaF+slmCHJh7wcnW srR2Ev665ABlZvqzVdDYT+VYCJw+HWN8wwTTKcnoWe4bjzkigjexG6Gnv3S5PXB+P4f3 agjA== 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 g184si3455919pfb.288.2019.01.10.12.35.58; Thu, 10 Jan 2019 12:36:13 -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; 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 S1729721AbfAJRTb (ORCPT + 99 others); Thu, 10 Jan 2019 12:19:31 -0500 Received: from mga07.intel.com ([134.134.136.100]:8012 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729509AbfAJRTb (ORCPT ); Thu, 10 Jan 2019 12:19:31 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 09:19:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,462,1539673200"; d="scan'208";a="115793775" Received: from vanderss-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.152]) by fmsmga008.fm.intel.com with ESMTP; 10 Jan 2019 09:19:24 -0800 Date: Thu, 10 Jan 2019 19:19:23 +0200 From: Jarkko Sakkinen To: Michael =?iso-8859-1?Q?Niew=F6hner?= 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 Subject: Re: tpm_tis TPM2.0 not detected on cold boot Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5aa2fc082b6b0657574918b025005ad569da6412.camel@mniewoehner.de> 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, 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