From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18A56CA9EC2 for ; Mon, 28 Oct 2019 20:40:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E45F8218AC for ; Mon, 28 Oct 2019 20:40:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730370AbfJ1UkM (ORCPT ); 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-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@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