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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 74E4EC432BE for ; Mon, 30 Aug 2021 06:11:35 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C220B60200 for ; Mon, 30 Aug 2021 06:11:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C220B60200 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CCBA8334C; Mon, 30 Aug 2021 08:11:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="n6W9Qipg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4CCAB83354; Mon, 30 Aug 2021 08:11:30 +0200 (CEST) Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 815FB8334C for ; Mon, 30 Aug 2021 08:11:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-yb1-xb35.google.com with SMTP id v19so12445273ybv.9 for ; Sun, 29 Aug 2021 23:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FOc3e74DmYdWVHOY/eujUzcyIcImhGmm1JmHLCjyXlo=; b=n6W9QipgVZxZbaHrNNMzlflCRWvWxb5ioiJwTXvtjdIES22UX98OG7CHTbBD2oIbXh lk1uyhoLM5vMcZq5qrdCdFq5+6RJhLIKKzSiV3XauITTg7NXUxBiXnNFtBWmnYfueDnx eCXehSJ9N6oMRBKZA0ejQigejz3Ba0q87Ol+jAIESPCkYP5E1xsJYg/C8/pDJ9efjraQ J88wqMTyKa+n7wz6FC4UTJ69KFn9RMAyr/fsy14c7t7dOUwdgiPNm8Jjnh4rujTZTNvK j7MD9HPvEjs+wcpkcviy5HFPF6pvEC84X+v0iw6dDBZlchXM0+Enfgy9ZwaLvGXPWALq 0oWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FOc3e74DmYdWVHOY/eujUzcyIcImhGmm1JmHLCjyXlo=; b=jV6gQOGZi5wvNi9M6Yes8AbtH8kzSO3ELjqWkdzTU6Dcf4Gf80QjPCBshW7Xa3podo SqZJz8Ve9RclkXgNXnnFB3rm4RuDzxzM2ioMwysGkBimCSs2Ss4t9GsRmcVrXzkGty6F IxInobpg0oxZQ/M0qH8QaqwhN3O2H61BosKNC9Cui1//YJSvhz9UkQCYayKT8oC5WCgx CmSavfrqsWK6fHlZwbgspwtBnQU2oWomvh7ZAto+PmAI1KS1taO2flRtuDZJs2bAX95N Yszs0fQMRRQsHqk4h2z0huQmI4JsSGEz5tWLOUQzqj3lV0Xx9WLMbZqxD7zffOJEGvp7 OcaA== X-Gm-Message-State: AOAM533Ubhg4C91HwP/8L3JPMXowqNw6GfpdfnrtNGtZUiXVEa61mLjV qVuUCbYW2eSuIXbFVJF20ftdyDyjVm9vC9cjtcXJfg== X-Google-Smtp-Source: ABdhPJxGs8em4INTetjQBR39YJqV+e+eJEi7lKiECybfYCHX83rwMgYwgu+0BMsIkop0nHM1Gk0juSlw2EtSRWVk/9M= X-Received: by 2002:a25:d8c:: with SMTP id 134mr22489433ybn.408.1630303884209; Sun, 29 Aug 2021 23:11:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ilias Apalodimas Date: Mon, 30 Aug 2021 09:10:48 +0300 Message-ID: Subject: Re: sandbox TPM To: Peter Robinson Cc: Simon Glass , Heinrich Schuchardt , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Sun, 29 Aug 2021 at 13:53, Peter Robinson wrote: > > On Sat, Aug 28, 2021 at 10:19 PM Simon Glass wrote: > > > > Hi Heinrich, > > > > On Sat, 28 Aug 2021 at 06:18, Heinrich Schuchardt wrote: > > > > > > The current TPM emulation in drivers/tpm/tpm(2)_tis_sandbox.c is not > > > spec compliant. > > > > Do you mean it is incomplete or that it has bugs? If it is incomplete, > > what is needed by U-Boot? > > > > > > > > A TPM emulation as UNIX socket exists with > > > https://github.com/stefanberger/swtpm.git. QEMU already uses this emulator. > > > > > > Couldn't the sandbox do the same? I think this is the fastest way to get > > > a compliant sandbox TPM. > > > > Well we could if we need it. Are you sure it is a good idea? There is > > a lot of code there. Are you thinking it would be copied into the > > U-Boot tree and kept in sync with a script, perhaps? Presumably the > > project would accept changes we need? > > qemu doesn't copy it in, why can't it just run independently as part > of the CI process? The rust TPM2 bindings do that here: > https://github.com/parallaxsecond/rust-tss-esapi/blob/main/tss-esapi/tests/all-fedora.sh#L13 Keep in mind this is exposed as an MMIIO device. I did send a driver for it a while back [1]. In case we decide to use this, we can probably re-use that [1] https://lore.kernel.org/u-boot/20210707162604.84196-1-ilias.apalodimas@linaro.org/ Regards /Ilias