summaryrefslogtreecommitdiff
path: root/tests/vboot_api_kernel2_tests.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-09-28 15:53:21 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-05 21:24:44 -0700
commit95554e4e62dc2ae8333a6487f973f830753de071 (patch)
tree37e80b101da6553108bb641e147b91bcf8e0a489 /tests/vboot_api_kernel2_tests.c
parente95ceff307f6c5c457f3e805991804ae2c7cb50c (diff)
downloadvboot-95554e4e62dc2ae8333a6487f973f830753de071.tar.gz
Check EC_IN_RW before proceeding to recovery mode
Depthcharge currently asks EC whether recovery was requested manually or not without verifying EC is in RO or not. If EC-RW is compromised, recovery switch state can be spoofed. This patch makes Depthcharge check EC_IN_RW to determine whether EC is in RO or not. Only if it's in RO and it says recovery button was pressed at boot, we proceed to the recovery process. All other recovery requests including manual recovery requested by a (compromised) host will end up with 'broken' screen. BUG=b:66516882 BRANCH=none TEST=Boot Fizz. make runtests. Change-Id: I01d2df05fe22e79bbc949f5cb83db605147667b3 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/693008 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/vboot_api_kernel2_tests.c')
-rw-r--r--tests/vboot_api_kernel2_tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/vboot_api_kernel2_tests.c b/tests/vboot_api_kernel2_tests.c
index f6776e9e..02a9087a 100644
--- a/tests/vboot_api_kernel2_tests.c
+++ b/tests/vboot_api_kernel2_tests.c
@@ -591,8 +591,8 @@ static void VbBootRecTest(void)
TEST_EQ(VbBootRecovery(&ctx, &cparams),
VBERROR_SHUTDOWN_REQUESTED,
"No remove in rec");
- TEST_EQ(screens_displayed[0], VB_SCREEN_RECOVERY_INSERT,
- " insert screen");
+ TEST_EQ(screens_displayed[0], VB_SCREEN_OS_BROKEN,
+ " broken screen");
/* Removal if no disk initially found, but found on second attempt */
ResetMocks();