From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C70C3C433F5 for ; Thu, 7 Oct 2021 18:30:59 +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 1B51061040 for ; Thu, 7 Oct 2021 18:30:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1B51061040 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 E0BB48344B; Thu, 7 Oct 2021 20:30:55 +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="IrFBmiD2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A15C48344B; Thu, 7 Oct 2021 20:30:53 +0200 (CEST) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (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 9F30383359 for ; Thu, 7 Oct 2021 20:30:49 +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-qv1-xf2b.google.com with SMTP id z3so4773476qvl.9 for ; Thu, 07 Oct 2021 11:30:49 -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=Hv8InMeNG/erfNMosX7+hsjF2IwU7UosoX8+CfCnJgI=; b=IrFBmiD2lInX8uKAAmap9I+0p25GRnjiS06IBlakCBikGQV5yzRBzJgUzJ1sg+eePP tu9zJCu9pkVbc0eK2pqWwcIR6sm+B8y+WRnv2EmEf8PW+csi/8iApDS8ZnquN3asNfcd Z0d5TjfVxYeJi+ON8HzRsJ2m8DsO13y1emCDg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Hv8InMeNG/erfNMosX7+hsjF2IwU7UosoX8+CfCnJgI=; b=foJuzzxa0Ov2u/4a5l/WEiubLVsraXl3WYL7t7WFyBefYyU5vyVBKry/FXBJwx0w+Y qMbpMfMXfL3LQ0JPCq/VmyxxmeRQY59Q90MC7tPd5aioP7iF8RJ8OhUvyRBF0yEL0sfP iJxlZ9fgcYgp77iW0jXgE8gXWHkDxn18gDED6VDqfVEHLunZsnOdj6BuRfqe0pqHt8st ZYX3QpLLZfE28WBqtNMJcdK8vyczFyJM3mhdEhpLn/DKMb+PY0/IGV43VkebSwmeX2L8 EiDbhSDpE+QJvmzVckeyyvfpss7yNQs5ku8XqtyAbr+cNNZVy87ZRLf2QgLgvC0P9nOr bSig== X-Gm-Message-State: AOAM533DCmTVHYJxbw/BYxzppfH01r8+wOEAm825dnzHtYm7sdQ9YFF9 +sTy9Y0DMRFSQwb1usi3lIzMhA== X-Google-Smtp-Source: ABdhPJy8RJMPnLspeqF3CQ9teUYhx12PI3smKEipMAw/ewCUYFqZzpluxOojJU9DNNMPMta549B4EQ== X-Received: by 2002:a0c:aa51:: with SMTP id e17mr5656996qvb.50.1633631448351; Thu, 07 Oct 2021 11:30:48 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-111d-c769-9689-befa.res6.spectrum.com. [2603:6081:7b01:cbda:111d:c769:9689:befa]) by smtp.gmail.com with ESMTPSA id o202sm149142qke.51.2021.10.07.11.30.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Oct 2021 11:30:47 -0700 (PDT) Date: Thu, 7 Oct 2021 14:30:45 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Alexandru Gagniuc , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Masahiro Yamada Subject: Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED() Message-ID: <20211007183045.GV31748@bill-the-cat> References: <20210926014342.127913-1-sjg@chromium.org> <20210926014342.127913-3-sjg@chromium.org> <20211007002647.GA11424@bill-the-cat> <20211007025226.GQ31748@bill-the-cat> <20211007134209.GS31748@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a3TncSl96O4908Bf" 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 --a3TncSl96O4908Bf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 07, 2021 at 12:02:24PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Thu, 7 Oct 2021 at 07:42, Tom Rini wrote: > > > > On Thu, Oct 07, 2021 at 07:32:04AM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Wed, 6 Oct 2021 at 20:52, Tom Rini wrote: > > > > > > > > On Wed, Oct 06, 2021 at 08:49:13PM -0600, Simon Glass wrote: > > > > > Hi Tom, > > > > > > > > > > On Wed, 6 Oct 2021 at 18:26, Tom Rini wrote: > > > > > > > > > > > > On Sat, Sep 25, 2021 at 07:43:15PM -0600, Simon Glass wrote: > > > > > > > > > > > > > At present we must separately test for the host build for man= y options, > > > > > > > since we force them to be enabled. For example, CONFIG_FIT is= always > > > > > > > enabled in the host tools, even if CONFIG_FIT is not enabled = by the > > > > > > > board itself. > > > > > > > > > > > > > > It would be more convenient if we could use, for example, > > > > > > > CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building= for the > > > > > > > host. Add support for this. > > > > > > > > > > > > > > With this and the tools_build() function, we should be able t= o remove all > > > > > > > the #ifdefs currently needed in code that is build by tools a= nd targets. > > > > > > > > > > > > > > This will be even nicer when we move to using CONFIG(xxx) eve= rywhere, > > > > > > > since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff w= ill go away. > > > > > > > > > > > > > > Signed-off-by: Simon Glass > > > > > > > Suggested-by: Rasmus Villemoes #= b4f73886 > > > > > > > Reviewed-by: Alexandru Gagniuc > > > > > > > > > > > > The problem here is we don't include automati= cally > > > > > > when building host stuff, I believe. This is why doing this br= eaks > > > > > > test_mkimage_hashes for me on am335x_evm with: > > > > > > /tmp/.bm-work/am335x_evm/tools/mkimage -D -I dts -O dtb -i /tmp= /.bm-work/am335x_evm -f /home/trini/work/u-boot/u-boot/test/py/tests/vboot/= /hash-images.its /tmp/.bm-work/am335x_evm/test.fit > > > > > > *** stack smashing detected ***: terminated > > > > > > > > > > Oh dear, and no CI coverage. > > > > > > > > > > I was reluctant to include kconfig.h everywhere but perhaps that = is > > > > > the best approach. Will take a look ASAP. > > > > > > > > Maybe we need to think a bit harder too about how we structure > > > > intentionally shared code. > > > > > > > > Why not, for example, for these common algorithms, rely on typical > > > > system headers/libraries in the tooling, which means we validated U= -Boot > > > > vs common reference, rather than just our implementations? > > > > > > Do you mean we use openssl for sha1, for example? > > > > I guess, yes. Just flat out saying we require openssl for tools, and > > doing our best to not make compatibility with libressl difficult, seems > > likely to cause less headaches for people than what we already require > > in terms of Python. >=20 > I'm OK with that, although I do think the problem identified here > (CONFIG_SHA256 not enabled) is somewhat sideways from that. We already OK, I've taken what you posted on IRC and folded that in, continuing tests now. > use separate code paths to run hashing. Perhaps we could make it > optional? >=20 > What about those people that complain about crypto libraries on their sys= tems? I'm not sure how big a problem that really is, currently. I guess one thing would be to make a separate thread on it, and put it in the next -rc email as well, for people to explain why it would be a hardship. That in turn, I think, is coming down to modern vs very old openssl support, rather than having any at all. --=20 Tom --a3TncSl96O4908Bf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFfPM8ACgkQFHw5/5Y0 tywwpQwAiC4lkbemV2zuiBbuRhVRjYwM21PFfEadzbEo5806kZYexdvJRljGTZkk RgMNwDbDjnqSZsjnjTITT87I6cUXev1v4YHZC3hhfIho5oyqEMBeP9DVP23ftWsE Z/GCik9nZzzyfbyxBOqhRyViGGqOBWDcLL9WZwb7urKPOYNXAsTQ/rTyVqGVxECV qrQO49vNNkUn8WFbHfWY+XeSk+6hjRD5oxcp3ZZ3jycmiLBnZqrXxMWp/oqNpKZx aB6vBNlpELyPtzIDdG8o+6FmfgBDS6ryZFnLPiNMT9SD1MN0AoAxxshH5xv9sKjs QO4Uda6c0c4q3ErZDBs55bppELUDOdYqiUecQiMvJMsWFzK9Ihs1f2m89M1/VuPD Gx807Szn031KZJUDiWxeA2Lhe0/g7X4ekmULE6KGWF9GOl0WyUfermcpIIPN3seW /PaNMIB+x6d9gZDH9ZhDdKZUT6hrTV0VDfbAqE+8DdW2V4zfihOMD5ceUER870Ag bFQ6PtTR =sYsi -----END PGP SIGNATURE----- --a3TncSl96O4908Bf--