Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gLIeL-0004tE-JV for mharc-grub-devel@gnu.org; Fri, 09 Nov 2018 21:05:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <3GRvmWw4KCsw4sBBzwEys99wBBy66y3w.u64y9Ct-vwDw3y5C.69y@flex--matthewgarrett.bounces.google.com>) id 1gLGUl-0007UQ-Ou for grub-devel@gnu.org; Fri, 09 Nov 2018 18:47:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <3GRvmWw4KCsw4sBBzwEys99wBBy66y3w.u64y9Ct-vwDw3y5C.69y@flex--matthewgarrett.bounces.google.com>) id 1gLGPB-0004VA-FM for grub-devel@gnu.org; Fri, 09 Nov 2018 18:41:40 -0500 Received: from mail-pg1-x549.google.com ([2607:f8b0:4864:20::549]:44262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <3GRvmWw4KCsw4sBBzwEys99wBBy66y3w.u64y9Ct-vwDw3y5C.69y@flex--matthewgarrett.bounces.google.com>) id 1gLGP3-0002qo-UQ for grub-devel@gnu.org; Fri, 09 Nov 2018 18:41:34 -0500 Received: by mail-pg1-x549.google.com with SMTP id a2so2229147pgt.11 for ; Fri, 09 Nov 2018 15:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=8Buh2DRXMB7Z7ISdW7rw6u+dTAa8NJWZv2/feM8ANzc=; b=PfTxYCtyFMrgH5FlFrJsCEv6eUR8Oi/kdRTOU51gyuLspdExfQ3GUe+B07NFo1NZvN cJIJC1RtsSeNz7URH7lLPc1ceTa+AiZlKlrqO3n9KgENoChAFb8oBTjiCUjofOcxQECe 5493W8aV7Q/ZNUwEvREn5hejkDPhn+BREZfANNWzuLhRO74EqKqMPar3Ls4IGy+6Sxqn /locKwSPoj7XttZO4O9pLJoceWsb4gqepR2GKY333tv8cXTvmkytjhcdf9ZDUZYGd0Kw JRa+YuvR6EEopQm/tfZLTbld4MJpqrxIekpAfJY4I5g2vCKf4rxF8m7jV2B14MPwtgOE nZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=8Buh2DRXMB7Z7ISdW7rw6u+dTAa8NJWZv2/feM8ANzc=; b=I3FLRvk3lZ7ow52yDnd1yEEzMECHcprLiUytaFiDi2NyJXe5G4JndRqDWut4582/MM FHWfTp4cV/iycGsB/mbvsHMThg3mUz/1fvS/g06tmeuurGuQwl1yuSEx6retnPYlKkC4 JjWXudcUBxK9h+8mEAFCx2WDCHnAR0hVE8hKPvMeebuTulvRsV3e3U4Vk93xg2vMJdZ9 Ttb4WJQbjo3wPX/2V0MzRU1wsUXASWnrhRABtlJs1LDQbVPLnjzTT7+B80gQyhhBEmNJ h3S9pNg/OEXqZ/aWvvZCL9OB6O8fiWIN2CBuPYHkTVpj4FMJTrWTttQpV/ms3anyN349 zueA== X-Gm-Message-State: AGRZ1gKFfElHVSfpyeuY4mWOpsnTera3SXYBHcwDskCYpeZ6GDSYKyXC qFb55l9bfGcPa+zCLVNnqeNoZ3VhKI6lXp4VR3+R96TB5w9XAAwymywHO8FM7lrPWsn7LWlGoQe wWjBKSS7M0wxYmfDnnRYWPHlhPBoMgbHHAFi4ZvvEHL6jUFbo8YevRh8J12S8xsza0LRO5ZAc4w cA7w== X-Google-Smtp-Source: AJdET5eEUdxTQqpauSeYQrDcppIT3YjitgVI4b0IrjOfDNMHK+W1hpGoiuG6wpoaGYdShjA0qfBIUVTEmENTewgjQEl9ag== X-Received: by 2002:a62:9959:: with SMTP id d86-v6mr4668327pfe.51.1541806873045; Fri, 09 Nov 2018 15:41:13 -0800 (PST) Date: Fri, 9 Nov 2018 15:41:03 -0800 In-Reply-To: <20181109234103.207730-1-matthewgarrett@google.com> Message-Id: <20181109234103.207730-3-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181109234103.207730-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [PATCH 3/3] verifiers: Add TPM documentation From: Matthew Garrett To: grub-devel@gnu.org Cc: Matthew Garrett Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::549 X-Mailman-Approved-At: Fri, 09 Nov 2018 21:05:24 -0500 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 23:47:24 -0000 Describe the behaviour of grub when the TPM module is in use. --- docs/grub.texi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 471d97c95..6bd3783a4 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -5545,6 +5545,7 @@ environment variables and commands are listed in the same order. * Authentication and authorisation:: Users and access control * Using digital signatures:: Booting digitally signed code * UEFI secure boot and shim:: Booting digitally signed PE files +* Measured Boot:: Measuring boot components @end menu @node Authentication and authorisation @@ -5721,6 +5722,43 @@ mentioned requirements are enforced by the shim_lock module. And itself it is a persistent module which means that 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 +event description as described below. + +@multitable @columnfractions 0.3 0.1 0.6 +@headitem Event type @tab PCR @tab Description +@item Command +@tab 8 +@tab All executed commands (including those from configuration files) will be +logged and measured as entered with a prefix of ``grub_cmd: `` +@item Module command line +@tab 8 +@tab Any command line passed to a kernel module will be logged and measured as +entered with a prefix of ``module_cmdline: `` +@item Kernel command line +@tab 8 +@tab Any command line passed to a kernel will be logged and measured as entered +with a prefix of ``kernel_cmdline: '' +@item Files +@tab 9 +@tab Any file read by GRUB will be logged and measured with a descriptive text +corresponding to the filename. +@end multitable + +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. + +Measured boot is currently only supported on EFI platforms. + @node Platform limitations @chapter Platform limitations -- 2.19.1.930.g4563a0d9d0-goog