Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp78612ybj; Mon, 4 May 2020 16:27:31 -0700 (PDT) X-Google-Smtp-Source: APiQypK4HpWOfeZ2JG4LT3PM6haaxO6AaSHDxLmk/LmEc4HyYV7ZYohpgh56zMZBCEgt1K2xKlOl X-Received: by 2002:aa7:d2d0:: with SMTP id k16mr401772edr.354.1588634851492; Mon, 04 May 2020 16:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588634851; cv=none; d=google.com; s=arc-20160816; b=rNYmpNQN4FAnIPS+9DPy7vj38voHO2LPhnlLV5Nmzyk0HnhoTZQ9eK29UwyZYLDNKQ tdiG0HHRxh2639I2ABDVNBL53ROGjNeOuaIeoHK9cQpzMUOwvBLWIoQQuFEKJVA1RF/w 0zcNRLsjNr+En/oQCgik9U+tbhnOLBLNfYOPN9n7FDk99qccTctIbGPBh7nEcfq4Za0C QCz6HQXWVlijtOiVeKx1TvuS57W/gKxxSx2z6qreA2mikVgholStrha47FK1+UL1Tid5 dlz63WMSiE2iIWrrOWvrWN8sf+BQbpz+i2ZVV2kfmCA0BL8dehTvqY2MrV7x07MBxbRu HH1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gzMDHVzQaTOBKqJdHyBiGVZaL4Je1usWIbsSqvU86kU=; b=bAydmEDrmWBxXmzzUENudSLvZxPcuXRd7vrq7SZg2l1/+YP+0T2g+59X+shckyDSQz ntw83TiW+3wTIe34vIrPypMOYWkwr4eP8+aQeE/754FGmEOYLLY0bRavdVXQlDf+634U cv6h2YcHA08afzrOVTpbE34ljDfLbQtuOmmowN3AEzu4Lrx07qEq+kSmcZ6APOTs3tks R+bdWewpKQ8ug3ghEFGSW9m4CUec4ETtYt9Ext2PbdORi7rUtxq0Rl5Xifvv+WdJUYqe 9NVWoLdJ1PiVGhjFlyQhYQUifNEF0z/Yu3WKSTDu9K2FPPsLN6V/nQR0kEMTECAZB+bl VKtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=hw1XT5ra; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc11si43998ejb.215.2020.05.04.16.27.08; Mon, 04 May 2020 16:27:31 -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=@oracle.com header.s=corp-2020-01-29 header.b=hw1XT5ra; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728364AbgEDXYz (ORCPT + 99 others); Mon, 4 May 2020 19:24:55 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:35376 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbgEDXYy (ORCPT ); Mon, 4 May 2020 19:24:54 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044NNr3v105288; Mon, 4 May 2020 23:24:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=gzMDHVzQaTOBKqJdHyBiGVZaL4Je1usWIbsSqvU86kU=; b=hw1XT5raQN/v3nwWzg6SqUCuMTeK6ZEr7V0mrPrFY0dbAqTJnv6ShB/vY9o1osNBKAew 2yvBf13bpNMv/Lz+F3Pts/pE5JKDGOvDSxHXWaYBbgTn3lzlTAIe6c0QT60M7Ju2fv+Y 95a/v593Cqaw5ZEGVlP6dlyV4QIjZfNxsG8+k0JxY3WJUxYcylg4uiSvVR/pltgryC5e 0uIKbJxegraccJ6qasqc7wo86xfF9Rdq3aSqrbSAsb4jjb3l3hc3xiDb+B/3FvGC6PoH 4WDHgeV246IWuqhOgaCfF3POkzBUZ/wcCvaEtP7bUASYfE80gN77CLrO9CONevFac5U4 tw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 30s1gn1n9p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 23:24:33 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044NMTxn021505; Mon, 4 May 2020 23:22:32 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 30sjjx5hje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 23:22:32 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 044NMViW004218; Mon, 4 May 2020 23:22:31 GMT Received: from tomti.i.net-space.pl (/10.175.189.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 May 2020 16:22:31 -0700 From: Daniel Kiper To: grub-devel@gnu.org, linux-kernel@vger.kernel.org, trenchboot-devel@googlegroups.com, x86@kernel.org Cc: alexander.burmashev@oracle.com, andrew.cooper3@citrix.com, ard.biesheuvel@linaro.org, dpsmith@apertussolutions.com, eric.snowberg@oracle.com, javierm@redhat.com, kanth.ghatraju@oracle.com, konrad.wilk@oracle.com, krystian.hebel@3mdeb.com, lukasz.hawrylko@linux.intel.com, michal.zygowski@3mdeb.com, mjg59@google.com, phcoder@gmail.com, pirot.krol@3mdeb.com, pjones@redhat.com, ross.philipson@oracle.com Subject: [GRUB PATCH RFC 07/18] i386/tpm: Rename tpm module to tpm_verifier Date: Tue, 5 May 2020 01:21:21 +0200 Message-Id: <20200504232132.23570-8-daniel.kiper@oracle.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200504232132.23570-1-daniel.kiper@oracle.com> References: <20200504232132.23570-1-daniel.kiper@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040182 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040182 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ..to avoid naming collision with TPM TIS and CRB driver introduced by subsequent patch. Signed-off-by: Daniel Kiper --- docs/grub.texi | 15 ++++++++------- grub-core/Makefile.core.def | 4 ++-- grub-core/commands/{tpm.c => tpm_verifier.c} | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) rename grub-core/commands/{tpm.c => tpm_verifier.c} (96%) diff --git a/docs/grub.texi b/docs/grub.texi index d6408d242..395431bce 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -5940,10 +5940,10 @@ it cannot be unloaded if it was loaded into the memory. @node Measured Boot @section Measuring boot components -If the tpm module is loaded and the platform has a Trusted Platform Module -installed, GRUB will log each command executed and each file loaded into the -TPM event log and extend the PCR values in the TPM correspondingly. All events -will be logged into the PCR described below with a type of EV_IPL and an +If the tpm_verifier module is loaded and the platform has a Trusted Platform +Module installed, GRUB will log each command executed and each file loaded into +the TPM event log and extend the PCR values in the TPM correspondingly. All +events will be logged into the PCR described below with a type of EV_IPL and an event description as described below. @multitable @columnfractions 0.3 0.1 0.6 @@ -5968,9 +5968,10 @@ corresponding to the filename. GRUB will not measure its own @file{core.img} - it is expected that firmware will carry this out. GRUB will also not perform any measurements until the -tpm module is loaded. As such it is recommended that the tpm module be built -into @file{core.img} in order to avoid a potential gap in measurement between -@file{core.img} being loaded and the tpm module being loaded. +tpm_verifier module is loaded. As such it is recommended that the tpm_verifier +module be built into @file{core.img} in order to avoid a potential gap in +measurement between @file{core.img} being loaded and the tpm_verifier module +being loaded. Measured boot is currently only supported on EFI platforms. diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 48b82e763..b74a34f0c 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -2497,8 +2497,8 @@ module = { }; module = { - name = tpm; - common = commands/tpm.c; + name = tpm_verifier; + common = commands/tpm_verifier.c; efi = commands/efi/tpm.c; enable = x86_64_efi; }; diff --git a/grub-core/commands/tpm.c b/grub-core/commands/tpm_verifier.c similarity index 96% rename from grub-core/commands/tpm.c rename to grub-core/commands/tpm_verifier.c index 1441c494d..6fff17720 100644 --- a/grub-core/commands/tpm.c +++ b/grub-core/commands/tpm_verifier.c @@ -85,18 +85,18 @@ grub_tpm_verify_string (char *str, enum grub_verify_string_type type) } struct grub_file_verifier grub_tpm_verifier = { - .name = "tpm", + .name = "tpm_verifier", .init = grub_tpm_verify_init, .write = grub_tpm_verify_write, .verify_string = grub_tpm_verify_string, }; -GRUB_MOD_INIT (tpm) +GRUB_MOD_INIT (tpm_verifier) { grub_verifier_register (&grub_tpm_verifier); } -GRUB_MOD_FINI (tpm) +GRUB_MOD_FINI (tpm_verifier) { grub_verifier_unregister (&grub_tpm_verifier); } -- 2.11.0