mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: giorgio.nicole@arcor.de, barebox@lists.infradead.org
Cc: Christian Melki <christian.melki@t2data.com>
Subject: Re: barebox on EFI bios and secure boot
Date: Mon, 12 Aug 2024 14:09:57 +0200	[thread overview]
Message-ID: <b56071b2-e46c-4feb-aaf2-ec35f26ccfa0@pengutronix.de> (raw)
In-Reply-To: <48fe5dbe42e14b518a86e25bf21e4425@arcor.de>

Hello Giorgio,

On 08.08.24 11:45, giorgio.nicole@arcor.de wrote:
> I use barebox to boot a linux kernel on an Intel atom based PC with an EFI bios and this just works.
> 
> Now I wanted to configure the bios to enable the secure boot mode: this means I tried to write some
> EFI variables (db, dbx, KEK, PK); for this I used the efitools utils (efi-updatevar for example) but it didn't
> worked: I always get an 'Invalid argument' error.

In this case, neither barebox or the kernel are signed, right?

> After some unsuccessful tries I booted the linux kernel directly from the bios, without barebox and in this
> case the efi-updatevar tool worked as expected; so I suppose that starting barebox has some kind of effect
> on the persistent store for the efi vars.

I am not familiar with UEFI secure boot, so I don't know if there is some lock
down happening here or what could cause this.

Some things to try:

 - Are other variables writable?
 - Can you write this variable from barebox? wecho -o /efivars/your-variable
   or memcpy -d /efivars/some-variable

> Does anyone have similar issues or a suggestion about what can be checked to fix this ???

Christian (CC'd) mentioned a while ago that he had a secure booting UEFI system.
I asked him on IRC and he mentioned using lockdown.efi for lock down back then.

Hope this helps and let me know how it goes.

Cheers,
Ahmad

> 
> thank you,
> 
> giorgio
> 
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2024-08-12 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  9:45 giorgio.nicole
2024-08-12 12:09 ` Ahmad Fatoum [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=b56071b2-e46c-4feb-aaf2-ec35f26ccfa0@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=christian.melki@t2data.com \
    --cc=giorgio.nicole@arcor.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