summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authorAkilesh Kailash <akailash@google.com>2021-12-01 11:04:45 +0000
committerAkilesh Kailash <akailash@google.com>2021-12-01 20:37:56 +0000
commit437522958814ef523d62d7fa988fef495cf7f6f4 (patch)
tree51f37c08011f4d6b8f5b7f16c5a2ef286a613e8b /libutils/Threads.cpp
parent4f95599b96bb6431e56cfb93ff4f7e31c4322edf (diff)
snapuserd: Address alignment fault on 32-bit systems
When the scratch space is mmap'ed, the metadata buffer will be un-aligned. This may lead to alignment fault on 32-bit systems. Address this by temporarily copying it to buffer. No perf impact as this code path is not in I/O path and the copy is a for the size of metadata buffer which is 8k. Bug: 206426215 Test: Full and Incremental OTA on pixel 1: Compile snapuserd as 32 bit and reproduced the bug on pixel. 2: With fix - OTA applied successfully. 3: Reboot the device when merge was in-flight as the fix is primarily in that path. 4: Verify merge completion and data integrity post merge. Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: Icd4a21d6a61f1ab36e65994c06a4d049a2ee741c Merged-In: I63c0d862057ebf138c9d1696a942030e30598739
Diffstat (limited to 'libutils/Threads.cpp')
0 files changed, 0 insertions, 0 deletions