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 7BC44C433EF for ; Thu, 7 Oct 2021 19:39:57 +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 ABA62610C8 for ; Thu, 7 Oct 2021 19:39:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ABA62610C8 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 3BDC7834EB; Thu, 7 Oct 2021 21:39:54 +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="rPWfOfqI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 645CF83538; Thu, 7 Oct 2021 21:39:52 +0200 (CEST) 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 2C24C834C7 for ; Thu, 7 Oct 2021 21:39:48 +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-x72a.google.com with SMTP id w14so7163844qkf.5 for ; Thu, 07 Oct 2021 12:39:48 -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=76SDqSqp09Lvc1DYZ76Vtu49Hv/KwkYIimAIBXmGstg=; b=rPWfOfqI+HqHFg0K9tQZ9hU4oRl8YEYPq04Eqc6BWv/h8X7WwgguCJ8iUbxF8i2bf8 iEBBS3AA3dIbyA0HERttVX6vUyWUCJf6TAd37CJSllIFAxYvO9XeevLB5pd+Sk7D1tce PVz4QjBe4aZJomWe2miv7IgBpxY5JUX/DxefY= 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=76SDqSqp09Lvc1DYZ76Vtu49Hv/KwkYIimAIBXmGstg=; b=oNlvb8GOKWzjgpPl+gv5JI+68s07EGGtCzlJTHF0KfeHZ6owSCrD3ite9l0aTOkFky C/mBUSK3xkQ5q28bAMe+K+Sn3K0MQv50LOcXPTJqDndptm77d8idhL+I6Iw9AfipRpJY iPF8sZsHev9rJtxEnqIrEo3XJuaDloTNXjLFQZF2fNmrswJpomMa5TakHB174gFWrytd pbxMuf+whgnwDoi3jA3NEN1RUae6fAGlgl8NMocQ5Vg41A821zXIdlueh6Mgr07FLY8o v9Rs8Dn/LurYWjyQo7ShuOF8aomjh4Fq9kqtkodU8lTBnC453lCW7qC4xZ1MP9TcwXPd 3xYg== X-Gm-Message-State: AOAM532Cv+X+Mt++Zl0zZHD7NYpM+e5Z8IoD8Nt6G8ygL68NzmzS4GAs 81PgRcBaZutwGjov2Kd/5FwHjA== X-Google-Smtp-Source: ABdhPJwS3VZFIEKf+S2bWf7n+3S0o2I4qPxaJYBfZYYiZf43Od4Emv40H/J48rxqiUx/sZu4toXt5g== X-Received: by 2002:ae9:d842:: with SMTP id u63mr5105261qkf.44.1633635586681; Thu, 07 Oct 2021 12:39:46 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-cc2f-6f95-d2e4-ed0f.res6.spectrum.com. [2603:6081:7b01:cbda:cc2f:6f95:d2e4:ed0f]) by smtp.gmail.com with ESMTPSA id h15sm276901qtq.41.2021.10.07.12.39.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Oct 2021 12:39:45 -0700 (PDT) Date: Thu, 7 Oct 2021 15:39:43 -0400 From: Tom Rini To: "Alex G." Cc: Simon Glass , U-Boot Mailing List , 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: <20211007193943.GW31748@bill-the-cat> References: <20210926014342.127913-3-sjg@chromium.org> <20211007002647.GA11424@bill-the-cat> <20211007025226.GQ31748@bill-the-cat> <20211007134209.GS31748@bill-the-cat> <20211007183045.GV31748@bill-the-cat> <5cb30240-b726-72be-fa68-05ce174218a3@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ONM0ZQR8ZZvUY+IM" Content-Disposition: inline In-Reply-To: <5cb30240-b726-72be-fa68-05ce174218a3@gmail.com> 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 --ONM0ZQR8ZZvUY+IM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 07, 2021 at 02:32:42PM -0500, Alex G. wrote: >=20 >=20 > On 10/7/21 1:50 PM, Simon Glass wrote: > > Hi Tom, > >=20 > > On Thu, 7 Oct 2021 at 12:30, Tom Rini wrote: > > >=20 > > > 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: > > > > >=20 > > > > > On Thu, Oct 07, 2021 at 07:32:04AM -0600, Simon Glass wrote: > > > > > > Hi Tom, > > > > > >=20 > > > > > > On Wed, 6 Oct 2021 at 20:52, Tom Rini wrot= e: > > > > > > >=20 > > > > > > > On Wed, Oct 06, 2021 at 08:49:13PM -0600, Simon Glass wrote: > > > > > > > > Hi Tom, > > > > > > > >=20 > > > > > > > > On Wed, 6 Oct 2021 at 18:26, Tom Rini = wrote: > > > > > > > > >=20 > > > > > > > > > On Sat, Sep 25, 2021 at 07:43:15PM -0600, Simon Glass wro= te: > > > > > > > > >=20 > > > > > > > > > > At present we must separately test for the host build f= or many 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 en= abled by the > > > > > > > > > > board itself. > > > > > > > > > >=20 > > > > > > > > > > It would be more convenient if we could use, for exampl= e, > > > > > > > > > > CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when bu= ilding for the > > > > > > > > > > host. Add support for this. > > > > > > > > > >=20 > > > > > > > > > > With this and the tools_build() function, we should be = able to remove all > > > > > > > > > > the #ifdefs currently needed in code that is build by t= ools and targets. > > > > > > > > > >=20 > > > > > > > > > > This will be even nicer when we move to using CONFIG(xx= x) everywhere, > > > > > > > > > > since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED s= tuff will go away. > > > > > > > > > >=20 > > > > > > > > > > Signed-off-by: Simon Glass > > > > > > > > > > Suggested-by: Rasmus Villemoes # b4f73886 > > > > > > > > > > Reviewed-by: Alexandru Gagniuc > > > > > > > > >=20 > > > > > > > > > The problem here is we don't include au= tomatically > > > > > > > > > when building host stuff, I believe. This is why doing t= his breaks > > > > > > > > > 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 > > > > > > > >=20 > > > > > > > > Oh dear, and no CI coverage. > > > > > > > >=20 > > > > > > > > I was reluctant to include kconfig.h everywhere but perhaps= that is > > > > > > > > the best approach. Will take a look ASAP. > > > > > > >=20 > > > > > > > Maybe we need to think a bit harder too about how we structure > > > > > > > intentionally shared code. > > > > > > >=20 > > > > > > > Why not, for example, for these common algorithms, rely on ty= pical > > > > > > > system headers/libraries in the tooling, which means we valid= ated U-Boot > > > > > > > vs common reference, rather than just our implementations? > > > > > >=20 > > > > > > Do you mean we use openssl for sha1, for example? > > > > >=20 > > > > > 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 re= quire > > > > > 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 alre= ady > > >=20 > > > OK, I've taken what you posted on IRC and folded that in, continuing > > > tests now. > > >=20 > > > > use separate code paths to run hashing. Perhaps we could make it > > > > optional? > > > >=20 > > > > What about those people that complain about crypto libraries on the= ir systems? > > >=20 > > > 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 > > OK I'll take a look at some point. > >=20 > > Or perhaps Alex might like to? >=20 > We just got a complain about OpenSSL yesterday [1] >=20 > Alex >=20 > [1] https://lists.denx.de/pipermail/u-boot/2021-October/462728.html Oh goodness, LibreELC is a custom build system... I'll have to chime in there, thanks. --=20 Tom --ONM0ZQR8ZZvUY+IM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFfTPwACgkQFHw5/5Y0 tyyiqQv+MeKG6wuD7JvjbOa1Z+4DldTqbQSK2jzF8VOedEUBX58A2Et/fxBmH6im IQNhugb75uYUoT1beQ3AkQDNy6JxZZ+asfmqnR7qiEdiUd7CA7CYiDyeWOKrDSBD PA0VeLKyuL3AT8hU/3il72ReBrAZm97apCkZMnM7oBKvyEeqwddFiU/VqTdGqMC+ 7EzJrVGyIFyVP2PKxqzDDaRIgQlNv7dKK563KVJcyT6EXSlIhIU8F6wUMBHrfbQ3 ngCLtLg9UnlhWqcJmjxSXKPfJp8xq0ya+K151N8zwBT3hdrf9TOXhqn4v26RlUU5 2FEC4vq8ceQMFeZARhPDUvoQLX3L0/MgURJ7zLxWPh0/v3ksdhCL+78w9mXA82aM GsKzvwVUcop49JxOWSp0F8ePtjdIEiR/UeCvtOqgIIR1T6EcUdhEP5p9UVvBcSDS jd582jsqMhMcBcNqHF9QOhLFmRlyAQmnHeS0tNOgxM2q1SNLZgIhIC93CrELll06 hyI60lik =iUZA -----END PGP SIGNATURE----- --ONM0ZQR8ZZvUY+IM--