Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gN4XN-0006P1-LL for mharc-grub-devel@gnu.org; Wed, 14 Nov 2018 18:25:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <34K7sWw4KCtUD1KK85N71II5KK7FF7C5.3FD7IL2-45M5C7EL.FI7@flex--matthewgarrett.bounces.google.com>) id 1gN4XL-0006Ng-AB for grub-devel@gnu.org; Wed, 14 Nov 2018 18:25:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <34K7sWw4KCtUD1KK85N71II5KK7FF7C5.3FD7IL2-45M5C7EL.FI7@flex--matthewgarrett.bounces.google.com>) id 1gN4XJ-00034N-N7 for grub-devel@gnu.org; Wed, 14 Nov 2018 18:25:31 -0500 Received: from mail-qk1-x749.google.com ([2607:f8b0:4864:20::749]:52564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <34K7sWw4KCtUD1KK85N71II5KK7FF7C5.3FD7IL2-45M5C7EL.FI7@flex--matthewgarrett.bounces.google.com>) id 1gN4XD-0002ye-Da for grub-devel@gnu.org; Wed, 14 Nov 2018 18:25:24 -0500 Received: by mail-qk1-x749.google.com with SMTP id 92so41315699qkx.19 for ; Wed, 14 Nov 2018 15:25:20 -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=0SVapKnri+URse7bcR/ZnpJ9+dZiV+2L7S3lR6S11yM=; b=FWp6xX426Y2mo3HeOaAAQXCETXOgjT+Hz7fTi/7XgBonSk6J72pQJMZSrWdmpp64QJ Y12m+Hl7qaSFElNfGkqQ4xz9pYWSq0TzNskBV7VVYJPl3k1Ixx+JNuQm7nLXHzXTDZH5 KJAIysn14ibmNDF+y5tI7ckQrF/IRJlE7HVh7ZIfL3t0MGknmi287whnlHyDHiWBNbeh WykH1dfAXCj44xr1TsKWO/culVSn5B8/X2T3Lw0HbsYsb6UjWZu+VXwF6XaQwmKxUAKM hXPrfrDPjqpNLiDE7AousxqEwDloRbv9AYm7AdNZHLNUzPgPAAHvsd2Zw818zdgMFbUp qkKw== 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=0SVapKnri+URse7bcR/ZnpJ9+dZiV+2L7S3lR6S11yM=; b=CrMV+HwPUgvFuNtt8UhdWaYEZjCv7x66ojZoDGZdMQ/17XCYp/wLYIhFrJRPu8OHnW BoM1GCojlmrdEGSbVCIDh3/cGMj+RYeIOD+VLq0zYpDwk1MhpyIygcQiVVesq8Vb+JoY TPVZ7H4AsbUav3mbdgicW6i54Go9bnjSJTLj9QxxLHlFCU0+Rr3Q05ARRHxkDNKOOOAw QfzHygSiq5cHhAdxy8lvCglZi4NI37y5qgufi9x4Z5Fns84i77B6NEfmWdXeKvg8KDak dhN6QWlTj+unriY8ca/XrEIvqYEPeQPfgQnsIBA7MZqehcC7zD8cNLJbZ6lU4vRj4n27 PKUA== X-Gm-Message-State: AGRZ1gIm8AQX4Ih59+uDLEzc07MhcNso6N5IQQVcWfZdaYK5o4IwyazR R3IQb4VjIWBncwDu9n5039z4lPE9zZPlc6LKlO/GnfwtzbOcATvJAffwDrSdiNks0EmzR1Kku01 M2pFvOe1ZqACmS+eiGNDMdu3F5kT8XAIz/Fk91kq9BtpqXtxbFOuu4J23mVteRifgj/B7p/6R30 wY8g== X-Google-Smtp-Source: AJdET5fPBkoqAEpZ4UI+qOVjBbU4hHtYBSXpYQlXTwXxuBt2tEfoqu2cj5RvAjKyNjzpfARUGNC8Ydx0QGHyf0JQ5YXUUg== X-Received: by 2002:ac8:3270:: with SMTP id y45mr2556251qta.26.1542237920124; Wed, 14 Nov 2018 15:25:20 -0800 (PST) Date: Wed, 14 Nov 2018 15:24:54 -0800 In-Reply-To: <20181114232454.45350-1-matthewgarrett@google.com> Message-Id: <20181114232454.45350-3-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181114232454.45350-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [PATCH V2 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::749 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: Wed, 14 Nov 2018 23:25:32 -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.19.1.930.g4563a0d9d0-goog