Randall Spangler
ad2adc4022
Invalidate hash if flash operation changes the hashed region
This prevents the EC from returning a stale hash.
BUG=chrome-os-partner:16668
BRANCH=link,snow
TEST=manual, with WP disabled
From EC console
- Boot system and wait a second
- hash --> prints valid hash
- flasherase 0x20000 0x1000
- hash --> invalid
- hash rw
- hash --> prints valid hash
- flashwrite 0x20000 0x1000
- hash --> invalid
- hash rw
- flasherase 0x38000 0x1000
- flashwrite 0x38000 0x1000
- hash --> still valid (since 0x38000 is outside the rw section)
From root shell
- ectool hash --> prints valid hash
- ectool flasherase 0x20000 0x1000
- ectool hash --> invalid
- ectool hash recalc RW
- ectool hash --> prints valid hash
- echo 'Making a hash of this' > /tmp/hashofthis
- ectool flashwrite 0x20000 /tmp/hashofthis
- ectool hash --> invalid
- ectool hash recalc RW
- ectool flasherase 0x38000 0x1000
- ectool flashwrite 0x38000 /tmp/hashofthis
- ectool hash --> still valid (since 0x38000 is outside the rw section)
Change-Id: Id915a504a7bc70b8b8c339b5ce55dc5bad5838fe
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39484
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2012-12-10 15:14:38 -08:00
..
2012-10-30 10:45:07 -07:00
2012-10-24 10:09:20 -07:00
2012-10-14 18:57:58 -07:00
2012-10-29 16:52:49 -07:00
2012-05-25 09:59:58 -07:00
2012-09-24 10:56:50 -07:00
2012-11-01 12:45:22 -07:00
2012-11-01 12:45:28 -07:00
2012-10-30 12:42:47 -07:00
2012-10-11 14:24:36 -07:00
2012-10-30 14:50:03 -07:00
2012-11-07 23:48:04 -08:00
2011-12-07 19:10:02 +00:00
2012-10-26 09:49:38 -07:00
2012-10-25 11:24:04 -07:00
2012-10-30 12:42:46 -07:00
2012-10-30 15:33:25 -07:00
2012-08-28 14:05:08 -07:00
2012-08-06 18:55:00 -07:00
2012-06-29 10:46:22 -07:00
2012-11-04 20:27:57 -08:00
2012-10-23 17:32:01 -07:00
2012-10-30 12:42:46 -07:00
2012-10-23 17:32:02 -07:00
2012-10-31 17:21:00 -07:00
2012-06-07 09:59:55 -07:00
2012-04-26 13:57:19 -07:00
2012-09-11 09:46:16 -07:00
2012-11-04 20:27:57 -08:00
2011-12-07 19:10:02 +00:00
2012-10-25 14:12:11 -07:00
2012-10-29 10:36:05 -07:00
2012-11-01 12:45:22 -07:00
2012-09-21 14:54:33 -07:00
2012-08-13 14:58:38 -07:00
2012-10-25 14:12:11 -07:00
2011-12-07 19:10:02 +00:00
2012-10-25 14:12:10 -07:00
2012-10-25 17:03:44 -07:00
2012-06-07 20:48:51 -07:00
2012-10-25 17:03:44 -07:00
2012-08-09 17:40:37 -07:00
2012-06-27 03:22:17 -07:00
2012-06-27 03:22:17 -07:00
2012-09-17 10:10:14 -07:00
2012-10-30 14:50:03 -07:00
2012-10-25 17:03:43 -07:00
2012-09-09 11:00:34 -07:00
2012-11-01 10:08:54 -07:00
2012-11-01 12:45:22 -07:00
2012-10-26 13:10:57 -07:00
2012-10-29 16:52:49 -07:00
2012-11-01 12:45:22 -07:00
2012-10-30 12:42:43 -07:00
2012-10-26 09:49:37 -07:00
2012-09-07 16:54:31 -07:00
2012-12-10 15:14:38 -08:00
2012-06-28 17:40:39 -07:00
2012-10-30 15:33:24 -07:00
2012-11-01 12:45:28 -07:00