From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: AKASHI Takahiro <takahiro.akashi@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
sughosh.ganu@linaro.org, u-boot@lists.denx.de, agraf@csgraf.de
Subject: Re: [PATCH] efi_loader: capsule: add a debug message in case of no key
Date: Tue, 20 Jul 2021 10:18:10 +0300 [thread overview]
Message-ID: <YPZ4sg+agHOn8cDu@enceladus> (raw)
In-Reply-To: <20210720064816.GA107447@laputa>
> > > > > + debug("Public key/certificate not found\n");
[...]
> > > >
> > > > Currently the only implementation of efi_get_public_key_data() actually
> > > > providing keys is the one in board/emulation/common/qemu_capsule.c where
> > > > the user has to manually upload the esl file.
> > > >
> > > > For future implementation it is preferable to build the public key data
> > > > into the U-Boot binary. If it is part of the build process then the only
> > > > error that could come up is that the public key data has the wrong format.
> > >
> > > Now Ilias posted a patch to embed a public key in the U-Boot binary.
> > > But it won't be the only solution in the future and the system owners
> > > may want to provide a key in their own way; hence, it might not be "part
> > > of build process."
> > >
> >
> > Correct. My patch intentionally leaves out that part and I hope someone
> > will need it and implement it.
> >
> > > So I think that adding a message is still valid, even it should be
> > > treated as an error message instead of a debug message to warn "users".
> >
> >
> > Keep in mind that the makefile currently checks for the .esl file. if the
> > file is not found there's a compilation error, prompting the user to add a
> > valid file
>
> If your efi_get_public_key_data() is the only implementation in
> the system, checking a return value (if ret < 0) is also meaningless.
Yea but what I expect here, is to make it a __weak function in the future
and allow reading the key from hardware. So the check is there to ensure
that when we add other ways of reading the key we are doing the right thing
Thanks
/Ilias
>
> -Takahiro Akashi
>
>
> >
> > Thanks
> > /Ilias
> > >
> > > -Takahiro Akashi
> > >
> > >
> > > > If we are using the weak implementation of efi_get_public_key_data() in
> > > > lib/efi_loader/efi_capsule.cwith CONFIG_EFI_CAPSULE_AUTHENTICATE=y, the
> > > > system is misconfigured. Do we need that weak implementation at all? I
> > > > would prefer to remove to get a build error.
> > > >
> > > > I suggest that you add a log_err() message with above text into the
> > > > board/emulation/common/qemu_capsule.c implementation of
> > > > efi_get_public_key_data(). This way the user will see that he forgot a step.
> > > >
> > > > Best regards
> > > >
> > > > Heinrich
> > > >
> > > > > goto out;
> > > > > + }
> > > > >
> > > > > pkey = malloc(pkey_len);
> > > > > if (!pkey)
> > > > >
> > > >
prev parent reply other threads:[~2021-07-20 7:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 8:19 [PATCH] efi_loader: capsule: add a debug message in case of no key AKASHI Takahiro
2021-05-20 2:06 ` Heinrich Schuchardt
2021-07-20 2:13 ` AKASHI Takahiro
2021-07-20 6:39 ` Ilias Apalodimas
2021-07-20 6:48 ` AKASHI Takahiro
2021-07-20 7:18 ` Ilias Apalodimas [this message]
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=YPZ4sg+agHOn8cDu@enceladus \
--to=ilias.apalodimas@linaro.org \
--cc=agraf@csgraf.de \
--cc=sughosh.ganu@linaro.org \
--cc=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox