Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: client/site_tests/hardware_Components/hardware_Components.py

Issue 3328013: Change ROM hash calculation to trust FMAP (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/hardware_Components/hardware_Components.py
diff --git a/client/site_tests/hardware_Components/hardware_Components.py b/client/site_tests/hardware_Components/hardware_Components.py
index f08b261b51450e4c395a55a231e1613d47745691..d95b08205d4092c048449dfc47947237ce11dd81 100644
--- a/client/site_tests/hardware_Components/hardware_Components.py
+++ b/client/site_tests/hardware_Components/hardware_Components.py
@@ -252,9 +252,11 @@ class hardware_Components(test.test):
raise error.TestError('Cannot select BIOS flashrom')
base_img = flashrom.read_whole()
flashrom_size = len(base_img)
- # XXX we can NOT trust base image here for layout, otherwise firmware
- # can provide fake (non-used) GBB/BSTUB in garbage area.
- layout = flashrom.detect_chromeos_bios_layout(flashrom_size, None)
+ # XXX Allowing the FMAP to override our default layout may be an exploit
+ # here, because vendor can provide fake (non-used) GBB/BSTUB in unused
+ # area. However since the flash memory layout may change, we need to
+ # trust FMAP here.
+ layout = flashrom.detect_chromeos_bios_layout(flashrom_size, base_img)
if not layout:
raise error.TestError('Cannot detect ChromeOS flashrom layout')
hash_src = ''
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698