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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B4F1C7EE23 for ; Wed, 1 Mar 2023 22:35:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 300FB85237; Wed, 1 Mar 2023 23:35:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.b="AMV8/7kN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 27D4A85237; Wed, 1 Mar 2023 23:35:41 +0100 (CET) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D27B85B43 for ; Wed, 1 Mar 2023 23:35:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eajames@linux.ibm.com Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 321LBkcR003607; Wed, 1 Mar 2023 22:35:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=dqZgxnr18QK16YjrMrmHDL1NpsoLx8o86LFdi+xMXls=; b=AMV8/7kNyy4AU52SEJQNi+kZPIKtEmgj4AZqTyuz/2gHrLaKVOZ0quEz4/kfX0FWKGdj H6RK2X7UXgX7bS9gupPSFaiFvn4+9vjbk8RwMaqsda1aOjuo5/n+hJvj34hVj03RhXPh FdL9IjJ0yl1nWwmEeqWeLHAjv3R+7CMdk2OsxRfeAS4CPh/IVzECpGanEM9kFQoz58+P NX9R62AqP51cTW65Xvm+f3iLIv3NhrFFRMP3aC7it6Xd58VaIAKZMn9MTUNMcYzsSnNE iwOF0S0MRwg9MEK7pRCFH2SNkQZN8mix/LmO4hJzO1EfuQ8qK2QAoTKveZltv7mSqcW6 4g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p2edct3v0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Mar 2023 22:35:32 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 321Lx8ec017486; Wed, 1 Mar 2023 22:35:32 GMT Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p2edct3ud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Mar 2023 22:35:32 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 321JTw21005874; Wed, 1 Mar 2023 22:35:31 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([9.208.129.119]) by ppma01wdc.us.ibm.com (PPS) with ESMTPS id 3nybcg9ee7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Mar 2023 22:35:30 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 321MZT3q38470358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Mar 2023 22:35:30 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D74CC58136; Wed, 1 Mar 2023 22:35:29 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 09BD058133; Wed, 1 Mar 2023 22:35:29 +0000 (GMT) Received: from [9.160.88.121] (unknown [9.160.88.121]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 1 Mar 2023 22:35:28 +0000 (GMT) Message-ID: Date: Wed, 1 Mar 2023 16:35:28 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v6 6/6] doc: Add measured boot documentation To: Heinrich Schuchardt , u-boot@lists.denx.de Cc: sjg@chromium.org, ilias.apalodimas@linaro.org, joel@jms.id.au References: <20230222180242.4040958-1-eajames@linux.ibm.com> <20230222180242.4040958-7-eajames@linux.ibm.com> Content-Language: en-US From: Eddie James In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: b75ls8EMzF40Xi4TUPAbJCbiMtOLXOdB X-Proofpoint-GUID: 4860Fqra58Sj7LIuujinPBn2339tz4dF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-01_15,2023-03-01_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 phishscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303010181 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 2/22/23 14:26, Heinrich Schuchardt wrote: > > Am 22. Februar 2023 19:02:42 MEZ schrieb Eddie James : >> Briefly describe the feature and specify the requirements. >> >> Signed-off-by: Eddie James >> --- >> doc/usage/index.rst | 1 + >> doc/usage/measured_boot.rst | 23 +++++++++++++++++++++++ >> 2 files changed, 24 insertions(+) >> create mode 100644 doc/usage/measured_boot.rst >> >> diff --git a/doc/usage/index.rst b/doc/usage/index.rst >> index cde7dcb14a..0cf78cb0e7 100644 >> --- a/doc/usage/index.rst >> +++ b/doc/usage/index.rst >> @@ -12,6 +12,7 @@ Use U-Boot >> partitions >> cmdline >> semihosting >> + measured_boot >> >> Shell commands >> -------------- >> diff --git a/doc/usage/measured_boot.rst b/doc/usage/measured_boot.rst >> new file mode 100644 >> index 0000000000..8357b1f480 >> --- /dev/null >> +++ b/doc/usage/measured_boot.rst >> @@ -0,0 +1,23 @@ >> +.. SPDX-License-Identifier: GPL-2.0+ >> + >> +Measured Boot >> +===================== > This completely misses o describe measured boot with UEFI. > > @Ilias, do you want to add that in a follow up patch? > >> + >> +U-Boot can perform a measured boot, the process of hashing various components >> +of the boot process, extending the results in the TPM and logging the >> +component's measurement in memory for the operating system to consume. >> + >> +Requirements >> +--------------------- >> + >> +* A hardware TPM 2.0 supported by the U-Boot drivers >> +* CONFIG_TPM=y >> +* CONFIG_MEASURED_BOOT=y >> +* Device-tree configuration of the TPM device to specify the memory area >> + for event logging. The TPM device node must either contain a phandle to >> + a reserved memory region or "linux,sml-base" and "linux,sml-size" >> + indicating the address and size of the memory region. An example can be >> + found in arch/sandbox/dts/test.dts >> +* The operating system must also be configured to use the memory regions >> + specified in the U-Boot device-tree in order to make use of the event >> + log. > Please, provide enough information such that a reader can set this up. This should include example code. Hi Heinrich, I'm not sure what example code you mean. No additional code is necessary for U-Boot to perform the measurements, only the requirements stated. If you mean the operating system setup, I don't think here is the right place to document that, as it has nothing to do with U-Boot. Either way, Linux would not require any code, only a similar devicetree entry and TPM driver. Thanks, Eddie > > Best regards > > Heinrich