Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3588196ybg; Mon, 28 Oct 2019 15:27:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqytAGGSjhRLiaGP4U9guNnsKvubsP1njzB66yWtFusM4mfoRSfCgdOJuFzId9lqWvWaHukX X-Received: by 2002:a17:906:e82:: with SMTP id p2mr163905ejf.237.1572301656101; Mon, 28 Oct 2019 15:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572301656; cv=none; d=google.com; s=arc-20160816; b=mC+8qLropT0iAx+Dn5oBL7MGnHewrJ3PuTCCmuOUiNvnLOXrv83VS/ekGSxR70EOOM QrFdVGBIqxDFvKuYV7lauYFjZvdObKsYg+/F3VbSJUYZbO1zhQ1EjtL1ZDTMs7PdrJUq VGLPqIHG4MpoDwbk6+Mc4hn1M/9bjNeDoY2E6Xl/M8aefAH+v2E3sQ8wh+tZZly0IN6r Q4gIG0oH5vQ3iZB5fhigFm7Fm2hXGR3z0drAxOqU3yrDDi8ri++zm3MvTWxElBApQc7q emTqxHH+9ap6aJypRMr8s9kG+sKbAq1mXsR3f1UTI+OoOtjOeP6EBFd0v/UBhOoHHpy3 YZzA== 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:cc :to:from:date; bh=qVTidDXvSSKJBdHw0wJasLfKiDNhaVGxut+f3V2MN3Q=; b=zHaz9ciCOmE9RfopwEb6iGbwy3AiLsDeMQ15n8O/bZwFLRMDc3WKFXRqc/z7ypknBw L6OUEkBeX0s9XteMv23zuHZw2Si+TyQYDqRgRHyF2b4OSsIxUHPHhvs44ckE7mL2eoIU +gdw16Biage1GGg8K2oHv3RRgfk8qbojAn04wyj0uEuTCSQcji+3qzf2bSouTMYk/msI 3VHMgbm7313XiyoupZoNt83fIFa6hrlUlggjAK85zqyEYF+oKDCPErQ29wm3gHlpVMT4 GyQtT/naCZT/vivC/mgD/s6wO4gqZwSvC7ikxBkSyTa/VFpxx/Sh3ONP7BdINKXhcxon EVqw== 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 y26si2661611edb.360.2019.10.28.15.27.11; Mon, 28 Oct 2019 15:27:36 -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 S2387673AbfJ1UkM (ORCPT + 99 others); Mon, 28 Oct 2019 16:40:12 -0400 Received: from mga09.intel.com ([134.134.136.24]:21900 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbfJ1UkM (ORCPT ); Mon, 28 Oct 2019 16:40:12 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 13:40:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,241,1569308400"; d="scan'208";a="224752421" Received: from shrehore-mobl1.ti.intel.com (HELO localhost) ([10.251.82.5]) by fmsmga004.fm.intel.com with ESMTP; 28 Oct 2019 13:40:07 -0700 Date: Mon, 28 Oct 2019 22:40:05 +0200 From: Jarkko Sakkinen To: Mimi Zohar Cc: David Howells , Petr Vorel , shuah , James Bottomley , linux-integrity@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] selftest/trustedkeys: TPM 1.2 trusted keys test Message-ID: <20191028204005.GD8279@linux.intel.com> References: <1571944467-13097-1-git-send-email-zohar@linux.ibm.com> <20191028203014.GA8279@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028203014.GA8279@linux.intel.com> 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 Mon, Oct 28, 2019 at 10:30:14PM +0200, Jarkko Sakkinen wrote: > On Thu, Oct 24, 2019 at 03:14:27PM -0400, Mimi Zohar wrote: > > Create, save and load trusted keys test > > > > Signed-off-by: Mimi Zohar > > > > Change log v1: > > - Replace the directions for using Trousers to take ownership of the TPM > > with directions for using the IBM TSS. > > - Differentiate between different types of errors. Recent bug is causing > > "add_key: Timer expired". > > --- > > Is not really usable as a selftest because of 3rd party dependencies. For TPM 2.0 I did write a smoke test for TPM2 trusted keys: https://github.com/jsakkine-intel/tpm2-scripts What you need to do is to make a lightweight library for TPM 1.x e.g. tpm1.py, and use that to implement the test. For TPM 2.0 I would peek at the tpm2-pcr-policy and keyctl-smoke.sh on how to implement the without 3rd party deps. /Jarkko