Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4000702ybg; Fri, 25 Oct 2019 11:55:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYbE/KCY0s+CPLo8ro85nGfk+uRZcWJ0njM9tTlNhsBDR0ZH+6r3AiZnk4zhjGKLOtAss7 X-Received: by 2002:aa7:d38e:: with SMTP id x14mr3590922edq.102.1572029733751; Fri, 25 Oct 2019 11:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572029733; cv=none; d=google.com; s=arc-20160816; b=RNAmqnmGr1mDEkFhC7MwY0iUUupFTaHQlE1ialdx721u8qdxkf2bxTnyzrM05qoMgA IIkTMy/W5ZhDVkJigtLWuhate4g3BvC0MEwou4Csa69VY7qyKAbu4EcWd56+5O+bEkha OKUp5GMtA+VThVJAgxqmGa7jugX+3kfDh4Abq6tvlHWxgoNCnEcMys2MCOpj+l/8thvC Wt/4H8TIy8qc/PFNmJZL7mtiIimiHSx+lZRogbmi7gi6RIs+FfauDHvznUL+NFJG23/r a4F3iX45TYG7kFbx8fQ2zk5rPphPljaX2HBWCdG6SK26r2iwVsCrZmC+aDX/vCt+GsMm iJVw== 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-disposition:mime-version:references:message-id:subject:to :from:date; bh=fBpGgpGVU2AuE1d/3MU2Ds94T6XeQWPzHsC4qZbut6c=; b=RyzFoBTvFHOgpIUP0DFQ1paFZBZdLxxUfVKI6SM5FIkY1rMYTjwYSxc/VIP5XS5VdP RNPaDk4qAxwHP4BWfu+d7oEtJrgu0H8HO048mt8grN9b1wHZtQV3tLpUDoC6JgXWpzMC vQKW5mQdY4ozLEYDTkqxJngq0ruV6P9tzf6c2H/c7i14Jh5t2f8pTjSwL9hN2SBBO6Gh 9HYxgHBHds+lledvmeOT/hTnl/YJIdx4x0GPAlcDMdbxnJQak2sMkp9pLYg83yStZPyI cQtK7eLaD5AV4eywrcq9Q9AQxupRhN1VmkljG9tsV7NXvrTb4K8EtJl6k7iQBmnki9vT ekdw== 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 v20si1768829ejq.300.2019.10.25.11.55.10; Fri, 25 Oct 2019 11:55:33 -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 S2504373AbfJXTCl (ORCPT + 99 others); Thu, 24 Oct 2019 15:02:41 -0400 Received: from mga18.intel.com ([134.134.136.126]:7222 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504337AbfJXTCk (ORCPT ); Thu, 24 Oct 2019 15:02:40 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 12:02:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,225,1569308400"; d="scan'208";a="399868603" Received: from nesterov-mobl1.ccr.corp.intel.com (HELO localhost) ([10.252.8.153]) by fmsmga006.fm.intel.com with ESMTP; 24 Oct 2019 12:02:35 -0700 Date: Thu, 24 Oct 2019 22:02:34 +0300 From: Jarkko Sakkinen To: ivan.lazeev@gmail.com, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8] tpm_crb: fix fTPM on AMD Zen+ CPUs Message-ID: <20191024190217.GA7002@linux.intel.com> References: <20191016182814.18350-1-ivan.lazeev@gmail.com> <20191021155735.GA7387@linux.intel.com> <20191023115151.GF21973@linux.intel.com> <20191023232035.ir7hmed4m3emovyx@cantor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023232035.ir7hmed4m3emovyx@cantor> 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 Wed, Oct 23, 2019 at 04:20:35PM -0700, Jerry Snitselaar wrote: > On Wed Oct 23 19, Jarkko Sakkinen wrote: > > On Mon, Oct 21, 2019 at 06:57:35PM +0300, Jarkko Sakkinen wrote: > > > Almost tested this today. Unfortunately the USB stick at hand was > > > broken. I'll retry tomorrow or Wed depending on which day I visit at > > > the office and which day I WFH. > > > > > > At least the AMI BIOS had all the TPM stuff in it. The hardware I'll be > > > using is Udoo Bolt V8 (thanks Jerry for pointing me out this device) > > > with AMD Ryzen Embedded V1605B [1] > > > > > > Thanks for the patience with your patch. > > > > > > [1] https://en.wikichip.org/wiki/amd/ryzen_embedded/v1605b > > > > Jerry, are you confident to give this tested-by? > > > > I'm still in process of finding what I should put to .config in order > > to get USB keyboard working with UDOO BOLT. > > > > /Jarkko > > I ran it through the tpm2 kselftests and it passed: > > TAP version 13 > 1..2 > # selftests: tpm2: test_smoke.sh > # test_read_partial_overwrite (tpm2_tests.SmokeTest) ... ok > # test_read_partial_resp (tpm2_tests.SmokeTest) ... ok > # test_seal_with_auth (tpm2_tests.SmokeTest) ... ok > # test_seal_with_policy (tpm2_tests.SmokeTest) ... ok > # test_seal_with_too_long_auth (tpm2_tests.SmokeTest) ... ok > # test_send_two_cmds (tpm2_tests.SmokeTest) ... ok > # test_too_short_cmd (tpm2_tests.SmokeTest) ... ok > # test_unseal_with_wrong_auth (tpm2_tests.SmokeTest) ... ok > # test_unseal_with_wrong_policy (tpm2_tests.SmokeTest) ... ok > # > # ---------------------------------------------------------------------- > # Ran 9 tests in 12.305s > # > # OK > ok 1 selftests: tpm2: test_smoke.sh > # selftests: tpm2: test_space.sh > # test_flush_context (tpm2_tests.SpaceTest) ... ok > # test_get_handles (tpm2_tests.SpaceTest) ... ok > # test_invalid_cc (tpm2_tests.SpaceTest) ... ok > # test_make_two_spaces (tpm2_tests.SpaceTest) ... ok > # > # ---------------------------------------------------------------------- > # Ran 4 tests in 11.355s > # > # OK > ok 2 selftests: tpm2: test_space.sh > > > I also did some other testing of tpm2-tools commands, creating a > trusted key and encrypted key, and running rngtest against /dev/random > with the current hwrng being tpm-rng-0. > > I ran the selftests on an intel nuc as well: > > TAP version 13 > 1..2 > # selftests: tpm2: test_smoke.sh > # test_read_partial_overwrite (tpm2_tests.SmokeTest) ... ok > # test_read_partial_resp (tpm2_tests.SmokeTest) ... ok > # test_seal_with_auth (tpm2_tests.SmokeTest) ... ok > # test_seal_with_policy (tpm2_tests.SmokeTest) ... ok > # test_seal_with_too_long_auth (tpm2_tests.SmokeTest) ... ok > # test_send_two_cmds (tpm2_tests.SmokeTest) ... ok > # test_too_short_cmd (tpm2_tests.SmokeTest) ... ok > # test_unseal_with_wrong_auth (tpm2_tests.SmokeTest) ... ok > # test_unseal_with_wrong_policy (tpm2_tests.SmokeTest) ... ok > # # ---------------------------------------------------------------------- > # Ran 9 tests in 29.620s > # # OK > ok 1 selftests: tpm2: test_smoke.sh > # selftests: tpm2: test_space.sh > # test_flush_context (tpm2_tests.SpaceTest) ... ok > # test_get_handles (tpm2_tests.SpaceTest) ... ok > # test_invalid_cc (tpm2_tests.SpaceTest) ... ok > # test_make_two_spaces (tpm2_tests.SpaceTest) ... ok > # # ---------------------------------------------------------------------- > # Ran 4 tests in 26.337s > # # OK > ok 2 selftests: tpm2: test_space.sh > > > So, > > Tested-by: Jerry Snitselaar > > > > One thing I've noticed on the bolt and the nuc: > > [ 0.808935] tpm_tis MSFT0101:00: IRQ index 0 not found > > I'm guessing this is Stefan's patches causing this? > > 1ea32c83c699 | 2019-09-02 | tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts (Stefan Berger) > 5b359c7c4372 | 2019-09-02 | tpm_tis_core: Turn on the TPM before probing IRQ's (Stefan Berger) > > I've never noticed tpm_tis messages before on a tpm_crb system, and doublechecked that I don't see it with 5.3. I'd guess it is related to: https://patchwork.kernel.org/patch/11200049/ Thank you for the tested-by. I pushed this now. I'll try to get also my tested-by before sending the PR (still fighting to find correct kernel config to enable USB keyboard with UDOO BOLT). /Jarkko