Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gLGYC-0002oJ-7P for mharc-grub-devel@gnu.org; Fri, 09 Nov 2018 18:50:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <3Wx3mWw4KChQ6uDD1yG0uBByDD08805y.w860BEv-xyFy507E.8B0@flex--matthewgarrett.bounces.google.com>) id 1gLGYA-0002nJ-KK for grub-devel@gnu.org; Fri, 09 Nov 2018 18:50:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <3Wx3mWw4KChQ6uDD1yG0uBByDD08805y.w860BEv-xyFy507E.8B0@flex--matthewgarrett.bounces.google.com>) id 1gLGY9-0003Ra-27 for grub-devel@gnu.org; Fri, 09 Nov 2018 18:50:54 -0500 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]:39018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <3Wx3mWw4KChQ6uDD1yG0uBByDD08805y.w860BEv-xyFy507E.8B0@flex--matthewgarrett.bounces.google.com>) id 1gLGY8-0003Pg-TT for grub-devel@gnu.org; Fri, 09 Nov 2018 18:50:52 -0500 Received: by mail-qk1-x74a.google.com with SMTP id d196so6998406qkb.6 for ; Fri, 09 Nov 2018 15:50:52 -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=Fug1UrYk7Y9urbQusNZ2Z9Yzs78HCR5U0TrijakxcECgPMyw71+BydtmRP2Bp68JOH Z6CtqqMIKrslTK5qyE1DRw/3gngjUaffhXQ7nJIScVTXlJU6cv5ayc7MX+eNyn0sH1vn Upv0ZrdTM3x1+aZE4BB+Ec3oLpN6ShG4K5mgTWf4bxZOT7h9sCq8bYcNFZsxFPihgVS6 Cu1lRYRAPiMfLw/pehUzpB6JUWOIv0dA6ikS43vL47NSa4UPgM0euUbrk75VBrqWDnLs Xq0w8HUpty4bx9i1G8jMK68eA5mAm9g4dMzX3IrvZnM7XnFa/NwZIC1Dqfo8xpHRk6On b7EQ== 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=Pg3wb8CKD26hyqHL8ZxPafEGhY59Sl9Ons1sguaHT6ZarWm9qzPzjj6JwV5yJ7/xtv 0dM49VXDF56kOQ1hesrFFVhY+oqHrmZJHIDGKQMWf2UCrLzRS5Rr2IYRno5Hxa/CNCCg Oi98uwjGWRDZrcR+dRzS7XdwIPZ9BeKejmyPk+YS8u4mXZvWDem/Ev0MELAvI3FEj6fo Gpcp7+fLQW3Nu13KQLg+yldOnz/n7fNVT+MFXwgOjpMd0BVMT4eFPPgchdNd9tQqY8vs RpMf+h99pMgDfaevh5TD8i1F2l7wAtnDEN4OyO9uc5qoIz43cqsof0OfmszbpgBIwhxk WYZQ== X-Gm-Message-State: AGRZ1gKQo0g3MvHEkrYhzzyE7yjddm+yNv2cpWG5L2wqQb/1NWzrsDjt 785X363QuZSZrFj8eRcnwNpg0H4yZ8CO0RmGQBt9g5Mul59MqnuCl6i2zuBWYgPXlY6e9T0HQKK a8xYzOC5rHgrB8TCEOjo+baK0kQr7MV6qSgIBvWw2bziJoMBg3PxaZ0cMy30HZNe2lYljeuRKQY 7RVA== X-Google-Smtp-Source: AJdET5dotm9yfts5Ndnw04mabd5hZOATYrfbn3H2rXbU9IuIMt/I9gITosSCzB3ws35Z8v8XpDzHC8Ch1VnXx8iEBi4L/g== X-Received: by 2002:a0c:c701:: with SMTP id w1mr7128180qvi.46.1541807451890; Fri, 09 Nov 2018 15:50:51 -0800 (PST) Date: Fri, 9 Nov 2018 15:50:43 -0800 In-Reply-To: <20181109235043.212182-1-matthewgarrett@google.com> Message-Id: <20181109235043.212182-3-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181109235043.212182-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::74a 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:50:55 -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