boot: don't enable the non-secure boot commands by default if secure boot enabled
PATCH v3 1/2 boot: don't enable the non-secure boot commands by default if secure boot enabled
To prevent booting unsigned images, don't enable the non-secure boot commands(booti, bootz .etc) by default if secure boot enabled.
--- boot/Kconfig | 2 +- cmd/Kconfig | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
boot/Kconfig +1 -1
@@ -407,7 +407,7 @@ endif config LEGACY_IMAGE_FORMAT bool "Enable support for the legacy image format" - default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE + default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE && !EFI_SECURE_BOOT help This option enables the legacy image format. It is enabled by default for backward compatibility, unless FIT_SIGNATURE is
cmd/Kconfig +9 -2
@@ -259,15 +259,22 @@ config BOOTM_EFI config CMD_BOOTZ bool "bootz" + default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT help Boot the Linux zImage + The booti command is used for launching unsigned Linux zImage. + If you want to have secure boot either via signed FIT images or via + signed UEFI images, this option should be disabled. config CMD_BOOTI bool "booti" depends on ARM64 || RISCV - default y + default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT help - Boot an AArch64 Linux Kernel image from memory. + Boot an AArch64/RISC-V Linux Kernel image from memory. + The booti command is used for launching unsigned AArch64 and RISC-V + Linux kernel images. If you want to have secure boot either via signed + FIT images or via signed UEFI images, this option should be disabled. config BOOTM_LINUX bool "Support booting Linux OS images"
Signature · 1 line
2.25.1
Am 20. Mai 2022 04:58:46 MESZ schrieb Rover Mo <[email protected]>:
Quoted 17 lines
To prevent booting unsigned images, don't enable the non-secure boot
commands(booti, bootz .etc)by default if secure boot enabled.Signed-off-by Rover Mo <[email protected]>---
boot/Kconfig | 2 +-
cmd/Kconfig | 11 +++++++++--2 files changed, 10 insertions(+), 3 deletions(-)boot/Kconfig +0
-0@@ -407,7 +407,7 @@ endifconfig
LEGACY_IMAGE_FORMAT
bool "Enable support for the legacy image format"
boot/Kconfig endif · line 410
Quoted 2 lines
boot/Kconfig +1
-1- default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE + default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE && !EFI_SECURE_BOOT
Having EFI_SECURE_BOOT=y is not enough to use secure boot. You must also supply variables PK, KEK, db, dbx.
Furthermore you would have to disable a whole lot more commands to secure the device.
Currently we have patches in review to provide a bootmenu with optionally no access to the console. This is a better approach.
Best regards
Heinrich
Quoted 34 lines
help
This option enables the legacy image format. It is enabled by default for backward compatibility, unlessFIT_SIGNATUREiscmd/Kconfig +0
-0@@ -259,15 +259,22 @@ config BOOTM_EFIconfig
CMD_BOOTZ
bool "bootz"cmd/Kconfig +1
-0+ default y if !FIT_SIGNATURE && !EFI_SECURE_BOOThelp
Boot the Linux zImagecmd/Kconfig +3
-0+ The booti command is used for launching unsigned Linux zImage. + If you want to have secure boot either via signed FIT images or via + signed UEFI images, this option should be disabled.config
CMD_BOOTIbool "booti" depends on ARM64 || RISCVcmd/Kconfig +1
-1- default y + default y if !FIT_SIGNATURE && !EFI_SECURE_BOOThelp
cmd/Kconfig +4
-1- Boot an AArch64 Linux Kernel image from memory. + Boot an AArch64/RISC-V Linux Kernel image from memory. + The booti command is used for launching unsigned AArch64 and RISC-V + Linux kernel images. If you want to have secure boot either via signed + FIT images or via signed UEFI images, this option should be disabled.config
BOOTM_LINUX
bool "Support booting Linux OS images"Signature · 1 line
2.25.1
Quoted 8 lines · Heinrich Schuchardt
Am 20. Mai 2022 04:58:46 MESZ schrieb Rover Mo <[email protected]>:
Having EFI_SECURE_BOOT=y is not enough to use secure boot. You must also supply variables PK, KEK, db, dbx.
Furthermore you would have to disable a whole lot more commands to secure the device.
Currently we have patches in review to provide a bootmenu with optionally no access to the console. This is a better approach.
Thank you for your explanation.
Please forget my patches.
Best regards,
Rover Mo