Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fa1nL-0005uE-Rn for mharc-grub-devel@gnu.org; Mon, 02 Jul 2018 12:35:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fa1nI-0005s1-S1 for grub-devel@gnu.org; Mon, 02 Jul 2018 12:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fa1nF-0003qG-Oq for grub-devel@gnu.org; Mon, 02 Jul 2018 12:35:16 -0400 Received: from boksu.net-space.pl ([185.15.1.105]:38518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1fa1nF-0003ow-CS for grub-devel@gnu.org; Mon, 02 Jul 2018 12:35:13 -0400 Received: (from localhost user: 'dkiper' uid#4000 fake: STDIN (dkiper@boksu.net-space.pl)) by router-fw-old.local.net-space.pl id S1848252AbeGBQfI (ORCPT ); Mon, 2 Jul 2018 18:35:08 +0200 Date: Mon, 2 Jul 2018 18:35:08 +0200 From: Daniel Kiper To: dpsmith.dev@gmail.com Cc: daniel.kiper@oracle.com, eric.snowberg@oracle.com, javierm@redhat.com, kanth.ghatraju@oracle.com, keng-yu.lin@hpe.com, konrad.wilk@oracle.com, leif.lindholm@linaro.org, mjg59@srcf.ucam.org, phcoder@gmail.com, philip.b.tricca@intel.com, ross.philipson@oracle.com, grub-devel@gnu.org Subject: Re: TPM support within Grub2 Message-ID: <20180702163508.GC1111@router-fw-old.local.net-space.pl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.15.1.105 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: Mon, 02 Jul 2018 16:35:18 -0000 Hi Daniel, On Sun, Jul 01, 2018 at 07:09:30PM -0400, Daniel P. Smith wrote: > Greetings, > > I have a measured boot implementation I have been working on that > introduces a DRTM relocator that I would like to eventually upstream. > This work does rely on the ability to access a TPM 1.2 chip from within > Grub2. I am aware of Matthew Garrett's pending patch to add core TPM > support[1] but that is limited to UEFI environments. My target > environment uses Coreboot with the TCG BIOS payload to launch the > environment. For TPM support I am using code picked out of the > TrustedGRUB2 fork[2]. As a precursor to upstreaming my DRTM relocator, I > would like to see if I could find a way to generically introduce TPM > support into Grub2 that support's Matthew's UEFI backend, TrustedGrub2's > TPM 1.2 raw I/O, as well as leave a path for TPM2 raw I/O. In both > implementations TPM support is include as an x86 device when in fact > they can also be found in ARM devices, which is on my wish list of > future devices I would like to support. With all of this in mind, I > wanted to open a discussion on the best way to implement generic TPM > support. In Matthew's approach TPM is implemented under > grub-core/commands while TrustedGRUB2 is split between grub-core/kern > and grub-core/tpm. IMHO TPM functionality should be divided into HW > interfaces, TPM command processing, and higher order TPM operations. If > the logic was segmented in this manner, what are other's opinions on > where segments of logic should reside within the Grub2 source tree? > > > [1] http://lists.gnu.org/archive/html/grub-devel/2017-07/msg00005.html > [2] https://github.com/Rohde-Schwarz-Cybersecurity/TrustedGRUB2 This comes just in time. I am back from vacation and I am going to revisit the issue (including the verifiers framework). I will take deeper dive in it probably at the end of this week or at the beginning of next one after clearing my backlog. In meantime I am CC-ing guys who may be interested in that project too. Stay tuned... Daniel