Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fZlTV-00031X-7n for mharc-grub-devel@gnu.org; Sun, 01 Jul 2018 19:09:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZlTS-00030i-DI for grub-devel@gnu.org; Sun, 01 Jul 2018 19:09:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZlTP-0006YH-7k for grub-devel@gnu.org; Sun, 01 Jul 2018 19:09:42 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:34850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZlTP-0006Xa-2L for grub-devel@gnu.org; Sun, 01 Jul 2018 19:09:39 -0400 Received: by mail-qk0-x22d.google.com with SMTP id u21-v6so7810863qku.2 for ; Sun, 01 Jul 2018 16:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=X1ac7HdRbNtfNzwS8oJwqkOv5+q2ohD5Jx/q8qyuR1k=; b=ARbgVXRQ68n400yHSOcfeh52oAA8QUDAqVPgr3hZUw7mmlw41lNjXczU0c1e9GkhhU Jbjo56BRzgw58ynia/Xd5aX+lMmXbmZ98HYP2h1t+H0D5SKEkHsCsAWg6oHpP6pmtcup HMgtjyX+3X9K3oTlSFx0DLFPzPcb9XSJ/+M8AeIH8cXg2uAyaSKKUi6Q98NNCxTe0oOz KA7F6LHc/AwYCtx+yPnZBUVCzWzw6VYEqUUl9T4VNhIsI+GcAZKARIcE2DEUmda2Q2TQ +XWeBK7kLRQ2kYAr7XlR5jZum+ohIXjOG1LqppV1QHAVAnKmlI4NkaFPaciySC0fDSpf NarA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=X1ac7HdRbNtfNzwS8oJwqkOv5+q2ohD5Jx/q8qyuR1k=; b=CsukN39qQ6EXdFKy9CK72i0KkE2vQgbE60AoZMJmct9QrgHaqTo0efvfiTLbiWSqP/ hxm7CMwFrDN0Uw1HfJ/JrCiLprSj980jnkQ02GU1Zuv9m7lTNhqwQxneoxE4aqcOfMi4 GS/3XJ6yoVGv8f1Ghy7PuSmHvNZkEdk/wj0LBgPn9cAmatpjNE0/AbwFMOczD3zrW9Uj vYpN/rYsVe4MjlV0WA5uv71c+LaSi86f6vSCCQfQyiQNeBFTPZ9aSYX8Ci7Pst44dvG0 FgA+WUTeizxPLW8Ousd6SmFX6GqP6Rzmo5frasgqcqPrzRL/Zfril7vik8eEcfH19vEE ORRw== X-Gm-Message-State: APt69E1b950gd4SA1g9yGIVHK29QULQz5VlqbSLGnhZHbYLRMlVEPRk2 cg84wHVcHud5kcUuIO0UykxKL+e5 X-Google-Smtp-Source: AAOMgpcWNLPryrMEmyOgRGPo8LjXokWOdE3FPAir10XTWFTEdn5GpxNzrZCW1wMNNEwcJvm/CiIE9g== X-Received: by 2002:ae9:eb88:: with SMTP id b130-v6mr9338595qkg.272.1530486578287; Sun, 01 Jul 2018 16:09:38 -0700 (PDT) Received: from [10.10.1.4] (c-73-201-91-123.hsd1.de.comcast.net. [73.201.91.123]) by smtp.gmail.com with ESMTPSA id n186-v6sm5889425qkf.81.2018.07.01.16.09.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jul 2018 16:09:37 -0700 (PDT) To: grub-devel@gnu.org From: "Daniel P. Smith" Subject: TPM support within Grub2 Message-ID: Date: Sun, 1 Jul 2018 19:09:30 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22d 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: Sun, 01 Jul 2018 23:09:43 -0000 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