EBG config partitions on other disk break EBG userspace components

45 views
Skip to first unread message

MOESSBAUER, Felix

unread,
Sep 19, 2023, 11:12:16 PM9/19/23
to efibootg...@googlegroups.com, Adler, Michael
Dear Devs,

when having multiple disks in a system with ebg config partitions each,
the libebgenv is not able to locate the correct environment and instead
just fails with the following error:

"Error, there are more than 2 config partitions."

The EBG EFI part properly probes the current boot device and only
searches for EBG configs on that device. However, the userspace part
(which is also used by swupdate) does not have this logic and simply
scans all blockdevices in `/dev/`.

In general, wildly guessing and probing devices in `/dev/` should be
avoided, as this likely leads to unwanted side-effects. We must not
make any guesses about the content of a device that is potentially not
under our control.

I temporarily solved this issue in the downstream project by hard-
coding the expected partition into the probe_config_partition function,
but this is not a generic solution.

Best regards,
Felix

Jan Kiszka

unread,
Sep 22, 2023, 9:07:39 AM9/22/23
to MOESSBAUER, Felix, efibootg...@googlegroups.com, Adler, Michael
On 20.09.23 05:12, 'MOESSBAUER, Felix' via EFI Boot Guard wrote:
> Dear Devs,
>
> when having multiple disks in a system with ebg config partitions each,
> the libebgenv is not able to locate the correct environment and instead
> just fails with the following error:
>
> "Error, there are more than 2 config partitions."
>
> The EBG EFI part properly probes the current boot device and only
> searches for EBG configs on that device. However, the userspace part
> (which is also used by swupdate) does not have this logic and simply
> scans all blockdevices in `/dev/`.

Then let's fix it, patches welcome.

>
> In general, wildly guessing and probing devices in `/dev/` should be
> avoided, as this likely leads to unwanted side-effects. We must not
> make any guesses about the content of a device that is potentially not
> under our control.

There are use cases, see e.g. docs/RECOVERY.md.

Jan

>
> I temporarily solved this issue in the downstream project by hard-
> coding the expected partition into the probe_config_partition function,
> but this is not a generic solution.
>
> Best regards,
> Felix
>

--
Siemens AG, Technology
Linux Expert Center

JEMS EBERHARD HORBEL

unread,
Dec 9, 2023, 2:02:13 PM12/9/23
to EFI Boot Guard
DIRECT SENDER IS HERE LETS DEAL.

JENS EBERHARD



MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING 
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
SLBC PROVIDER
CREDIT CARD TOP UP
SEPA TRANSFER
WIRE TRANSFER
GLOBALPAY INC US

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP FOR A SERIOUS DEAL.

+447405129573
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages