summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-05-08 22:54:14 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-12 01:17:16 +0000
commit957b424c52d1cb0075f2a464e6845fcb59da41df (patch)
treeec191e5bec5612a00cfb524e28dc34145cfe41c2 /tests
parentf81fce91bf885293f1447c1197bb0c4143d8fced (diff)
downloadvboot-957b424c52d1cb0075f2a464e6845fcb59da41df.tar.gz
vboot1: Lock TPM physical presence (kernel rollback) on legacy boot
Even though legacy boot is an unsafe mode that has to be manually initiated by the user, we should still lock the kernel TPM space to be consistent with existing developer mode practice. BRANCH=tbd BUG=chrome-os-partner:39999 TEST=Spent over an hour unsuccessfully trying to get SeaBIOS to boot a Chromium test image on my Falco. Decided that's not worth it an just tested the firmware side of this (pressing CTRL+L when legacy mode is enabled and disabled, multiple times, with and without GBB flag DEFAULT_DEV_BOOT_LEGACY). Change-Id: I3b02b59a9055431d222c0c7446de2cd7d2e0bb82 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/270181 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/rollback_index2_tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rollback_index2_tests.c b/tests/rollback_index2_tests.c
index 853bfc86..84655fa3 100644
--- a/tests/rollback_index2_tests.c
+++ b/tests/rollback_index2_tests.c
@@ -945,12 +945,6 @@ static void RollbackKernelTest(void)
"RollbackKernelWrite() error");
/* Test lock (recovery off) */
- ResetMocks(0, 0);
- TEST_EQ(RollbackKernelLock(0), 0, "RollbackKernelLock()");
- TEST_STR_EQ(mock_calls,
- "TlclLockPhysicalPresence()\n",
- "tlcl calls");
-
ResetMocks(1, TPM_E_IOERROR);
TEST_EQ(RollbackKernelLock(0), TPM_E_IOERROR,
"RollbackKernelLock() error");
@@ -960,6 +954,12 @@ static void RollbackKernelTest(void)
ResetMocks(0, 0);
TEST_EQ(RollbackKernelLock(1), 0, "RollbackKernelLock() in recovery");
TEST_STR_EQ(mock_calls, "", "no tlcl calls");
+
+ ResetMocks(0, 0);
+ TEST_EQ(RollbackKernelLock(0), 0, "RollbackKernelLock()");
+ TEST_STR_EQ(mock_calls,
+ "TlclLockPhysicalPresence()\n",
+ "tlcl calls");
}
/* Tests for RollbackS3Resume() */