armv8: Secure Boot: Modify boot_a_script definition
PATCH v2 1/1 armv8: Secure Boot: Modify boot_a_script definition
From: Vinitha V Pillai <[email protected]>
boot_script_hdr does not exist, it should not continue to boot. So adding separate validation after loading boot_script.
The secure boot validation of the bootscript header will fail and halts the further execution of commands which prevent source command from execution.
---
Changes in V2:
Corrects commit message to add more clarity.
include/configs/ls1012afrwy.h | 3 ++- include/configs/ls1012ardb.h | 3 ++- include/configs/ls1021atwr.h | 3 ++- include/configs/ls1043a_common.h | 3 ++- include/configs/ls1046a_common.h | 5 +++-- include/configs/ls1088ardb.h | 3 ++- include/configs/ls2080ardb.h | 3 ++- 7 files changed, 15 insertions(+), 8 deletions(-)
include/configs/ls1012afrwy.h +2 -1
@@ -98,7 +98,8 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"installer=load mmc 0:2 $load_addr " \
include/configs/ls1012ardb.h +2 -1
@@ -98,7 +98,8 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"installer=load mmc 0:2 $load_addr " \
include/configs/ls1021atwr.h +2 -1
@@ -364,7 +364,8 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"installer=load mmc 0:2 $load_addr " \
include/configs/ls1043a_common.h +2 -1
@@ -275,7 +275,8 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"qspi_bootcmd=echo Trying load from qspi..;" \
include/configs/ls1046a_common.h +3 -2
@@ -256,8 +256,9 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ -"&& esbc_validate ${scripthdraddr};" \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \ +"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"qspi_bootcmd=echo Trying load from qspi..;" \"sf probe && sf read $load_addr " \
include/configs/ls1088ardb.h +2 -1
@@ -398,7 +398,8 @@"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"installer=load mmc 0:2 $load_addr " \
include/configs/ls2080ardb.h +2 -1
@@ -495,7 +495,8 @@ unsigned long get_board_sys_clk(void);"${scriptaddr} ${prefix}${script}; " \"env exists secureboot && load ${devtype} " \"${devnum}:${distro_bootpart} " \ -"${scripthdraddr} ${prefix}${boot_script_hdr} " \ +"${scripthdraddr} ${prefix}${boot_script_hdr}; " \ +"env exists secureboot " \"&& esbc_validate ${scripthdraddr};" \"source ${scriptaddr}\0" \"qspi_bootcmd=echo Trying load from qspi..;" \
Signature · 1 line
2.17.1
PATCH v2 1/1 armv8: Secure Boot: Modify boot_a_script definition
Quoted 15 lines
-----Original Message-----
From: Udit Agarwal
Sent: Tuesday, April 23, 2019 11:22 AM
To: u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Ruchika Gupta <[email protected]>; Jagdish Gediya <[email protected]>; Vinitha V Pillai <[email protected]>; Udit Agarwal <[email protected]>
Subject: [Patch v2] armv8: Secure Boot: Modifyboot_a_scriptdefinitionFrom: Vinitha V Pillai <[email protected]>
boot_script_hdrdoes not exist, it should not continue to boot. So adding separate validation after loadingboot_script.
Quoted 6 lines
The secure boot validation of the bootscript header will fail and halts the further execution of commands which prevent source command from execution.
Signed-off-by Vinitha V Pillai <[email protected]>Signed-off-by Udit Agarwal <[email protected]>---
updated subject and applied to fsl-qoriq master, awaiting upstream
--pk