summaryrefslogtreecommitdiff
path: root/scripts/update_payload/common.py
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2013-05-03 12:49:28 -0700
committerChromeBot <chrome-bot@google.com>2013-05-07 00:03:14 -0700
commit382df5ce2f4b67bf0998b01c6fedcdb5c35ebef9 (patch)
treef134f56266c93512a10f7d8fff5bd06bd15e70a5 /scripts/update_payload/common.py
parente73dad9a9ea7121c9e80448dbda154c2510a860f (diff)
paycheck: enforce physical partition size correctly
During payload checking, payload has wrongly interpreted the size reported in the update payload to be the physical partition size, whereas this is in fact the size of the filesystem portion only (a misnomer). This sometimes caused it to emit errors on out-of-bounds operations, which are otherwise harmless in real-world scenarios. This CL makes a clear distinction between the two, with the following semantics: - The payload's embedded filesystem size must by <= the physical partition sizes. - Reading/writing from/to the new partition must be within the physical partition size boundaries, and not the filesystem ones. - Reading from the old partition is only allowed from filesystem boundaries; this is unchanged from current behavior and appears to be consistent with how we perform delta updates. - Old/new SHA256 verification during payload application is now limited to the allotted filesystem portion only (and not the full partition size). This is consistent with the update engine's semantics. - Other than that, this change currently has no further effect on payload application, which remains more permissive wrt to partition sizes. This also means that the sizes of partitions resulting from a payload application will not necessarily abide by the predetermined physical partition sizes. This is in line with the prevailing division of responsibilities between payload checking (strict) and application (relaxed). BUG=chromium:221847 TEST=Payload checking respects partition size override TEST=Unit tests pass TEST=Integration tests pass Change-Id: I0dbc88d538c0cc53b7551f4dfa8f543bcf480cd5 Reviewed-on: https://gerrit.chromium.org/gerrit/50103 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: David James <davidjames@chromium.org>
Diffstat (limited to 'scripts/update_payload/common.py')
-rw-r--r--scripts/update_payload/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/update_payload/common.py b/scripts/update_payload/common.py
index 6b5dbada..a8697306 100644
--- a/scripts/update_payload/common.py
+++ b/scripts/update_payload/common.py
@@ -46,7 +46,7 @@ class OpType(object):
#
-# Checker and hashed reading of data.
+# Checked and hashed reading of data.
#
def IntPackingFmtStr(size, is_unsigned):
"""Returns an integer format string for use by the struct module.