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 A3203C38A02 for ; Sun, 30 Oct 2022 14:40:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D5EDC80A55; Sun, 30 Oct 2022 15:40:06 +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="IXF6hBky"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A1E2384C47; Sun, 30 Oct 2022 15:40:05 +0100 (CET) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (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 24EC1806E5 for ; Sun, 30 Oct 2022 15:40:02 +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-qk1-x72a.google.com with SMTP id i9so3503434qki.10 for ; Sun, 30 Oct 2022 07:40:02 -0700 (PDT) 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=rQRwne27zvfxQwia0BVPJBCr/vqYJH17jt9/9RIrhxc=; b=IXF6hBkyTkLCoHDsQTUhGDhYTD0zJ38AGcwJ8y2rVvLDXT0tVRAkrRAPKAW3cGW999 lE6+PWDLZTWS8mJ/PH3uH3txL/REtCzFpZxgmEgOza7fPq215wGjxyJZsmlb8ePx2YtM qLQwAlvlC+5RJEWj8Ci6DQ5/WuChsF56Vh/hY= 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=rQRwne27zvfxQwia0BVPJBCr/vqYJH17jt9/9RIrhxc=; b=CMkMFDJDA4Gt2FAJQSrTOPrA4LE6szBQx8sae5iVEWB2ISMaGI+HFBUETCfdzJstAa LwLYKr3E9jm/4cw3lEwgYZVSEd5c/IvVTn7zifaRJojuAX/aRJeEQIQsdE1udrRUHHqV nhMeiqM6qMZbUMuyeFsB2vGgqTT1qPUkCSjcyHK3YW00o7n+HKDXBsmkNnI4eUg79oQa 1fpg0f40xY2Wo7xgBWDAfvHq3QUQPn/VGgvnKoCydOu8cxHk1YxVm28Bex6O3TDsoHIE sAWWyp8bJLqkqEZUr9qWGcGlWusGuO//LRaeVTpRpWeYN8dh5d+mg0LzverhVvzf+CRX 9OBg== X-Gm-Message-State: ACrzQf3KC5nL7kp5E5b4vwekHd6dqjeksQzixWCCkwLCYjKJcsCZBoa8 7vtuWZvxEPlTv2XgSB1WmGscJHrY/X+M7Q== X-Google-Smtp-Source: AMsMyM4nSF4XJbF05CQhDF7cbeEn2RnG5nAudSfZyl5VlQUwDEHeXkkRBeurC5EPDzg+6jNw/f/b3g== X-Received: by 2002:a05:620a:1901:b0:6f8:400c:3c4e with SMTP id bj1-20020a05620a190100b006f8400c3c4emr6054579qkb.80.1667140800863; Sun, 30 Oct 2022 07:40:00 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-acfc-4557-ea52-251a.res6.spectrum.com. [2603:6081:7b00:6400:acfc:4557:ea52:251a]) by smtp.gmail.com with ESMTPSA id i9-20020ac85c09000000b0039cba52974fsm2268839qti.94.2022.10.30.07.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 07:40:00 -0700 (PDT) Date: Sun, 30 Oct 2022 10:39:58 -0400 From: Tom Rini To: Simon Glass Cc: Sean Anderson , u-boot@lists.denx.de, Rasmus Villemoes Subject: Re: [PATCH v2 4/4] cmd: source: Support specifying config name Message-ID: <20221030143958.GF2116612@bill-the-cat> References: <20221020192404.2500251-1-sean.anderson@seco.com> <20221020192404.2500251-5-sean.anderson@seco.com> <7825e209-c14d-74ff-4ebf-973d99f896fc@seco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ILuaRSyQpoVaJ1HG" Content-Disposition: inline In-Reply-To: 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 --ILuaRSyQpoVaJ1HG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 29, 2022 at 07:44:00PM -0600, Simon Glass wrote: > Hi Sean, >=20 > On Fri, 21 Oct 2022 at 15:04, Sean Anderson wrot= e: > > > > On 10/21/22 4:17 PM, Simon Glass wrote: > > > On Thu, 20 Oct 2022 at 13:24, 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" (whic= h has its > > >> own problems). This is because if such a key is absent, signatures a= re > > >> verified but not required. It is assumed that configuration nodes wi= ll > > >> provide the signature. Because the source command does not use > > >> configurations to determine the image to source, effectively no > > >> verification takes place. > > >> > > >> To address this, allow specifying configuration nodes. We use the sa= me > > >> 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 ima= ge. To > > >> force using a config, # must be present in the command (e.g. `source > > >> $loadaddr#my-conf`). For convenience, the config may be omitted, jus= t like > > >> the address may be (e.g. `source \#`). This also works for images > > >> (`source \:` behaves exactly like `source` currently does). > > >> > > >> [1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dbaa9ee= ded@prevas.dk/ > > >> [2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f89005= fdd@gmail.com/ > > >> > > >> Signed-off-by: Sean Anderson > > >> --- > > >> > > >> (no changes since v1) > > >> > > >> .../cmd_stm32prog/cmd_stm32prog.c | 2 +- > > >> boot/bootmeth_script.c | 2 +- > > >> cmd/source.c | 73 +++++++++++++---= --- > > >> doc/uImage.FIT/source_file_format.txt | 3 + > > >> drivers/usb/gadget/f_sdp.c | 2 +- > > >> include/image.h | 19 +++-- > > >> test/py/tests/test_source.py | 11 ++- > > >> 7 files changed, 82 insertions(+), 30 deletions(-) > > > > > > Reviewed-by: Simon Glass > > > > > > But please use single quotes in Python. Double quotes should only be > > > used when the string includes single quotes. > > > > > > > Do we have a style guide for python? Judging by `git grep '"' '**.py'`, > > double quoting is endemic. IMO single quotes should be used for > > identifiers (or things which would be enums in C), and double quotes > > elsewhere. But if you want to go the other way, perhaps add something > > to checkpatch. >=20 > Well we use PEP8, with single quotes used for nearly everything. The > exceptions are the one I mentioned, and module/function comments. >=20 > Do we use checkpatch for Python? Is there a standard python PEP8 checking tool? We should see if upstream is interested in a flag or similar to call another tool for python linting. --=20 Tom --ILuaRSyQpoVaJ1HG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNejLoACgkQFHw5/5Y0 tyzbsQwAsixmB7+2y8BhehoDPx/qSPKFJ+minTh+Fm77MidvjlV4/2e2Jhg0hKX6 3d3jjst6Pn8k1kXv5YOcT6uz9761gBFB71TTWdI8qWJrxqVwxeHGryMbS0A7Z7Os 0VN5DZzGkRIJPCbUfw5KTMGZQIzE0zlvrLlEx91f8x2otX13rSLF915YP7V3beoa /zYpUMnW8mI84p+i79Fz4t/kcOraxUVZMexfs2RipQd3PSViE0bkl03FLfBDxSv7 dDCly3g6Jv7OaH5Qce1tbHrrnIQgIfvB0Op28WdLRQyOuvnHF9IQpbEEjL8YUKoL CeQUgS7Vl0HQLAIK8DFp8qQ61CmXQSMOLPevrDlu3BMOlp8jZVjHsnLdL0j5Zjnj Vatu0s3xK/zOnhMU+GRgjWExc4AiGdnUimSIHY8ml2UQoroSH4jUD1fnBJMpqKQY vEiD60+HENmgM5ZXqN64qRSLNxcJ5bcFkFGGdrvNQsjLUjGyNyOqSOTEaPttFzN/ Hp5xALNX =gDSx -----END PGP SIGNATURE----- --ILuaRSyQpoVaJ1HG--