Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1860947yba; Fri, 17 May 2019 06:40:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWGPf/ClZrPkheJyew+NgC3H8LnMpDMjP247fckckTH7HrsuVvR2zEB4lbbgRNwfK5w6I6 X-Received: by 2002:a17:902:bc42:: with SMTP id t2mr5040648plz.55.1558100426669; Fri, 17 May 2019 06:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558100426; cv=none; d=google.com; s=arc-20160816; b=ViheK+a2R/NSeugNLaRgw5tj9vN4kyPPqmZbmLr3MgVOfGjM/fraowtfG+5qwCPwHI ikefhNoysri0zRSrPuY9anQ+yqCr4zLxzSkT7hZugW6MO9rrCVtDsdauCnA0Up9m8VaK XzLhmp/obpQXj8bVZByBDZqqVl5YZlL1wyzf2EY5cueMlXDm8OxHMy17BQSLWsuu2bz0 Bv2w182gohWQ+z4AN7MXPAeqyqItTRnypZUW5oexsyLbg0XF/LoEkmrFxrHOfiNClEGZ KJgovkhN0OBX+aPM2woO5KJrPQfeoO2nMAaaZDYYVSUeb1NwoA/hPyTCje6b9xAT9AY6 gf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BEiy8BKYmYpPKomE33t4Ao7xpfeKZSTuuexhaJe9pEU=; b=D4zPWumCb7DJ3lVy7NflUB3i4agwyYLuElqAdjgNKKMuGLI9SauE+9SI99H6MFmG+E qiHBxIjgGURJWUTUD6NrFOozKxBbRoefs5v9B3ClRlTsLrzHfHcjTAhEQug3EQMhjRSL zQ4ix6GJz6RSqr+lEMdmy0Om6CcOLok3Qs32y1n+Bdp4r3CUp4j414kfvFKKbSvMIp8J 8a+QZEUbbg0J9Jfnu3wz2uCEVLnxR9/H/jm8BHGaESL4fzx7v6V/uRjbkANz7+YGfZUk o/TrkKkaLO7Mjon3c3/m43xWF0jXZi2XwL/hlvzqsUGV43l6tsE1ddz9pAdNlTM0733F /dDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A5S+u9PG; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si7201428plr.1.2019.05.17.06.40.11; Fri, 17 May 2019 06:40:26 -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=@kernel.org header.s=default header.b=A5S+u9PG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728835AbfEQNW3 (ORCPT + 99 others); Fri, 17 May 2019 09:22:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:51384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728100AbfEQNW2 (ORCPT ); Fri, 17 May 2019 09:22:28 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A893D20833; Fri, 17 May 2019 13:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558099348; bh=9V4P/CjYVKh59IiUM4G5zfY9ceZXaeiacs7WeVytWlQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A5S+u9PGyBqLrb9GRUGk7Inekez2CVDrhAB4QI+jAeiuFtKt5njEWRkvy1jQSgyeH cFAhtgP13dJlaMkXUmPdxFPHSg2aroqOtYXC03JnTBVID6LFH6CvQH4PhZisIcZWzo c2NnDOqz7sV+zhZ2jRqvigDj4014nhU1Ud3bMgt4= Date: Fri, 17 May 2019 09:22:26 -0400 From: Sasha Levin To: Jarkko Sakkinen Cc: peterhuewe@gmx.de, jgg@ziepe.ca, corbet@lwn.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@microsoft.com, thiruan@microsoft.com, bryankel@microsoft.com Subject: Re: [PATCH v3 1/2] ftpm: firmware TPM running in TEE Message-ID: <20190517132226.GB11972@sasha-vm> References: <20190415155636.32748-1-sashal@kernel.org> <20190415155636.32748-2-sashal@kernel.org> <20190515081250.GA7708@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190515081250.GA7708@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 11:12:50AM +0300, Jarkko Sakkinen wrote: >On Mon, Apr 15, 2019 at 11:56:35AM -0400, Sasha Levin wrote: >> This patch adds support for a software-only implementation of a TPM >> running in TEE. >> >> There is extensive documentation of the design here: >> https://www.microsoft.com/en-us/research/publication/ftpm-software-implementation-tpm-chip/ . >> >> As well as reference code for the firmware available here: >> https://github.com/Microsoft/ms-tpm-20-ref/tree/master/Samples/ARM32-FirmwareTPM > >The commit message should include at least a brief description what TEE >is. The whole TEE subsystem is already well documented in our kernel tree (https://www.kernel.org/doc/Documentation/tee.txt) and beyond. I can add a reference to the doc here, but I'd rather not add a bunch of TEE related comments as you suggest later in your review. The same way a PCI device driver doesn't describe what PCI is in it's code, we shouldn't be doing the same for TEE here. >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include "tpm.h" >> +#include "tpm_ftpm_tee.h" >> + >> +#define DRIVER_NAME "ftpm-tee" >> + >> +/* TA_FTPM_UUID: BC50D971-D4C9-42C4-82CB-343FB7F37896 */ >> +static const uuid_t ftpm_ta_uuid = >> + UUID_INIT(0xBC50D971, 0xD4C9, 0x42C4, >> + 0x82, 0xCB, 0x34, 0x3F, 0xB7, 0xF3, 0x78, 0x96); > >Just wondering why prefixes are here in different order in the comment >and code. No prefixes, this is a completely randomly generated UUID. I'll address the rest of your comments in the next ver. -- Thanks, Sasha