Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp276440yba; Thu, 16 May 2019 00:08:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJUUNPpBlgGb2toSZ0GyGoEqbol9nZ4Mt8wmFzVfBZdgLQfZATyyG0IUHTy6LRFfJPhrOv X-Received: by 2002:a63:1460:: with SMTP id 32mr48912009pgu.319.1557990532091; Thu, 16 May 2019 00:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557990532; cv=none; d=google.com; s=arc-20160816; b=w2uBz1DvSny+aW03B2dSyLht6xl45SEz8oU1woQSH3W/scFEHfelPCEOD6pBIU1S1Q Plfo4YsXJWX3hvLEQw7MUZX0D9laYrpPxu/tscRhde/xaO5hwkmaINlKAyBTgDbWQje4 CXKSOvbwlCIhhdJbd6A/Phf8Q4c7LOEM/UIoh8XlFoySmn3xG5U/v1sze87kRTpBqLZ3 G3AD11CYGHhGhvbkUSxxTYeyXL6gYhSDZrDJ4ql7H/hsKKLvctDMIk99Bps81KKTzP/B Z6vbNYYO7Ch3HF6tBqE6qYrRmFaf3WloJTDEZjqRSeqJKdDU6gjCeWPpFkF3OTsvN/3K STLA== 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=3tuyRdp1kiTY23EHvc9NEBL/dfI6XqAQnryU6YgN88k=; b=xjosYZrJkjoLh29t7xB/t7teDhdkV01YIll4eIzdutQbR4wKxxKQET5ICq85yMlIVP YCbqbz+gx9ahc26cXsk2ELfj59540hIKDadFF4uduURcfMZ76763P/iRfpZSwDVemKqS v1sBrRtR8F94mXdWuRQ0adsig+I5k+vNclGRYMTzuei9jfBOpjXULHSoVHBdufxEMyRY iOnWk4/cZJ3HdZQIwZ4PAq7vyJxpqfy1lyLX+9rqs0HSlE2yZVy2Dz4B0Eymh5fYDj9L IoDHao4Xe9yM2b/8rc+XpvlZSSQt+wghtFRPV2m83FZTJPTwjUAFcwQnk5MnTnsJ5kqB BT/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VXisOUaR; 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 j25si4094425pgl.215.2019.05.16.00.08.36; Thu, 16 May 2019 00:08:52 -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=VXisOUaR; 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 S1726702AbfEPHGT (ORCPT + 99 others); Thu, 16 May 2019 03:06:19 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:36384 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbfEPHGS (ORCPT ); Thu, 16 May 2019 03:06:18 -0400 Received: by mail-vs1-f65.google.com with SMTP id l20so1647873vsp.3 for ; Thu, 16 May 2019 00:06:17 -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=3tuyRdp1kiTY23EHvc9NEBL/dfI6XqAQnryU6YgN88k=; b=VXisOUaRMulel+iyFbX21Xi2jHYGI6moKFyX5kvQe7al8mpkl0q80RJl6c5kjnsh1h yWGuLg1y5NZPcm7p+Cw47rCHhC+0XjiL8ZxQniuJ0M8kQmjlD3hcn2PsQw+7K/Wr92xt Ym9VT+hZVUxX6HKFvEbHNWvSD5ZzczOTri+dD3Q/TaQAj+RpiCw/TJFip78oFa1mAnjw eY6fVaVTm8jK+vUgj6YSwGVV5STazrNbXYDN8soNzs9QjR+a4N/WdtBXU1Sll2PyYtuz qe0rorZxQjBQriGR++jFIqbXLslnfOZxl+HPeTqApkxq1TtXLr4ASaBy8bbTSaXK+evi p8Ew== 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=3tuyRdp1kiTY23EHvc9NEBL/dfI6XqAQnryU6YgN88k=; b=Ai+/at1WYsyEwQQx0jAoQk2iwNBzEXj5rQMv7pOWLsTfM661HBLdxW9epLmqaoh0nY 2mfU+L5dw4Ia1MToBopuwQZ7tB7T5SxDPyskLpaDnxkPVdYqm6NolRfLCddtCoWeNNHD uEQM2xiIYQ8Sw9+oVTa5mMc3dlGEeK+BVAY8GHqHcgxtgvvnf/p373OpoxmFScOyfG9h FoYW1LYbO6WLwR2gfcHcPuTkYRTh3XKTLm68fTjqPWQ7CZTygKSNGkC8eB/YdLU8niO6 IA6FZhxO+ght3KYIoqvKaAFFPse5NaLFghOop9tchAou+MlSrAs++vko4RiMEK1sYvte Fj6Q== X-Gm-Message-State: APjAAAVZHZtYFF8B5Y65/Iwf2Nml2Eak9WDZmYRCPtvAG0gRlGv+gfA9 Y2XMz4cv58jbVXN2nnN1d2fgW/ROXRASmHCiYFCs1w== X-Received: by 2002:a67:2781:: with SMTP id n123mr5270839vsn.141.1557990377174; Thu, 16 May 2019 00:06:17 -0700 (PDT) MIME-Version: 1.0 References: <20190415155636.32748-1-sashal@kernel.org> <20190507174020.GH1747@sasha-vm> <20190508124436.GE7642@linux.intel.com> <20190514193056.GN11972@sasha-vm> In-Reply-To: From: Sumit Garg Date: Thu, 16 May 2019 12:36:05 +0530 Message-ID: Subject: Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver To: Thirupathaiah Annapureddy Cc: Sasha Levin , Jarkko Sakkinen , "peterhuewe@gmx.de" , "jgg@ziepe.ca" , "corbet@lwn.net" , Linux Kernel Mailing List , "linux-doc@vger.kernel.org" , "linux-integrity@vger.kernel.org" , Microsoft Linux Kernel List , "Bryan Kelly (CSI)" 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 On Thu, 16 May 2019 at 06:30, Thirupathaiah Annapureddy wrote: > > > > > -----Original Message----- > > From: Sumit Garg > > Sent: Tuesday, May 14, 2019 7:02 PM > > To: Sasha Levin > > Cc: Jarkko Sakkinen ; peterhuewe@gmx.de; > > jgg@ziepe.ca; corbet@lwn.net; Linux Kernel Mailing List > kernel@vger.kernel.org>; linux-doc@vger.kernel.org; linux- > > integrity@vger.kernel.org; Microsoft Linux Kernel List > kernel@microsoft.com>; Thirupathaiah Annapureddy ; > > Bryan Kelly (CSI) > > Subject: Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver > > > > On Wed, 15 May 2019 at 01:00, Sasha Levin wrote: > > > > > > On Wed, May 08, 2019 at 03:44:36PM +0300, Jarkko Sakkinen wrote: > > > >On Tue, May 07, 2019 at 01:40:20PM -0400, Sasha Levin wrote: > > > >> On Mon, Apr 15, 2019 at 11:56:34AM -0400, Sasha Levin wrote: > > > >> > From: "Sasha Levin (Microsoft)" > > > >> > > > > >> > Changes since v2: > > > >> > > > > >> > - Drop the devicetree bindings patch (we don't add any new ones). > > > >> > - More code cleanups based on Jason Gunthorpe's review. > > > >> > > > > >> > Sasha Levin (2): > > > >> > ftpm: firmware TPM running in TEE > > > >> > ftpm: add documentation for ftpm driver > > > >> > > > >> Ping? Does anyone have any objections to this? > > > > > > > >Sorry I've been on vacation week before last week and last week > > > >I was extremely busy because I had been on vacation. This in > > > >my TODO list. Will look into it tomorrow in detail. > > > > > > > >Apologies for the delay with this! > > > > > > Hi Jarkko, > > > > > > If there aren't any big objections to this, can we get it merged in? > > > We'll be happy to address any comments that come up. > > > > I guess you have missed or ignored this comment [1]. Please address it. > > > > [1] > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org% > > 2Flkml%2F2019%2F5%2F8%2F11&data=01%7C01%7Cthiruan%40microsoft.com%7Cf2a > > 80c7b94434329eaee08d6d8d962b1%7C72f988bf86f141af91ab2d7cd011db47%7C1&sd > > ata=hyJRc23NwEFLDuaIMkbSCGetd%2BObQWiAg%2BJtMMR6z9U%3D&reserved=0 > > > > -Sumit > > Thanks for reviewing and adding comments. > > We tried to use TEE bus framework you suggested for fTPM enumeration. > We were not able to pass the TCG Logs collected by the boot loaders. > > Currently there are 3 ways to pass TCG Logs based on the code > in drivers/char/tpm/eventlog: > > 1. ACPI Table > 2. EFI Table > 3. OF Device node properties > > Our ARM system is booting using U-boot and Device Tree. > So ACPI/EFI table mechanism to pass TCG2 logs won't be applicable. > We needed to use OF device node properties to pass TCG2 Logs. > TEE bus enumeration framework does not work for our use case due to the above. Firstly let me clarify that this framework is intended to communicate with TEE based services/devices rather than boot loader. And in this case fTPM being a TEE based service, so this framework should be used. > > Is it possible to add flexibility in TEE bus enumeration framework to support > platform specific properties through OF nodes or ACPI? > As you mentioned above, TCG logs are collected by boot loader. So it should find a way to pass them to Linux. How about if boot loader register these TCG logs with fTPM TA which could be fetched during fTPM driver probe or new api like tpm_read_log_tee()? This is something similar to what I used in optee-rng [1] driver to fetch RNG properties. [1] https://github.com/torvalds/linux/blob/master/drivers/char/hw_random/optee-rng.c#L176 -Sumit > > > > > > > > -- > > > Thanks, > > > Sasha