public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/5 v2] efi_loader: Implement EFI variable handling via OP-TEE
Date: Fri, 15 May 2020 15:08:15 +0300	[thread overview]
Message-ID: <20200515120815.GA468802@apalos.home> (raw)
In-Reply-To: <1e6a60a6-f552-b9be-4d26-80b49e551e1e@gmx.de>

On Fri, May 15, 2020 at 01:55:35PM +0200, Heinrich Schuchardt wrote:
> On 11.05.20 20:14, Ilias Apalodimas wrote:
> > In OP-TEE we can run EDK2's StandAloneMM on a secure partition.
> > StandAloneMM is responsible for the UEFI variable support. In
> > combination with OP-TEE and it's U-Boot supplicant, variables are
> > authenticated/validated in secure world and stored on an RPMB partition.
> >
> > So let's add a new config option in U-Boot implementing the necessary
> > calls to OP-TEE for the variable management.
> >
> > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > Signed-off-by: Pipat Methavanitpong <pipat1010@gmail.com>
> > Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> > ---
> >  lib/efi_loader/Kconfig            |   9 +
> >  lib/efi_loader/Makefile           |   4 +
> >  lib/efi_loader/efi_variable_tee.c | 643 ++++++++++++++++++++++++++++++
> >  3 files changed, 656 insertions(+)
> >  create mode 100644 lib/efi_loader/efi_variable_tee.c
> >
> > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> > index 1cfa24ffcf72..e385cd0b9dae 100644
> > --- a/lib/efi_loader/Kconfig
> > +++ b/lib/efi_loader/Kconfig
> > @@ -164,4 +164,13 @@ config EFI_SECURE_BOOT
> >  	  it is signed with a trusted key. To do that, you need to install,
> >  	  at least, PK, KEK and db.
> >
> > +config EFI_MM_COMM_TEE
> > +	bool "UEFI variables storage service via OP-TEE"
> > +	depends on SUPPORT_EMMC_RPMB
> > +	default n
> > +	help
> > +	  If OP-TEE is present and running StandAloneMM dispatch all UEFI variable
> > +	  related operations to that. The application will verify, authenticate and
> > +	  store the variables on an RPMB
> > +
> >  endif
> 
> Dear Ilias,
> 
> at least CONFIG_TEE=y is needed as dependency. Otherwise compiling fails.

Ok I'll add that

> 
> If OP-TEE is not found:
> 
> => bootefi hello
> Unable to open OP-TEE session (err=-19)
> mm_communicate failed!
> Error: Cannot initialize UEFI sub-system, r = 3
> 
> I think it could be allowable to boot without variable support unless we
> are in secure boot audit mode. So if CONFIG_EFI_SECURE_BOOT=n, maybe we
> should be less strict. I guess it will end up in weighing user
> friendliness against complexity. What are your ideas?

I don't have any strong opinions on that tbh. But I think i'd choose the
stricter approach. If it's a UEFI boot/whatever, variables must be initialized
and accessible.

Regards
/Ilias
> 
> Best regards
> 
> Heinrich

  reply	other threads:[~2020-05-15 12:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 18:13 [PATCH 0/6 v2] EFI variable support via OP-TEE Ilias Apalodimas
2020-05-11 18:13 ` [PATCH 1/5 v2] efi_loader: Add headers for EDK2 StandAloneMM communication Ilias Apalodimas
2020-05-11 19:39   ` Heinrich Schuchardt
2020-05-12  4:15     ` Ilias Apalodimas
2020-05-12  4:34     ` Ilias Apalodimas
2020-05-11 18:14 ` [PATCH 2/5 v2] efi_loader: Implement EFI variable handling via OP-TEE Ilias Apalodimas
2020-05-13  6:14   ` Heinrich Schuchardt
2020-05-13  8:10     ` Ilias Apalodimas
2020-05-15 11:55   ` Heinrich Schuchardt
2020-05-15 12:08     ` Ilias Apalodimas [this message]
2020-05-11 18:14 ` [PATCH 3/5 v2] cmd: efidebug: Add support for querying UEFI variable storage Ilias Apalodimas
2020-05-11 18:54   ` Heinrich Schuchardt
2020-05-12  4:02     ` Ilias Apalodimas
2020-05-11 18:14 ` [PATCH 4/5 v2] MAINTAINERS: Add maintainer for EFI variables via OP-TEE Ilias Apalodimas
2020-05-11 18:39   ` Heinrich Schuchardt
2020-05-11 18:14 ` [PATCH 5/5 v2] doc: uefi.rst: Add OP-TEE variable storage config options Ilias Apalodimas
2020-05-11 18:38   ` Heinrich Schuchardt

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=20200515120815.GA468802@apalos.home \
    --to=ilias.apalodimas@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox