Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp304718ybm; Thu, 28 May 2020 03:14:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyApXPsglCwLL5Q/a19A4YCEcf5RrcSQSk0AjdQgltUK51+lp+RE71KuZyqpH+YpmDw7p1s X-Received: by 2002:aa7:d39a:: with SMTP id x26mr2197342edq.207.1590660881683; Thu, 28 May 2020 03:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590660881; cv=none; d=google.com; s=arc-20160816; b=xBBcLs5U2fyl0bmIlm0rBU8VPuVo35D7QpVpMpQvvol9jxD/za5w7jNHxeYIqF5ixN PjP55CmzbPi1+u6Ihg+yE3bAYgPHOt6RGFKFm/snztNx5GJIcm5fngy/ZacKggrr/27G 7rG2zzel3DTMjKDSeablKer3M+kLN07xyJFWpFzK+7R/45ey5kx2HH0pOLsgWWcV63Iq 2tuJ30ZC/OBzn7PFGoDAD7aRnPpJ/MAz9HCEZbVxGj9LlnSRxzczwfRwZoOxkUp++XqD EBL3RDP3yYCZhybkP+Tnx6A6gVWNt7hF1nv2s6aWBZXYEfKL8uhx3EYxQlHuleSp0Lh2 A2GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GvfntBARHGj9tyZqdVS0AkSrdT6KC+PYhROqxRjCMSI=; b=c+KlyplQqqB+KJZVHfU1HaypSVcb9kszzm/hbNxEOL35N7QmNRwpz4nJYTEZ1tdyX/ SB32kPJaBqtYO6LOjMDXw66QEhAaCDZr6uehhW3uJj+x7grUrOjUyWRB5XO3Lt2y85u8 Yo6c8IqPQ+3oBwP7TmRvYHOu+10KIDILGAzzMCkogxYZdPX39fDQWKuhYt8fdrmgonNY fppgswi6gH3ODC7rz8KnQoZp//wcewRRIBazAUjun4fpDCzM+wjLLY/fW8AW0yeiVmuZ S/Cr50oLFrlIjAKk6lFRHI7b3UOqsnCbPVIYSuFNCLBUdG3yIDTpbCwdcsZ5I+c+NOx0 mtVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dciROLJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s14si3786761ejq.37.2020.05.28.03.14.18; Thu, 28 May 2020 03:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dciROLJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2387708AbgE1KL5 (ORCPT + 99 others); Thu, 28 May 2020 06:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387597AbgE1KL4 (ORCPT ); Thu, 28 May 2020 06:11:56 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 207D9C05BD1E for ; Thu, 28 May 2020 03:11:56 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id u16so14489359lfl.8 for ; Thu, 28 May 2020 03:11:56 -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:content-transfer-encoding:in-reply-to; bh=GvfntBARHGj9tyZqdVS0AkSrdT6KC+PYhROqxRjCMSI=; b=dciROLJOVOVwViZNuh26Z/D+bUVPDpn5YJh8ZZttPxszTWryj9rOVEeufhdM5e1xGy YfDBZ2KvD8mWzVKTPn0h3ANgfslgu9bpKn18ygjJqto1jKZsOENRKNzj6CrLLZITeSFj trh4CDPfzYRDnG0qguZAHiADbM8kCqoVHKX4ZjtCOsBqVJtc+YNUYhVbMa93BMeGbkZ0 6D3AOy7TVkze0Pud/A/q8VCuE9+HD05/39pszecnFngXZx3Lg97kpBJ9VEFu/+yathLE 3+LeS904+pW0/zHStBygu1Wx/d6DKguY0APiH7LGNsmguPhm6uRoY5aHq/A432qDSH7n P/JQ== 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:content-transfer-encoding :in-reply-to; bh=GvfntBARHGj9tyZqdVS0AkSrdT6KC+PYhROqxRjCMSI=; b=RyvSzZS/vyOO+5RehQ7Qaza1a7C6c29dCX404Iruo4wMnNAeWUmt5l+SPkw/ES5pwU srO4tumNcPvbifQr5GFJyvrxLE64HiXuczCFAodJkORHp+y4WqakYJPMg2r910Uh8jLZ CTNU5Ei5suY5U8Fj9m1sLwdrF92ACpcnJM7fwLL9NYuofw14ACvQAdM9iPCsHbxBpOBW hOz2tpIyUy3iaYnPBUI8+fTsBxtIct0mDIhXwsilskNdbC07RnF1uuelYjVP4gbYRBfP XAZdXrpFTS2pEnPvkvRAa1v3xgOnWE07Te87hyNTDd4hFq3OuDtvI6ei7vBw/++4a+fC hahg== X-Gm-Message-State: AOAM531Et9g4n5+tWs1c5JZbpg5D/aZcjSzXsSUGdfUNPNKudCA3BLJj jUBRFxIzQS9mV5zKp1oimkTsGpPp9Jg= X-Received: by 2002:a05:6512:3082:: with SMTP id z2mr1350303lfd.32.1590660713685; Thu, 28 May 2020 03:11:53 -0700 (PDT) Received: from jade (h-249-223.A175.priv.bahnhof.se. [98.128.249.223]) by smtp.gmail.com with ESMTPSA id m11sm567347lji.51.2020.05.28.03.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 03:11:53 -0700 (PDT) Date: Thu, 28 May 2020 12:11:50 +0200 From: Jens Wiklander To: Maxim Uvarov Cc: Jarkko Sakkinen , Linux Kernel Mailing List , "tee-dev @ lists . linaro . org" , peterhuewe@gmx.de, Jason Gunthorpe , Greg Kroah-Hartman , linux-integrity@vger.kernel.org, Arnd Bergmann , Sumit Garg Subject: Re: [PATCHv2 2/2] tpm_ftpm_tee: register driver on TEE bus Message-ID: <20200528101150.GA156014@jade> References: <20200521064743.4769-1-maxim.uvarov@linaro.org> <20200521064743.4769-4-maxim.uvarov@linaro.org> <20200522171451.GD10319@linux.intel.com> <20200522200346.GB150221@linux.intel.com> <81c59da1dc2a255c58e7e338f30285e68b4664d6.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2020 at 11:08:18AM +0300, Maxim Uvarov wrote: > On Wed, 27 May 2020 at 22:42, Jarkko Sakkinen > wrote: > > > > On Mon, 2020-05-25 at 09:50 +0300, Maxim Uvarov wrote: > > > Jakko, > > > tee-supplicant application provides state machine over callbacks with > > > RPC messages. > > > https://github.com/OP-TEE/optee_client/blob/master/tee-supplicant/src/tee_supplicant.c#L614 > > > It also allocates shm. Without running tee-supplicant > > > tee_client_open_session() will fail. > > > optee_open_session()->get_msg_arg()->tee_shm_alloc()->... > > > Optee team wanted to remove some dependencies from tee-supplicant with > > > moving code > > > to the kernel. But for now I think that should be out of the scope of > > > current patches due to > > > they fix driver initialization on tee bus without breaking current > > > functionality. > > > > So what is the role in high-level for tee-supplicant? Why does it > > exist? No time to dive into code unfortunately. > > > > Original implementation for tee-supplicant does several things: > 1. allocate shm > 2. load ta from user space (fs file) > 3. emulate rpmb > 4. also there are some ftrace and socket functions which I did not use. > > As I I understand, current implementation uses tee-supplicant and it's > library as > API from user land to Trusted OS. > > Some docs can be found here: > https://optee.readthedocs.io/en/latest/architecture/index.html > > > > > These kernel commits do not explain in simple terms enough how all > > of these entities connect with each other, if you don't have that > > understanding beforehand. > > > > Yes, that is true. But I think it's something new and good docs will > be some time later. There's already some in Documentation/tee.txt, but it will get outdated if we don't update it when we architectural changes like this. It's a pity we missed updating it with the introduction of the bus. It seems a good time to do it now so it easier to follow what's done. Cheers, Jens > > > /Jarkko > > > > Regards, > Maxim.