summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2021-04-26 13:44:49 -0400
committerKelvin Zhang <zhangkelvin@google.com>2021-05-06 09:58:11 -0400
commit9105f4baeb254e45117ab91c396f0d45a4c8b9ca (patch)
treeee2709f66298be280e0a51c524e2f2777e7dbbbe /scripts/update_payload/format_utils.py
parenta9b5d8c8eec4534c3433466fc6766ede675d16ce (diff)
Fix verity discarded bug
If update_engine opens CowWriterFileDescriptor w/o writing anything, data past the resume label is readable while fd is open, but will be discarded once the fd is closed. Such "phantom read" causes inconsistency. This CL contains two changes to address the above bug: 1. When device reboots after update, all I/O are served by snapuserd. update_engine should use snapuserd for verification to emulate bahvior of device after reboot. 2. When a CowWriterFd is opened, don't call Finalize() if no verity is written. Since past-the-end data is discarded when we call Finalize() Test: th Bug: 186196758 Change-Id: Ia1d31b671c16fded7319677fe0397f1288457201
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions