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 62939FA3741 for ; Mon, 31 Oct 2022 19:37:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDBF785183; Mon, 31 Oct 2022 20:37:26 +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="hcTVL0MW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 456FA8542F; Mon, 31 Oct 2022 20:37:25 +0100 (CET) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 16DF481273 for ; Mon, 31 Oct 2022 20:37:22 +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-x72c.google.com with SMTP id k4so5376452qkj.8 for ; Mon, 31 Oct 2022 12:37:22 -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=ilMGcdJYV/jwhYu9nKMyGD9Ms6V9S3zpb+PhPNUJDDM=; b=hcTVL0MW2FtEQ3uM9SbMup4k/VIB69xLyMaG1BbclE5bvSg0hzROBoXg1UBqVBhmoB x2LQ+JynDPxjm8ER8uh5joZuDixRB2kSRIi3xonbVm3r/DP2xa0eyvo7a+mxH3bGvi04 v9McUqoGhroI6ypT7CZKmCnnSAEMe2vRiQLAY= 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=ilMGcdJYV/jwhYu9nKMyGD9Ms6V9S3zpb+PhPNUJDDM=; b=PPQOA2qhVquAM4YKRlxFZEgvkN5qcEXXM7o00ryLcCEqRPNddWRRyth0uqUZGGqoni zPBbfJbf6eLZBAcOkgGDowpfJrI+WAT0y2d/dOMavT3jxv6xnYudDbGiI2XP+wo81vee H16N/QxGL3srDebUWMLLVow+3zwR0DBGq2SgGeoFReWOTeOvZRcIlVLZLAGiLchhGXJ/ Fb9ACBZGhVCYYp0LLKERYmVgPN7BW3vIVrZdOcKrQxMDu41yvCCsVSV46xeQe8ayIiaN Ty32tnqHKbDg31egVOvgEpZph/lrR6o8GxoR7FUXU4TfXl6OKn8MYhIRuh9h7PW2Pyrr GGfw== X-Gm-Message-State: ACrzQf1MtZHfx9bJcYXZ8gg3spVPS0QDrEM9iWCjhOlnMw67zk6Iicda 34T1jNYgeyQcWDtF9AmYE6xYbwoGj8XKhA== X-Google-Smtp-Source: AMsMyM5ZDWf5VPgwHWb439DVMKFcC+6KvCUy/lINjNk9tkj00bzSsj2TEFm2yGbrHhsUCDOIOEW/hA== X-Received: by 2002:a37:444b:0:b0:6fa:2fc6:59e2 with SMTP id r72-20020a37444b000000b006fa2fc659e2mr4340923qka.541.1667245040842; Mon, 31 Oct 2022 12:37:20 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-a99c-5518-8022-ee24.res6.spectrum.com. [2603:6081:7b00:6400:a99c:5518:8022:ee24]) by smtp.gmail.com with ESMTPSA id h4-20020a05620a284400b006b615cd8c13sm5139740qkp.106.2022.10.31.12.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 12:37:20 -0700 (PDT) Date: Mon, 31 Oct 2022 15:37:18 -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: <20221031193718.GY2116612@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> <20221030143958.GF2116612@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eHrxbAcqt/LxKPZN" 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 --eHrxbAcqt/LxKPZN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 31, 2022 at 01:27:08PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Sun, 30 Oct 2022 at 08:40, Tom Rini wrote: > > > > On Sat, Oct 29, 2022 at 07:44:00PM -0600, Simon Glass wrote: > > > Hi Sean, > > > > > > On Fri, 21 Oct 2022 at 15:04, Sean Anderson = wrote: > > > > > > > > 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" (= which has its > > > > >> own problems). This is because if such a key is absent, signatur= es are > > > > >> verified but not required. It is assumed that configuration node= s will > > > > >> 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 th= e same > > > > >> syntax as the bootm command (helpfully provided for us by fit_pa= rse_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. `so= urce > > > > >> $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). > > > > >> > > > > >> [1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dba= a9eeded@prevas.dk/ > > > > >> [2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f8= 9005fdd@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 '"' '**.p= y'`, > > > > 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 somethi= ng > > > > to checkpatch. > > > > > > Well we use PEP8, with single quotes used for nearly everything. The > > > exceptions are the one I mentioned, and module/function comments. > > > > > > 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 > Yes this is pylint and we do already use it, but not in patman so far. > It would be a good thing to add. I'd start by trying to put it in checkpatch.pl and seeing if upstream is interested, the kernel has a bunch of python tools too these days. --=20 Tom --eHrxbAcqt/LxKPZN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNgI+sACgkQFHw5/5Y0 tyzk0Qv9Hie6UwwtsKOwfkRuuOsh1Mhpwzjyk0fxngCzkJpJf7WVXHhJkOPO3wSG XUMWA2pwjlVODUdQpOrrHL/ds0QN+xJ1sAdjfibYtxf/LcohqRCScKymtAz2EMQg 1XvLzNtScULgzriyhlxb/5gRsr7W6UC4CVwQrH8MJUsI5AKa2LeuwuPgKZ4ixhok qEy0irjxZRl5rEukYyOKRRZaOBjLwUgHlT8T9QIqvesISjVuZmJUcXgTWrv+TaGx geW4ox3lcX22LkZpnIrnvE8pRw0yBNqy8Xwiu79tYlA5v43aDRpJ0VHs23+6cXO3 NC5vR5vSx5owW870a8PO61icv3to+/cfoq3SyG1S4cBE3ds9yGUHa7Fuw9C4CrXK icKMsOGDkvYeua/VffFfgl6E3WkrqeuYWqWL/KC9aQd7jl1GAuELDWeUW4OpWISv 4RgQAEFhy8bt7BOdNb9sso3g3ccB5JiHYmIxCbVuyNs5xa/S2pxclDghR8wTuBBT fPGb19rr =SqWT -----END PGP SIGNATURE----- --eHrxbAcqt/LxKPZN--