Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 78D3AC4167B for ; Mon, 12 Dec 2022 16:46:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 993F1853D1; Mon, 12 Dec 2022 17:46:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (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="kksLUBf+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F040C8542E; Mon, 12 Dec 2022 17:46:50 +0100 (CET) Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (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 0501F85207 for ; Mon, 12 Dec 2022 17:46:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-3b48b139b46so154472557b3.12 for ; Mon, 12 Dec 2022 08:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cRl3r3pRm9tnoMHEwllM3KeUV3o6YVZhMGOs4noqCIg=; b=kksLUBf+qezhBr4PTlPexSsM8KlqKEhH7NDSOJ+ad+Iwf6HOP8kW4OcTgI5m5NQKVG sGRxah2ZzgzlGU+lJbL5SEb8r+gJc0NSM4OmNLbcJETvHr5cnJZDCB9pfK9ep67uGv6a WGf4uYeTbIz9G1gLjMc2Y8MmoVGlgh0MInUEI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cRl3r3pRm9tnoMHEwllM3KeUV3o6YVZhMGOs4noqCIg=; b=JDnkSAhQdTXnBHsvuf+e/QruomwVXKiC8+TlttNdxw2E5BPJKLhQLywstaQmOPyh7T uew5jVCpTWH5e7ZFHxoEkfw3U66e8GLwgQ2oWjumalt6MQWWCixAqF2isB7KsioBKMVf aLND1jDkhd8rHBnVBfmNNLje/c+uV0E/Gw9rvHs+cYFHLbnoz8FvVhUGvXT+8MkTpoOG fPC4D08r3YiBWOdAL5xIfa1Q94Q4CjMaQHocO/9L3fzfsgdY8G4UrxggO0uGmex+cEyR w+jLqhqHjOSuFfTDk1u1nYzlIaFwamsTmrgbjZMxceJvvRr/RjDx0iKx5dEqahXBTei2 kTAQ== X-Gm-Message-State: ANoB5pkpqWzwTmN90dc/mPkZ9Y8UvjIeiHaQqvJnFS1+BcnOdLine8IS qHPELD1epE5c6XvQ9UytEp4BxA== X-Google-Smtp-Source: AA0mqf5vrKjgeRLJGNVoQ5lZ6ahSkw1pd+5v5wQ9N+yYaTdwrO7WSLrgsF+HuS3VZaN+wLsRSSJWAQ== X-Received: by 2002:a0d:dbc6:0:b0:370:45b6:e453 with SMTP id d189-20020a0ddbc6000000b0037045b6e453mr14871746ywe.39.1670863606692; Mon, 12 Dec 2022 08:46:46 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-8c5e-02dc-44a6-fa90.res6.spectrum.com. [2603:6081:7b00:6400:8c5e:2dc:44a6:fa90]) by smtp.gmail.com with ESMTPSA id i22-20020a05620a075600b006bb82221013sm6018455qki.0.2022.12.12.08.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 08:46:46 -0800 (PST) Date: Mon, 12 Dec 2022 11:46:44 -0500 From: Tom Rini To: Sean Anderson Cc: Simon Glass , u-boot@lists.denx.de, Rasmus Villemoes Subject: Re: [PATCH v3 4/4] cmd: source: Support specifying config name Message-ID: <20221212164644.GA1691404@bill-the-cat> References: <20221103213534.2336001-1-sean.anderson@seco.com> <20221103213534.2336001-5-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20221103213534.2336001-5-sean.anderson@seco.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 03, 2022 at 05:35:33PM -0400, Sean Anderson wrote: > As discussed previously [1,2], the source command is not safe to use with > verified boot unless there is a key with required =3D "images" (which has= its > own problems). This is because if such a key is absent, signatures are > verified but not required. It is assumed that configuration nodes will > provide the signature. Because the source command does not use > configurations to determine the image to source, effectively no > verification takes place. >=20 > To address this, allow specifying configuration nodes. We use the same > syntax as the bootm command (helpfully provided for us by fit_parse_conf). > By default, we first try the default config and then the default image. To > force using a config, # must be present in the command (e.g. `source > $loadaddr#my-conf`). For convenience, the config may be omitted, just like > the address may be (e.g. `source \#`). This also works for images > (`source \:` behaves exactly like `source` currently does). >=20 > [1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dbaa9eeded@p= revas.dk/ > [2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f89005fdd@g= mail.com/ >=20 > Signed-off-by: Sean Anderson > Reviewed-by: Simon Glass Currently, there's two problems. One, fit_conf_get_prop_node() should be called (I believe) with IH_PHASE_NONE, which I can do when applying. However, two, fit_config_verify() depends on CONFIG_IS_ENABLED(FIT_SIGNATURE) and I'm less immediately sure how to rework that in to this patch. Can you please rebase on top of current next? Thanks. --=20 Tom --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOXWvEACgkQFHw5/5Y0 tyyv7gv+LcauypaJPLRxgaGpj+BAREdGtZgyIP8+DctBedar53roG9qZQhBaNM7w Vel4l7s0+wiZey3ZhICgeIEcN/Oy8nmifN5o9klhAv191AEAw1Bc4Op+UhoUH6W3 wYL1eOLnRMLbZORKsiVgg9TEZJbOmsl8iU0GyRVIn7MKesKiNH2kPwoiPe+2ItiY 2N5N18xffmLHYBXysYZtu4eZMAe/v7jUrFi8WKjByF17Zkm+K/4NpIfUpec9B/Bc Giyej0IkOK4eLWTwuSgYOYQimtQIC2t6tlvXUt8TxKR21kOvQndMo5oFGHj3OP3Q HSOnxsVm0gUgmjIOTCG4Teu1TEVioBobtDBTyQRZWQwWymrU7vLVOaTXvb4+Krbx MvnIbPVhFIjwmE2E4wMPkr7Us1/dc/p19d0HLn4zu84YnpyEAnASO7AfT0WhendZ 7YJ6N/LlmsdDtl06j2/iPb6rcqTlCgVCRffS9MAx1KVBlLkkFb6JQOLbMJOtONb8 p7OCiSQg =9gd5 -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--