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 BE2CFC433EF for ; Wed, 27 Oct 2021 17:11:35 +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 1A0396109F for ; Wed, 27 Oct 2021 17:11:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1A0396109F 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 E65448329E; Wed, 27 Oct 2021 19:11:31 +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="QNTzv7yp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 77ED48329E; Wed, 27 Oct 2021 19:11:30 +0200 (CEST) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 2792F82F03 for ; Wed, 27 Oct 2021 19:11:26 +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-qt1-x82d.google.com with SMTP id h4so2539918qth.5 for ; Wed, 27 Oct 2021 10:11:26 -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; bh=Apax38RZEkwg0ElDqKtZYTUJLRO35Qls0E8o6vTxnF0=; b=QNTzv7ypSwI1KNjBMJAUnPjYyueP6wcURoIFXO6ct5cUq2qqi7aCJf/NrhmEC/d6zz KAzE3IMeH29vNrxxe3FA1yM02Z+0ha6d69GInNy3YwlMXsWBsFabRzHVE1h64oBxzjxi HwecBLDiFUkeeFYwIAjBc2P/d84/2lpsfbKi4= 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; bh=Apax38RZEkwg0ElDqKtZYTUJLRO35Qls0E8o6vTxnF0=; b=Z12JOfUUuo4AavjrMVpD4RjZPrGGQSkUkz4CVIy8PvtLtrGsWrcNRxH10XdIc5UtqV HvfQa+wkp1Rfo2HY85tmkiGC9RZfUnanG8iwWxKolrt8Nrwjo0DogfuneeBme6u8PHr4 GZCox7bD930jWZbCJ3+EJQI69ulJemNA8FCsqHMUMJchuhPuFhXJ87mQcoz8ufpNNOg6 yzQS74LbrJo3vLp4C79sHp2lAW30kKiZlV+lQpcosfPOMMy7jsdAkVufNvq2XJr6Zpm8 Fx6b5PyF27/JJR9eCPyusS5m6DNOvbYgiqNp/ckttvuspruZM2zCvV1bmUxc01mFpTxz dvMg== X-Gm-Message-State: AOAM530/u1Z8AsyrHJsXJTVEhuE6VhMpZNekUx62tLK5MvIy9L+mXnZ3 HDe14ZQs+oSt4nknPzvnZ9fyRw== X-Google-Smtp-Source: ABdhPJy9lylppQ029s2U0r1vK0+Cn5dM6KlC4HcwyIiYW4vHb7giKyBrV4rqmmJ+kG5jCaAqKeWAxg== X-Received: by 2002:ac8:588e:: with SMTP id t14mr32833008qta.2.1635354684754; Wed, 27 Oct 2021 10:11:24 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-0044-6cb5-81ac-bb0c.res6.spectrum.com. [2603:6081:7b01:cbda:44:6cb5:81ac:bb0c]) by smtp.gmail.com with ESMTPSA id e4sm323249qty.59.2021.10.27.10.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 10:11:24 -0700 (PDT) Date: Wed, 27 Oct 2021 13:11:22 -0400 From: Tom Rini To: Vagrant Cascadian Cc: Andre Przywara , Marek =?iso-8859-1?Q?Beh=FAn?= , Peter Robinson , Matthias Brugger , Heinrich Schuchardt , Samuel Holland , Pali =?iso-8859-1?Q?Roh=E1r?= , u-boot@lists.denx.de, Jagan Teki , "Alex G ." , Artem Lapkin , Priyanka Jain , Sughosh Ganu Subject: Re: [PATCH v4 1/4] tools: Separate image types which depend on OpenSSL Message-ID: <20211027171122.GC8284@bill-the-cat> References: <20211021150048.59bb90d6@thinkpad> <20211022165922.22164ef8@thinkpad> <20211022150927.GJ3577824@bill-the-cat> <20211022165609.1725e93b@donnerap.cambridge.arm.com> <20211022162219.GK3577824@bill-the-cat> <87v91pnh08.fsf@yucca> <20211022182049.2ff35e08@donnerap.cambridge.arm.com> <87ilxoon9o.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="t8N2qprAjL+0GVly" Content-Disposition: inline In-Reply-To: <87ilxoon9o.fsf@yucca> X-Clacks-Overhead: GNU Terry Pratchett 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 --t8N2qprAjL+0GVly Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 22, 2021 at 12:46:59PM -0700, Vagrant Cascadian wrote: > On 2021-10-22, Andre Przywara wrote: > > On Fri, 22 Oct 2021 09:47:35 -0700 > > Vagrant Cascadian wrote: > >> On 2021-10-22, Tom Rini wrote: > >> > On Fri, Oct 22, 2021 at 04:56:09PM +0100, Andre Przywara wrote: =20 > >> >> On Fri, 22 Oct 2021 11:09:27 -0400 > >> >> Tom Rini wrote: =20 > >>=20 > >> >> > On Fri, Oct 22, 2021 at 04:59:22PM +0200, Marek Beh=FAn wrote: = =20 > >> >> > > On Fri, 22 Oct 2021 12:09:19 +0200 > >> >> > > Heinrich Schuchardt wrote: > >> >> > > =20 > >> >> > > > On 10/21/21 15:00, Marek Beh=FAn wrote: =20 > >> >> > > > > BTW, wouldn't it be enough to simply imply TOOLS_LIBCRYPTO = for mvebu > >> >> > > > > platform in Kconfig? > >> >> > > > > =20 > >> >> > > >=20 > >> >> > > > We should only use 'imply' for suggested settings and never f= or hard=20 > >> >> > > > requirements. TOOLS_LIBCRYPTO already defaults to 'Y'. So imp= lying it=20 > >> >> > > > for mvebu would be redundant. > >> >> > > >=20 > >> >> > > > In an OS distribution we only want to ship a single version o= f mkimage.=20 > >> >> > > > So it is good to elimate symbol CONFIG_MXS. > >> >> > > >=20 > >> >> > > > How mkimage is built should not depend on CONFIG_TOOLS_LIBCRY= PTO. > >> >> > > >=20 > >> >> > > > Tom wrote regarding this aspect in=20 > >> >> > > > https://lists.denx.de/pipermail/u-boot/2021-September/460251.= html: > >> >> > > >=20 > >> >> > > > "if we're building a generically useful tool, we don't want a= nother > >> >> > > > symbol for it." =20 > >> >> > >=20 > >> >> > > OK, so mkimage and dumpimage should be always generic and always > >> >> > > support all platforms, that makes sense, since the tools can be > >> >> > > installed as a distribution package. > >> >> > >=20 > >> >> > > But I still think it should be possible to cripple these tools = if the > >> >> > > developer wants to disable libcrypto due to embedded environmen= t. =20 > >> >>=20 > >> >> Well, I don't think this is the real question here, is it? > >> >> I think the tools part is clear: distros want to build just mkimage, > >> >> supporting as many platforms as possible, and might need to avoid O= penSSL. > >> >> This should be covered by TOOLS_LIBCRYPTO=3D[yn] and "make > >> >> tools-only_defconfg && make tools", and Samuel's patch actually fix= es the > >> >> build (at least somewhat, I still get link errors). =20 > >> > > >> > The problem is, are distros doing a tools-only build, for tools, or = are > >> > they doing it per board? Like, hey, ugh, OpenEmbedded uses > >> > sandbox_defconfig and cross_tools as the targets. That's not quite = what > >> > I was hoping to see. So I want to know everyone else is doing, rath= er > >> > than we hope they're doing. =20 > >>=20 > >> Thanks for bringing this to my attention! > >>=20 > >> In Debian, the u-boot-tools package is built using tools-only, and for > >> each of the board-specific targets, it still ends up building the > >> relevent tools, but we throw them away and do not ship them in any > >> packages. > >>=20 > >> With 2021.10, the board-specific builds made it harder to avoid openssl > >> with the corresponding tools, and I reluctantly added a dependency on > >> openssl... (which is technically permitted in Debian, having declared > >> openssl as a system library to avoid the GPL incompatibilities, but > >> ... meh.) > > > > But this is purely a *build-time* dependency only, right? The resulting > > images do not have any openssl code in them, they were just *created* > > (signed) using that code. > > I don't think this a legal issue?=20 >=20 > The various .h includes are all that I saw, and I *think* all in the > tools/ directory, but yeah, if this is really the case that no openssl > code ends up in the board-specific binaries, that simplifies things > considerably. >=20 >=20 > > The problems are about *shipping* openssl code, which you only do for > > u-boot-tools - where it now can be disabled. >=20 > Probably won't disable it for u-boot-tools in Debian (reluctantly riding > on the system library exception), but the tools builds that are part of > the build process would be nice to be able to disable. >=20 >=20 >=20 > >> I also have been doing some packaging of u-boot for GNU Guix, where I > >> suspect the stance wouldn't be as willing to accept such a compromise.= =2E. > >>=20 > >> So... I would *love* an option to be able to build a board-only config > >> without any of the tools; > > > > Why is this a problem (see above)? Who is building board builds? It's > > either the maintainer when creating the binary package, or a curious us= er, > > right? And they can surely *use* OpenSSL during build time - if it's > > needed by the board. >=20 > Sure, if there is no actual openssl code embedded in the resulting > binary with GPLv2 code, it shouldn't be a problem... >=20 >=20 > It's a mess of an issue to tease out exactly what codepaths trigger and > do not trigger the compatibility issues between openssl and GPL... >=20 >=20 > Depending on openssl in a project with GPLv2-only code does seem at risk > to introduce license compatibility issues without sufficient and > constant review and dilligence, even if it is technically ok how it is > done right now... There's still the long standing request to migrate the tooling to use a different library, but it's apparently not been a large enough concern of company with concerns to fund a developer of theirs to do the migration. I feel like that might be one of the better, at least in terms of license, fixes for this issue. And then maybe we do just need a way to say if you're building for platform X then you must also have the crypto requirement resolved to build mkimage. And conversely if you aren't building those platforms, it's OK to not. --=20 Tom --t8N2qprAjL+0GVly Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmF5iDYACgkQFHw5/5Y0 tyxviwv/eScepKs/yphUrJwlRtsIMjb5NMOMzoioPct9O1OvKhkZFgCmi8AXyf4E M8oxg1kpwBZoQrmrjfzJjD/WD0vXwBBaGCWvoMxBcdFenQFGLp5F3gJDnG2TaLl0 O3ulwR9Y3ZgAHBLWJXGeReR9bOm02QtxoLN4nNr4puXYiOO9juUBSyRhIZQfCbrt VuMyabwPfRsPM7vkjU07qTtDpQ6yz8b+ykmEC15YRL+8RvoE/MCvEyMJlUSpdItZ meXUnsJkclOVcPiGraD/0KjlCWRH8xuMBhAr3j6ZA5mSEqH60nXIm3+TZe4q7kjg sWJqFkCpxtn0hqt2YKAPuIRc15zcgzOIeL/t+kqK5qYr++gl8g5QpmmEQenGlgHB WylVU8Bub+NQNO0LR2SVMuwhN+qxAJFAC3+393dPj6NEGbcd4P2dMl6yCRGStVU1 ZvLWT/QCcfME+MK2kxuo8w+XWZTRZCzjW37Fx6ubYxIX/H3Ay2iEPT4gDexxTKPn keNmcmlR =DYQL -----END PGP SIGNATURE----- --t8N2qprAjL+0GVly--