diff options
author | Julius Werner <jwerner@chromium.org> | 2015-05-29 16:56:20 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-02 01:04:00 +0000 |
commit | 7e21698e42dba31cc3e3c6b58a31bd050d3698ac (patch) | |
tree | c6f2e5839de0e1a7f71ff80e31ae2e54c4c06acf /firmware/2lib/include/2return_codes.h | |
parent | 773b5ac3a61f4ced2e0815959a6824bf8ba62f4f (diff) | |
download | vboot-7e21698e42dba31cc3e3c6b58a31bd050d3698ac.tar.gz |
vboot2: secdata: Check struct_version on initializationstabilize-7134.B
This patch reintroduces a vb2_secdata->struct_version check similar to
the one that was removed in CL:244846. The CRC is not a reliable way to
detect zeroed buffers, so this check helps vboot fail earlier and more
clearly in certain situations.
BRANCH=kitty,smaug,storm,veyron
BUG=chrome-os-partner:40778
TEST=make runtests. Rebooted Jerry with 'mem w 0xff7601b0 0xfdb9', saw
that recovery reason was now 0x2b (VBNV_RECOVERY_VB2_SECDATA_INIT).
Change-Id: Ic4376d127e6d14d4ef9c2f53c83090040ca4cb68
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/274138
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r-- | firmware/2lib/include/2return_codes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index d05cd58b..81a59571 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -93,8 +93,8 @@ enum vb2_return_code { /* Bad CRC in vb2_secdata_check_crc() */ VB2_ERROR_SECDATA_CRC, - /* Bad struct version in vb2_secdata_init() */ - VB2_ERROR_SECDATA_VERSION, + /* Secdata is all zeroes (uninitialized) in vb2_secdata_check_crc() */ + VB2_ERROR_SECDATA_ZERO, /* Invalid param in vb2_secdata_get() */ VB2_ERROR_SECDATA_GET_PARAM, |