Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EABE2C4320A for ; Wed, 28 Jul 2021 17:37:25 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08DF06108C for ; Wed, 28 Jul 2021 17:37:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 08DF06108C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B6E282C88; Wed, 28 Jul 2021 19:37:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="bNlDhuql"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 416B082D1C; Wed, 28 Jul 2021 19:37:21 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB21282C84 for ; Wed, 28 Jul 2021 19:37:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x735.google.com with SMTP id az7so3022982qkb.5 for ; Wed, 28 Jul 2021 10:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MEUfXHkI8y0SfBgIN+eIJtFn+eHHQDohdNNixncGWKo=; b=bNlDhuqlUs4iqP/opkw5G1/QjFlFXFQRzBDdNJiHO2k/JlXt49bMdEuCDemGVfscl4 2FVwk3EJxuMb03EKj2p4R5eO2pgulekrHxjr3ZjGo5Phm/tcZsa63dlxdrSJb8mXLFEK f2+Bv8iMxezR9ssOnhpqNut1+j0E1sHP5IxZw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MEUfXHkI8y0SfBgIN+eIJtFn+eHHQDohdNNixncGWKo=; b=NlvSXVy0YE7deyZkW6sGilAnay+Uq2E5e7zOMLmOM5XeZfwrWv4Rbhcw2a5rXnqXrE hcwU/JbmfQSy0BlcPBi4BqpmKkrXcZRdiv+B6n/ztQ/2op4dPktH2Lw14MkgKzKq1Ly1 lG00/Ihi0p1Sc4Y0/TwFdrMopUmhkYPHpz/vkqtAXWAZPbUfGh9gILHR0Cf1xmQ7JD/g JL2AQvLj9YcMvOisTVaUM4Lxq8p1HEjM/rhvtLb2CghnQajvGG1EIHIPA3+6E1HWroUW G7PP7PgQJ7L7AkEQsRQ6ZZN+Z9OxLTxkC1Sm+qFduJ5liG/60cP98fiXXdRzLhFCca5n Scgw== X-Gm-Message-State: AOAM533+dlNnYdqEsJ6iOUQd0miEXkoVElUBi0V0gBobq1mIkyIHyTMJ CTiRI7qy5qaQdfUJo6qC9tSsmNDCeWHFLw== X-Google-Smtp-Source: ABdhPJz+PBgBxczQCBNEF0Xi/oVjUhuLNg3KHIAa6cY1e1mcBNyhikxKaeZgG4JpduA1pcwzUBi9Jw== X-Received: by 2002:a05:620a:15b:: with SMTP id e27mr849142qkn.488.1627493836423; Wed, 28 Jul 2021 10:37:16 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-3037-3a3d-435c-0707.res6.spectrum.com. [2603:6081:7b01:cbda:3037:3a3d:435c:707]) by smtp.gmail.com with ESMTPSA id f15sm215804qtv.60.2021.07.28.10.37.15 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jul 2021 10:37:15 -0700 (PDT) Date: Wed, 28 Jul 2021 13:37:13 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List Subject: Re: [PATCH v3 0/7] vpl: Introduce a verifying program loader Message-ID: <20210728173713.GT9379@bill-the-cat> References: <20210712021919.3409934-1-sjg@chromium.org> <20210728143507.GK9379@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aiR0qAUbq5guI9UR" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --aiR0qAUbq5guI9UR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2021 at 09:33:56AM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 28 Jul 2021 at 08:35, Tom Rini wrote: > > > > On Tue, Jul 27, 2021 at 10:20:49AM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Sun, 11 Jul 2021 at 20:19, Simon Glass wrote: > > > > > > > > U-Boot provides a verified-boot feature based around FIT, but there= is > > > > no standard way of implementing it for a board. At present the vari= ous > > > > required pieces must be built up separately, to produce a working > > > > implementation. In particular, there is no built-in support for sel= ecting > > > > A/B boot or recovery mode. > > > > > > > > This series introduces VPL, a verified program loader. Its purpose = is to > > > > run the verified-boot process and decide which SPL binary should be= run. > > > > Adding VPL into the boot flow provides a standard way of implementi= ng > > > > verified boot. So far, only the phase itself is added along with so= me > > > > Kconfig options. The next step is to create a build for sandbox. > > > > > > > > Changes in v3: > > > > - Move VPL Kconfig options to a separate patch > > > > - Add full build support for VPL > > > > > > > > Changes in v2: > > > > - Add some more VPL Kconfig options > > > > > > > > Simon Glass (7): > > > > doc: Convert SPL documentation to ReST > > > > doc: Expand SPL docs to explain the phase and config > > > > test: Tidy up test building with SPL > > > > spl: Move TPL_HASH_SUPPORT down next to other TPL options > > > > binman: Add VPL support > > > > Introduce Verifying Program Loader (VPL) > > > > vpl: Add Kconfig options for VPL > > > > > > Any thoughts on this one? I have a few updates so can send a rebase v4 > > > if that helps. > > > > Perhaps some of these general questions would be answered with seeing an > > implementation for not just sandbox, but real hardware too. But I'm > > missing what this provides exactly that we can't do already, or that > > would justify a whole new stage rather than just some updates within > > existing logic. What is this doing over SPL_FIT_SIGNATURE for example? > > Checking in with a TPM to confirm good measurements? Having written > > that out, now I really do want to see this implemented on real hardware > > much more so than sandbox. >=20 > Yes it was actually implemented on coral, an x86 Chromebook which is > in-tree. I have various patches to come but the docs are at [1] >=20 > The core reason for it is that SPL sets up SDRAM (and perhaps other > things) so needs to be updateable, so we cannot boot the vboot logic > in SPL. TPL often has very small size limits so it is difficult to put > it in there. I am thinking that VPL can be an optional phase used only > if verified boot is enabled. That makes it easy since it has a defined > purpose which can be enabled/disabled. >=20 > BTW in doing this I wonder whether we should look again at the > SPL_TPL_ Makefile variables. Do you think PHASE might be better? >=20 > Regards, > Simon >=20 > [1] https://github.com/sjg20/u-boot/blob/cros-2021.04/cros/doc/cros_coral= =2Erst There's always a "no updates before HERE" line to draw, as you need a fall-back option. Since you mention SDRAM, does that mean both TPL and VPL are running in SRAM/similar space? If so, why isn't this just part of TPL, for when you have "a lot" of pre-SDRAM memory to use? --=20 Tom --aiR0qAUbq5guI9UR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEBlckACgkQFHw5/5Y0 tyySiQv/ZflIga9kbmCbfMPUnyPVnguqtRf/97SDg05UlwNjRSwwQUSbQv36HaKm hj0lAqqw8ydR3/2SyhkjlG0BPmV8bRnYN3xSKfnhLmioGJ/mQJ1IuOAcR+35+B6S BSUHCknp0nStbfRTQPKqsFZBxBsKINa+VTCv/dYQ3fNhJ7l+z/ITarRauS6h0Kht 0Jz+E8ACnfvV1BL5/xuq6Hr09EJoPtheMFgcRWzY1YzPMNOH4t0ReOEo9EPxYvSN bebc7Ky9U7s0hKjRe5B7MxhoMCMLPof3aBPtMPMeuW1QAYpQPpuXk1Twsj2bq4tg u3jn9O7v6cOr9P7OLIkxgwooQgJuwOqVF4Mxp+vFkwY5oId9FEWb25USTUPVIuzb bMFmXPGyS11aN0XNdNyg7N9lVGJ778q6xGZhXnPsczB2towgSrpjHYfs8nT37Q0z KzlBB98KNrTYpYD5toOzivxKZcjz9pgPnSkPuzouKi9hIEpoY5JPPBF5YOfuRQ6X Osk0SfTC =FcOD -----END PGP SIGNATURE----- --aiR0qAUbq5guI9UR--