All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Tom Rini <trini@konsulko.com>
Cc: "Samuel Holland" <samuel@sholland.org>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	u-boot@lists.denx.de, "Simon Glass" <sjg@chromium.org>,
	"Jernej Škrabec" <jernej.skrabec@gmail.com>
Subject: Re: [PATCH 0/4] sunxi: TOC0 image type support
Date: Tue, 22 Jun 2021 00:56:26 +0100	[thread overview]
Message-ID: <20210622005626.65f27491@slackpad.fritz.box> (raw)
In-Reply-To: <20210621203537.GN9516@bill-the-cat>

On Mon, 21 Jun 2021 16:35:37 -0400
Tom Rini <trini@konsulko.com> wrote:

Hi Tom,

> On Mon, Jun 21, 2021 at 04:43:00PM +0100, Andre Przywara wrote:
> > On Sun, 20 Jun 2021 21:55:51 -0500
> > Samuel Holland <samuel@sholland.org> wrote:
> > 
> > (CC:ing Tom and Simon for the compatibility problem below)
> > 
> > Hi,
> >   
> > > This series adds support for the TOC0 image format used by the Allwinner
> > > secure boot ROM (SBROM). This series has been tested on the following
> > > SoCs/boards, with the eFuse burnt to enable secure mode:
> > >   - A64: Pine A64 Plus
> > >   - H5: Orange Pi Zero Plus
> > >   - H6: Pine H64 Model B
> > >   - H616: Orange Pi Zero 2  
> > 
> > many thanks for sending this. In general this looks good (will do a
> > more thorough review soon), just one thing that bothered me:
> > 
> > This requires OpenSLL 1.1.x. There is nothing really wrong about this,
> > but my (admittedly not the freshest) Slackware, but also long term
> > distros like RHEL/CentOS (<=7), still come with 1.0.x (headers) only.
> > 
> > I was wondering how important this is? I have the impression that
> > embedded developers sometimes use old^Wstable systems, so some people
> > might be bitten by it. I think in this case it will affect all user
> > trying to build mkimage, regardless of the target platform?
> > 
> > So I wanted to know what to do here?
> > - Can we provide some kind of compatibility support? OpenSSL seems
> >   to provide something:
> > https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#Compatibility_Layer
> >   Haven't tested that fully yet, just downloading that tarball
> >   does not seem to cut it (or is missing files?). I guess one needs to
> >   copy&paste some code from the Wiki?
> > - Shall we detect missing v1.1.x support (via #if OPENSSL_VERSION_NUMBER
> >   < 0x10100000L) and disable just sunxi_toc0 support in this case?  
> 
> There's two things.  First, the series should be on top of (sorry!)
> https://patchwork.ozlabs.org/project/uboot/patch/20210524202317.1492578-1-mr.nuke.me@gmail.com/
> which adds a similar Kconfig option to make building tools easier.

So this is on top of Simon's large series? Poor Samuel! Is there a
branch somewhere?

> Second, while I think not supporting openssl 1.0.x is fine,

Well, this was not what I was hoping for ;-)
I followed the advice on the OpenSSL wiki and now have a rather small
compatibility header file, which lets me compile mkimage even against
OpenSSL v1.0.2u. It seems like kwbimage.c has similar provisions in
place, I guess this could be merged into the external header?
Happy to send a patch on top, if this seems useful.

> I would like
> to again ask for someone to spend the time looking at switching to one
> of the GPL-compatible libraries as I'm pretty sure it's been raised a
> few times that we can't link with openssl like we do.

Why is that? Because Apache is not compatible with GPLv2? The OpenSSL
webpage says that:
"Can I use OpenSSL with GPL software?
On many systems including the major Linux and BSD distributions, yes
(the GPL does not place restrictions on using libraries that are part
of the normal operating system distribution)."
And for mkimage we just build a regular userspace tool, which is linked
against the system installed OpenSSL library. From my understanding
this is what this quote above means with being permitted?

And what would be the alternatives? Take one of the smaller ones and
embed them into the code?
Otherwise we would probably need to pick something that is widely
available and shipped with distros, I guess? Like GnuTLS,
libgcrypt, nettle? Maybe LibreSSL?

Samuel, do you have an insight what would be a good fit?

Tom, do you have some pointer to previous discussions about this?

Cheers,
Andre


> This isn't a
> blocker for the series, just an ask for help with a known problem.
> Thanks!
> 

  reply	other threads:[~2021-06-21 23:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  2:55 [PATCH 0/4] sunxi: TOC0 image type support Samuel Holland
2021-06-21  2:55 ` [PATCH 1/4] tools: Refactor mkimage linking with OpenSSL Samuel Holland
2021-06-26 18:31   ` Simon Glass
2021-06-21  2:55 ` [PATCH 2/4] tools: mkimage: Add Allwinner TOC0 support Samuel Holland
2021-06-22  1:07   ` Andre Przywara
2021-06-21  2:55 ` [PATCH 3/4] sunxi: Support both SPL image types Samuel Holland
2021-06-21  2:55 ` [PATCH 4/4] sunxi: Support building a SPL as a TOC0 image Samuel Holland
2021-06-21 15:43 ` [PATCH 0/4] sunxi: TOC0 image type support Andre Przywara
2021-06-21 20:35   ` Tom Rini
2021-06-21 23:56     ` Andre Przywara [this message]
2021-08-22  2:19       ` Samuel Holland
2021-08-22 14:15         ` Tom Rini
2021-08-22 21:37           ` Vagrant Cascadian
2021-08-23  7:43             ` Peter Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210622005626.65f27491@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --cc=hdegoede@redhat.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=samuel@sholland.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.