Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1557588imu; Sat, 12 Jan 2019 02:50:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN6QnyiCEY5k4ldRnzneacFCeUisQtncJsmYZaTcWN2AKf89vGWWPGM26rIdA9y8oGKOjRJx X-Received: by 2002:a17:902:a5ca:: with SMTP id t10mr18129145plq.139.1547290253197; Sat, 12 Jan 2019 02:50:53 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si84466662pfd.236.2019.01.12.02.50.36; Sat, 12 Jan 2019 02:50:53 -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 S1725890AbfALKtc convert rfc822-to-8bit (ORCPT + 99 others); Sat, 12 Jan 2019 05:49:32 -0500 Received: from sender-of-o53.zoho.com ([135.84.80.218]:21706 "EHLO sender-of-o53.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfALKtb (ORCPT ); Sat, 12 Jan 2019 05:49:31 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1547290158; cv=none; d=zoho.com; s=zohoarc; b=g0YuCeHchVDkKQaLMJGZRyz73CXbupzAbeMJ5eH/oGYKJ3xcvpS2Su0Qt5nARhPlS5cmqqwmQv4TaM60ojkIsyPgwzWKE1wtL9jp2DbJaFj9FbLEKiBWCLWWrUyF3DU4oHXMYNMc+wxhj7Afct8E/8eCYdH3V4yRIvLWZG6Zpfc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1547290158; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Ypi4uk5Wpkv03icPSbrSy4pPeONPwvjXIsI+G03pgas=; b=NbhOlRq9iqj5aJUmIeZrcsc790NBseLQqbLKxy6L3BnL7/YNUFzAPkH1N4o2SBmPhf9GLqHytUBH7X3KWcx9/khZdNXMQgYXdnFBA+vNEu3qtlfZW9ILdCOYPRz/ox5JjaN0wX8BMqp6Id2nuDbgsSxuaPRoI82Jk3y9BQ9AyZI= 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 1547290155297989.0680485448781; Sat, 12 Jan 2019 02:49:15 -0800 (PST) Message-ID: <155f110265d7632261f11de794d973c12c1301a7.camel@mniewoehner.de> Subject: Re: [BUG] Nuvoton NCPT650 TPM 2.0 mode not working From: Michael =?ISO-8859-1?Q?Niew=F6hner?= To: Mimi Zohar Cc: jarkko.sakkinen@linux.intel.com, linux-integrity@vger.kernel.org, linux-kernel In-Reply-To: <1ee67fe6cd7cc556a28e97529febf52ab0247ab4.camel@mniewoehner.de> References: <776f384a81466642472beb4a34b10f26f1de88e9.camel@mniewoehner.de> <1541960689.3190.4.camel@HansenPartnership.com> <1547221227.19931.453.camel@linux.ibm.com> <1ee67fe6cd7cc556a28e97529febf52ab0247ab4.camel@mniewoehner.de> Content-Type: text/plain; charset="UTF-8" Date: Sat, 12 Jan 2019 11:49:12 +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 Hi again, On Sat, 2019-01-12 at 10:52 +0100, Michael Niewöhner wrote: > Hi Mimi, > > On Fri, 2019-01-11 at 10:40 -0500, Mimi Zohar wrote: > > Hi Michael, > > > > On Sun, 2018-11-11 at 19:50 +0100, Michael Niewöhner wrote: > > > > > Well, there are at least two implementations I know of: > > > For my Lenovo X260 I can choose between Infineon TPM 1.2 or Intel PTT TPM > > > 2.0 > > > This here is my ThinkStation P320 which can choose between PTT 1.2, PTT > > > 2.0, > > > Nuvoton 1.2 and 2.0. When switchting between 1.2 and 2.0 the Nuvoton gets > > > reflashed with the appropriate firmware. > > > > With IBM's LTC help, we finally found a Lenovo with the Nuvoton > > NCPT650. It's a System x3550 M5[1], not a ThinkStation P320, running > > Fedora (vmlinuz-4.16.14-300.fc28.x86_64). I replaced the 4.16 kernel > > with the latest stable 4.19.y kernel. Both the TPM and IMA seem to be > > working properly. Not sure if this helps... > > > > From dmesg: > > # dmesg | grep -i tpm > > [ 0.000000] Linux version 4.19.14 (mimi@x86tpm2Server.rtp.stglabs.i > > bm.com) (gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)) #6 SMP > > Thu Jan 10 22:32:54 EST 2019 > > [ 0.000000] efi: ACPI=0x7b786000 ACPI 2.0=0x7b786014 > > SMBIOS=0x793fe000 TPMEventLog=0x426fa018 > > [ 0.014413] ACPI: SSDT 0x000000007B784000 0003A7 (v02 INTEL > > Tpm2Tabl 00001000 INTL 20130328) > > [ 0.014416] ACPI: TPM2 0x000000007B783000 000034 (v03 INTEL EDK2 > > 00000002 INTL 01000013) > > [ 2.667052] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 2 > > > > # cat /sys/kernel/security/ima/ascii_runtime_measurements | head -2 > > 10 5425744ce804c8cae89a08d53b41ab20ff1b3ea6 ima-sig > > sha1:7996f7339c3ce64e63f1232ef1aa6033247af784 boot_aggregate > > > > I installed the ibmtpm2tss[2], built (eg. autoreconf -i; configure -- > > enable-hwtpm) and installed it. > > > > # export LD_LIBRARY_PATH=/usr/local/lib/ > > # cd /usr/local/bin > > # ./tsspcrread -ha 10 -halg sha256 -ns > > f73ff9109b06d4f7a7cbe7eac32b20d2ca662e55cb4c81e152beea261989ad4b > > > > Mimi > > > > [1] https://lenovopress.com/lp0599.pdf > > [2] https://git.code.sf.net/p/ibmtpm20tss/tss > > > > what UEFI version is installed on that machine? > Is the TPM connected via LPC or I2C? > > Best regards > Michael > > I had a short look to an extracted x3550 UEFI firmware (tbe132l-2.52). This seems to be a very different implementation, probably due to the fact that this is a server firmware but not a desktop/workstation firmware. I do not know how much UEFI has influence on the communication with the TPM but I assume we can not really compare x3550 with P320 :-( Best regards Michael