All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] boot: don't enable the non-secure boot commands by default  if secure boot enabled
@ 2021-11-09  7:21 Rover Mo
  2021-11-09  7:30 ` Rover Mo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Rover Mo @ 2021-11-09  7:21 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, xypron.glpk, michal.simek, patrick.delaunay, bmeng.cn

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 <myzmzz@126.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>

---

Changes for v2:
    - Don't enable the non-secure boot commands too if !EFI_SECURE_BOOT
    - Update the help information
    - Changed commit title

 cmd/Kconfig         | 11 +++++++++--
 common/Kconfig.boot |  2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 5b30b13e43..98c588e638 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -203,15 +203,22 @@ config BOOTM_EFI
 
 config CMD_BOOTZ
 	bool "bootz"
+	default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT
 	help
 	  Boot the Linux zImage
+	  The bootz 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"
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index a8d4be23a9..574f35b42e 100644
--- a/common/Kconfig.boot
+++ b/common/Kconfig.boot
@@ -283,7 +283,7 @@ endif # FIT
 
 config LEGACY_IMAGE_FORMAT
 	bool "Enable support for the legacy image format"
-	default y if !FIT_SIGNATURE
+	default y if !FIT_SIGNATURE && !EFI_SECURE_BOOT
 	help
 	  This option enables the legacy image format. It is enabled by
 	  default for backward compatibility, unless FIT_SIGNATURE is
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-12  0:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  7:21 [PATCH v2] boot: don't enable the non-secure boot commands by default if secure boot enabled Rover Mo
2021-11-09  7:30 ` Rover Mo
2021-11-09  8:54 ` [PATCH " Heinrich Schuchardt
2021-11-25  0:11 ` Simon Glass
2022-04-12  0:51 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.