Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gSRzj-0004G6-Uj for mharc-grub-devel@gnu.org; Thu, 29 Nov 2018 14:29:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <3-T0AXA4KClwG4NNB8QA4LL8NNAIIAF8.6IGALO5-78P8FAHO.ILA@flex--matthewgarrett.bounces.google.com>) id 1gSRzh-0004EL-1N for grub-devel@gnu.org; Thu, 29 Nov 2018 14:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <3-T0AXA4KClwG4NNB8QA4LL8NNAIIAF8.6IGALO5-78P8FAHO.ILA@flex--matthewgarrett.bounces.google.com>) id 1gSRzf-0001m1-S2 for grub-devel@gnu.org; Thu, 29 Nov 2018 14:29:01 -0500 Received: from mail-pl1-x64a.google.com ([2607:f8b0:4864:20::64a]:46270) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <3-T0AXA4KClwG4NNB8QA4LL8NNAIIAF8.6IGALO5-78P8FAHO.ILA@flex--matthewgarrett.bounces.google.com>) id 1gSRzf-0001kB-Jo for grub-devel@gnu.org; Thu, 29 Nov 2018 14:28:59 -0500 Received: by mail-pl1-x64a.google.com with SMTP id m1-v6so2251575plb.13 for ; Thu, 29 Nov 2018 11:28:58 -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=3s0HsBEBfWfVNBzl61LRJEMt8osSBLNS13zoANjAQxk=; b=Oac0YjnOQEklfB5QjIG+nlCjlzUTtlndjmvmSUSZlVh8z7yW3cdiWtMO4l5e3gZf/P nK7BAx4rwb9sWM1cJBF5d+Uhlod+oaWTyd1wl/jvXHtCIti8rwLfwIaXVlEnquoC5UME r1GmMX+FyG6kWb57XGHVkOSw6n0zzXBspxlMKYLU2Q/HCA5Ijfb3vS345ced1Q5u20+e NjNPYvsS3aQUmoHy9P5m8IPkdQRxrSYoxTnIsnBPW+yiNFWpfvblSBxVxBwQmRsO56b4 k3l/n1ifwAPACMcf9bvkhh+op+IWXZb/cEiIBE072H3Pv8i8hkMqxUH+IJHN9wSQwZhW d26Q== 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=3s0HsBEBfWfVNBzl61LRJEMt8osSBLNS13zoANjAQxk=; b=gTCYBVWjtUE64BDVYFdyWLlRmZHCA7ebVY/uwszTF6IuA5c3PY7Ry3jv1Kp4fhmGvC 8KPgj8D4ic2o57Sw1Lc3E/XBKp5/FLDgvb316YH6DyE3pg8Ltdzxwmf3gj2BNDGEtEXA YsHCvPpKFKOyvwPEdd2aWzpDfITj11ij4W8TMmT1ghKKrrh92Zlkin9kBMFNwehkMA0R GacnKh6a6M25w+zaiqkwKRi+Ip0My4FFmffUKFGe2QDoc10ufGYXmTSFULCRC9rnm+ZF H8coZhOvgWZuQHDjn8h2GmV6pwT+vmQIhhasuDgATdjiTc2QERmT6K9KAFB94VLSMvx9 9X/w== X-Gm-Message-State: AA+aEWbozc7KbAjXtrxtVdk8eTRMHqzhJkSAYq5vNTokhDVTwckV8HPL XCCl6Mh15/52Bem0lF4A7cBXVD5/J6UKCZAf12Iy0SzuEo6VslS0+NAhRqvApfIfakuyWlrTWdh D6TDXgF+Cf5wPX9ILznEIL2ur1KZ5CBF1VmBVWB171nGkiqJ+MyQNcqimXWCATgXySTELf74zDv cdgA== X-Google-Smtp-Source: AFSGD/WFPZuz0Jy+2fBdQMY+6E43oy6b1AfXi4t4F5zVy3roKDNp8/S7i6aSifUS5gh8cU4y1cezcXu2rYWp6LgWz6G/Zw== X-Received: by 2002:a62:b21a:: with SMTP id x26mr1319020pfe.62.1543519737245; Thu, 29 Nov 2018 11:28:57 -0800 (PST) Date: Thu, 29 Nov 2018 11:28:10 -0800 In-Reply-To: <20181129192810.190769-1-matthewgarrett@google.com> Message-Id: <20181129192810.190769-3-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181129192810.190769-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog Subject: [PATCH V3 3/3] verifiers: Add TPM documentation From: Matthew Garrett To: grub-devel@gnu.org Cc: Matthew Garrett , 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::64a 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: Thu, 29 Nov 2018 19:29:02 -0000 Describe the behaviour of grub when the TPM module is in use. Signed-off-by: Matthew Garrett --- 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.20.0.rc0.387.gc7a69e6b6c-goog