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=-7.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT 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 C5F1EC31E44 for ; Fri, 14 Jun 2019 10:34:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C4E12133D for ; Fri, 14 Jun 2019 10:34:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CFkz0AWB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727093AbfFNKei (ORCPT ); Fri, 14 Jun 2019 06:34:38 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55804 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfFNKeh (ORCPT ); Fri, 14 Jun 2019 06:34:37 -0400 Received: by mail-wm1-f66.google.com with SMTP id a15so1791112wmj.5 for ; Fri, 14 Jun 2019 03:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VQlYOuWw/XgKJ5lYOlgzDNhtem0wEWO83AzsJk5siJw=; b=CFkz0AWBLH3qM/wTX9/0rbnEGIdGMhwqDq25JmOGJSDvCx9ui0dw9bqgpr1ksw+LT6 VMXk2sllUNdudRlnQH2Z9jYfoaJjzBK0BdkpGhugaQ59wtMT7Fi1LQBmUAcNx7u/Q6pU woUjMPVk5GtD8+dGjT/59hrYjznvzD+kfru+iCm4Tz+MtFEks/RA/Kl9F9z+YnEp4Rj6 sL4tqPfeAmH+cBDQDwBd7Dr9J45Vc23gasoIa+2gUZSSujFqmnL1Cd4a2nk5nisrD3o2 zIEygEfF25IlZJQyz3E3gS73g0A/n8nN0PtL72QnwI6a6tCnEqMvkchTeYiJ1eSFbbrZ iG7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VQlYOuWw/XgKJ5lYOlgzDNhtem0wEWO83AzsJk5siJw=; b=YMvaAfKbxiFLjQL/iF+2bqtdaYR270eJWKiI0YIE2oB4tsirqb7I9ag2eW5cjRY9hB 3bJMg1UcF1+ukNKo17BgC+AUiI+lq7Q+6mpRGZ38PPEqgPEzrvYpPGXPsfwXIIB6RSRp v8XILx0Jx1myvD8EZz1Tnb8Lm1qXFktwc5tsqCFvVMOwbzXXyB0BANxmHbC/cYxMf848 QH/X/IbmQT4IT9ca4G0VvxwkByuxszyn5/XKZeb6eOJU/UUbCYejU7TW2G4RB3kThmIy UXoF8TpMdbLEcrJnVbXyOQIU8kqCAVKmmUh8FdJhQHuxW8RYwRMGTQHj4Amkzyv1X/nk DVvA== X-Gm-Message-State: APjAAAUH+PSkWH7eko1zBjJPEGZe9b98xJ4EibbidkGEQShs8cK6P069 jcHERZAbkqVeatSA1iYUIl6yyw== X-Google-Smtp-Source: APXvYqzMy7f04xPUuO0lEJs4Zkj7eAmy4TPUQhawhEeebqMCl/nBD1FiRvyH776EUxFte8zki3W9TQ== X-Received: by 2002:a7b:c933:: with SMTP id h19mr7726918wml.52.1560508474645; Fri, 14 Jun 2019 03:34:34 -0700 (PDT) Received: from apalos (athedsl-4461147.home.otenet.gr. [94.71.2.75]) by smtp.gmail.com with ESMTPSA id s10sm3938737wrw.45.2019.06.14.03.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 03:34:34 -0700 (PDT) Date: Fri, 14 Jun 2019 13:34:30 +0300 From: Ilias Apalodimas To: Sasha Levin Cc: Sumit Garg , peterhuewe@gmx.de, Jarkko Sakkinen , jgg@ziepe.ca, corbet@lwn.net, Linux Kernel Mailing List , linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, Microsoft Linux Kernel List , Thirupathaiah Annapureddy , "Bryan Kelly (CSI)" , tee-dev@lists.linaro.org Subject: Re: [PATCH v4 1/2] fTPM: firmware TPM running in TEE Message-ID: <20190614103430.GA6108@apalos> References: <20190530152758.16628-1-sashal@kernel.org> <20190530152758.16628-2-sashal@kernel.org> <20190604200951.GB29739@sasha-vm> <20190613171141.GL1513@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613171141.GL1513@sasha-vm> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sasha, On Thu, Jun 13, 2019 at 01:11:41PM -0400, Sasha Levin wrote: > On Wed, Jun 05, 2019 at 04:39:36PM +0530, Sumit Garg wrote: > >On Wed, 5 Jun 2019 at 01:39, Sasha Levin wrote: > >> > >>On Tue, Jun 04, 2019 at 11:45:52AM +0530, Sumit Garg wrote: > >>>On Thu, 30 May 2019 at 20:58, Sasha Levin wrote: > >>>> + /* Open context with TEE driver */ > >>>> + pvt_data->ctx = tee_client_open_context(NULL, ftpm_tee_match, NULL, > >>>> + NULL); > >>>> + if (IS_ERR(pvt_data->ctx)) { > >>>> + dev_err(dev, "%s:tee_client_open_context failed\n", __func__); > >>> > >>>Is this well tested? I see this misleading error multiple times as > >>>follows although TEE driver works pretty well. > >> > >>Yes, this was all functionally tested. I did test as well with a DeveloperBox, i can confirm the driver is loading (but i have no fTPM support on the OP-TEE side for now) apalos@mule:~>sudo dmesg | grep optee [sudo] password for apalos: [ 5.035801] optee: probing for conduit method from DT. [ 5.041045] optee: revision 3.2 (53bf1c38) [ 5.041772] optee: initialized driver apalos@mule:~>sudo dmesg | grep tpm [ 5.000674] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_context failed [ 5.101655] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_session failed, err=ffff000c [ 5.109703] ftpm-tee: probe of tpm@0 failed with error -22 The error -22 is nice since the probe eventually failed (no fTPM support in secure world). Can we slightly change the 'ftpm_tee_probe:tee_client_open_context failed' and indicate this is not a real error since the probe gets deferred untill Secure world is alive? By the way there is *real* interest for this functionality. I expect to run it on a number of Arm boards once i get some free time. > >Can you share your build instructions and testing approach? > > Yes: it looks like you got all the kernel bits, but not the firmware. > There are instructions for it here: https://github.com/microsoft/ms-tpm-20-ref > > Once it's running, you can test it by running your favorite TPM usecases > through /dev/tpm0. > > -- > Thanks, > Sasha Thanks /Ilias