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 = '' |