Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp572677ybi; Wed, 3 Jul 2019 01:13:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa5SecukSa/d7d8Cy3irXiSm17mXPDrFIXnwARVCk6lO5UEEUvMXkxUR5j89ArLHWAPOov X-Received: by 2002:a17:90a:2ec1:: with SMTP id h1mr11173259pjs.101.1562141604411; Wed, 03 Jul 2019 01:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562141604; cv=none; d=google.com; s=arc-20160816; b=wFwubn7HemN7XER+AZgl83Z9WN8vFWHoOLIgZGC8ST+vyRg5s4c6x0LRfMCphaE+hW ChlIoEEeEb7+WVSS6zbyGs3xAk3U46H+w0U+sK7oLWst35kbRHqCBBlpkVxcCxx8hZKb z4JJA+BaQS23RLFu/cgKG0tCFDczLIp4c6pFX9gTIbU9sMlrp0F3uM3Ex/B9yiH1BpwV YVDS5zZf8Ky99bmOi1EpJ4l7LIazk2QZIffqZXgtNSD11aDCjS+r1rDYaijv6pmHJ1JI 4go1zpLfMPjPRENYcLuLLndPSgiVPUl3gg637eSegWP9+cpeDEvVj8YjAcsNClLW2NBz VWYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VjBFB/I0hlVew0sJZr7FphhS/ICkUfwzYUwEfGp+X9c=; b=pUIHDoy9D+SMyDu/pe7ZvaR+ajPALngt5bygFljnOFDY/zRYZvJtiltyITc9Z6Egje bc7r7MzbAcoM+q/m0NV7xGoU2FzbAYx9ES2vCkDB6+9L3Pe44HaCc4Fwyg/dCkiiU4Lq Y3EuqMQ+2uADezFpoohfeMpVnF3Zy0+J7bpZ4Catsev3ZWJptmqEady4hcCdP76D7xwh 279oMKJ2fkPWzHsXZrit7pGkR0RIxwNFpYT7cCYlKYg11LFj7MWb4h5SC1gUQ9rsBG72 Z1ZlwRTscX0jjAzlCn9Ds0agKaks0DzvdQrUu2CyZMdqLPVaLYvI0yS5HtB5STYrKgHC 7NFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rs/P10EO"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb5si1660467plb.172.2019.07.03.01.13.09; Wed, 03 Jul 2019 01:13:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b="rs/P10EO"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727240AbfGCIMl (ORCPT + 99 others); Wed, 3 Jul 2019 04:12:41 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44810 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbfGCIMk (ORCPT ); Wed, 3 Jul 2019 04:12:40 -0400 Received: by mail-qk1-f196.google.com with SMTP id p144so1456832qke.11 for ; Wed, 03 Jul 2019 01:12:40 -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=VjBFB/I0hlVew0sJZr7FphhS/ICkUfwzYUwEfGp+X9c=; b=rs/P10EOeN8DyI/Wg/AZ1DlAhfVcgzzCalE9Vh9lVZ9iYbq7Jsh26+b068r1jTkYCu 9UM4aBR/8k/ZdDSMTmqUSSzooi/EJE6wcazITngYUVSrL+E7enwrQrSeCoMUKk1ixN+W K9ve+Y/ZUGvYAEM4zp4tm3cwzm6BqzE9dqolkYjEUuNR0cEYY5iU5KBU9LCNeY5BWzMZ hMF6PMR4U0+umNvC2E2/l6dDz92QxUN92vu6HnRT/AwAXCUmnCqs8lJnCxTrIhMdt4j0 BfcqgN8ddIaqNA27/dpccsu2frGQrqjCw2fA977jir5UmHgjgr3hksh7O+zUG+nh7bOb FB6A== 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=VjBFB/I0hlVew0sJZr7FphhS/ICkUfwzYUwEfGp+X9c=; b=PkkVOp9s831oz9HALlK5v0+AKIodaF/7gpSmXJSniTrlY2GUqseR9pOTxWRpSsqe3c 823gtn/0c/DRx80YCoBSgtSbAfKX0TG2kKIvzbcesL8rlqRnSRkO8ONJS1z+xFXwbmRw +F8tWQYyZcJeU/NmFzlLJGoOo8hcUBS0hi5vMJ94e+BeN4QaTy0txjknjqqxSaimI3j1 zQrOz8rIZAQLQVi9c2WGO5C4ksEIT5kkc5jB9BgDdJOtBmd49Xv5O+0+jaXY3oBtFQ5A Q+4T8Cg+eF2WWwuJYAd8v8GZvWY/bdimB7kotHOkiriFPr6XMoiH6NZthF3MXe8cmGEl kipg== X-Gm-Message-State: APjAAAUK/Jq7Oo8ZODGvFrL6YxVroCWusi2qGL2sAjGO3TFqHCuw9IoK 5vnXV7PlrqoQ7JyWtWeTMGOl89gZjWdqeonuqnfpwg== X-Received: by 2002:a67:fd91:: with SMTP id k17mr18291390vsq.121.1562141559483; Wed, 03 Jul 2019 01:12:39 -0700 (PDT) MIME-Version: 1.0 References: <20190625201341.15865-1-sashal@kernel.org> <20190625201341.15865-2-sashal@kernel.org> <673dd30d03e8ed9825bb46ef21b2efef015f6f2a.camel@linux.intel.com> <20190626235653.GL7898@sasha-vm> <20190627133004.GA3757@apalos> <0893dc429d4c3f3b52d423f9e61c08a5012a7519.camel@linux.intel.com> <20190702142109.GA32069@apalos> <20190703065813.GA12724@apalos> In-Reply-To: <20190703065813.GA12724@apalos> From: Ilias Apalodimas Date: Wed, 3 Jul 2019 11:12:28 +0300 Message-ID: Subject: Re: [PATCH v7 1/2] fTPM: firmware TPM running in TEE To: Thirupathaiah Annapureddy Cc: Jarkko Sakkinen , Sasha Levin , "peterhuewe@gmx.de" , "jgg@ziepe.ca" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-integrity@vger.kernel.org" , Microsoft Linux Kernel List , "Bryan Kelly (CSI)" , "tee-dev@lists.linaro.org" , "sumit.garg@linaro.org" , "rdunlap@infradead.org" , Joakim Bech Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thirupathaiah, (+Joakim) On Wed, 3 Jul 2019 at 09:58, Ilias Apalodimas wrote: > > Hi Thirupathaiah, > > > > First of all, Thanks a lot for trying to test the driver. > > > np > > [...] > > > I managed to do some quick testing in QEMU. > > > Everything works fine when i build this as a module (using IBM's TPM 2.0 > > > TSS) > > > > > > - As module > > > # insmod /lib/modules/5.2.0-rc1/kernel/drivers/char/tpm/tpm_ftpm_tee.ko > > > # getrandom -by 8 > > > randomBytes length 8 > > > 23 b9 3d c3 90 13 d9 6b > > > > > > - Built-in > > > # dmesg | grep optee > > > ftpm-tee firmware:optee: ftpm_tee_probe:tee_client_open_session failed, > > > err=ffff0008 > > This (0xffff0008) translates to TEE_ERROR_ITEM_NOT_FOUND. > > > > Where is fTPM TA located in the your test setup? > > Is it stitched into TEE binary as an EARLY_TA or > > Is it expected to be loaded during run-time with the help of user mode OP-TEE supplicant? > > > > My guess is that you are trying to load fTPM TA through user mode OP-TEE supplicant. > > Can you confirm? > I tried both > Ok apparently there was a failure with my built-in binary which i didn't notice. I did a full rebuilt and checked the elf this time :) Built as an earlyTA my error now is: ftpm-tee firmware:optee: ftpm_tee_probe:tee_client_open_session failed, err=ffff3024 (translates to TEE_ERROR_TARGET_DEAD) Since you tested it on real hardware i guess you tried both module/built-in. Which TEE version are you using? Thanks /Ilias