platform_system_core/fs_mgr/libsnapshot
David Anderson db25e8e32d libsnapshot: Fix premature truncation in CowWriter.
When opening in append mode, we ftruncate() the COW. This has three side
effects:
 (1) If the COW is never modified, or Finalized(), the state of the COW
     will have changed. Ideally it should only change on an explicit
     write operation.
 (2) Data after the current cluster will be accidentally thrown away.
 (3) The ending "cluster" op will be thrown away if the current cluster
     was incomplete, and thus the last valid label could be invalidated.

Bug: 183985866
Test: cow_api_test
Change-Id: I3c9a38553b7492a3d6e71d177d75ddb1b6490dfe
2021-04-12 21:52:06 -07:00
..
android/snapshot libsnapshot: Add boot_complete metrics. 2021-03-12 18:35:44 -08:00
corpus libsnapshot_fuzzer: add initial corpus 2020-05-06 17:10:34 -07:00
include/libsnapshot Merge "libsnapshot: Add diagnostics for DM_DEV_REMOVE failures." 2021-04-12 21:04:08 +00:00
include_test/libsnapshot libsnapshot: Add a test for when partitions shrink and grow simultaneously. 2021-01-26 14:48:09 -08:00
update_engine libsnapshot: Use the compression algorithm specified in the DeltaArchiveManifest. 2021-03-03 18:27:54 -08:00
Android.bp libsnapshot: Add diagnostics for DM_DEV_REMOVE failures. 2021-04-08 11:06:12 -07:00
cow_api_test.cpp libsnapshot: Fix premature truncation in CowWriter. 2021-04-12 21:52:06 -07:00
cow_decompress.cpp libsnapshot: Add support for brotli compression. 2020-09-15 16:15:33 -07:00
cow_decompress.h libsnapshot: Add support for brotli compression. 2020-09-15 16:15:33 -07:00
cow_format.cpp libsnapshot: Group CowOperations into clusters 2020-12-02 21:31:22 -08:00
cow_reader.cpp libsnapshot:snapuserd: Cut down memory usage 2021-03-19 06:32:52 +00:00
cow_snapuserd_test.cpp libsnapshot:snapuserd: Batch merge copy operation 2021-02-09 23:53:49 +00:00
cow_writer.cpp libsnapshot: Fix premature truncation in CowWriter. 2021-04-12 21:52:06 -07:00
device_info.cpp libsnapshot: Remove special-case code for first-stage init. 2020-11-23 04:14:08 +00:00
device_info.h libsnapshot: Remove special-case code for first-stage init. 2020-11-23 04:14:08 +00:00
dm_snapshot_internals.h COW file size: better explain the exception size 2021-02-17 09:47:13 +00:00
estimate_cow_from_nonab_ota.cpp reland: Rename Flush to Finalize 2020-10-22 02:34:26 -07:00
fuzz.sh Rename native code coverage paths env. variable in libsnapshot's fuzz test. 2020-06-10 13:04:53 +01:00
fuzz_utils.cpp libsnapshot_fuzzer: use protobuf 2020-04-30 23:05:36 -07:00
fuzz_utils.h Reland "libsnapshot_fuzzer: Add tests" 2020-05-15 14:34:01 -07:00
inspect_cow.cpp libsnapshot: Add decompression check to Inspect_Cow 2020-12-28 18:20:19 -08:00
make_cow_from_ab_ota.cpp libsnapshot: Support cluster_ops in make_cow_from_ab_ota 2020-12-02 21:31:23 -08:00
OWNERS Add balsini@ as libsnapshot owner 2020-01-09 10:11:45 +00:00
partition_cow_creator.cpp libsnapshot: Collect more COW size data in snapshot merge stats. 2021-03-03 21:46:24 -08:00
partition_cow_creator.h libsnapshot: Use the compression algorithm specified in the DeltaArchiveManifest. 2021-03-03 18:27:54 -08:00
partition_cow_creator_test.cpp libsnapshot: COW size is computed within the container capability 2021-02-16 11:08:21 +00:00
power_test.cpp libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
PowerTest.md libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
return.cpp libsnapshot: delete WaitForMerge. 2020-03-03 13:19:49 -08:00
run_power_test.sh libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
snapshot.cpp libsnapshot: Add diagnostics for DM_DEV_REMOVE failures. 2021-04-08 11:06:12 -07:00
snapshot_fuzz.cpp Use more inclusive language for #inclusivefixit 2020-07-23 11:13:37 -07:00
snapshot_fuzz_utils.cpp libsnapshot_fuzzer: Properly unmap images 2020-05-15 17:05:26 -07:00
snapshot_fuzz_utils.h libsnapshot: Remove special-case code for first-stage init. 2020-11-23 04:14:08 +00:00
snapshot_metadata_updater.cpp Merge "libsnapshot: Properly set partial_update_" 2020-07-31 23:02:05 +00:00
snapshot_metadata_updater.h Update libsnapshot to handle partial update 2020-06-09 12:53:45 -07:00
snapshot_metadata_updater_test.cpp libsnapshot_test: skip global setup on non-VAB devices. 2020-08-06 17:21:50 -07:00
snapshot_reader.cpp libsnapshot: Group CowOperations into clusters 2020-12-02 21:31:22 -08:00
snapshot_reader.h libsnapshot: Implement OpenReader for CompressedSnapshotWriter. 2020-10-26 22:30:21 -07:00
snapshot_reader_test.cpp libsnapshot: Add Initialize and InitializeAppend methods to ISnapshotWriter. 2020-10-26 22:30:21 -07:00
snapshot_stats.cpp libsnapshot: Add boot_complete metrics. 2021-03-12 18:35:44 -08:00
snapshot_stub.cpp libsnapshot: Add boot_complete metrics. 2021-03-12 18:35:44 -08:00
snapshot_test.cpp libsnapshot:snapuserd: Terminate daemon after applying OTA. 2021-04-05 21:50:46 +00:00
snapshot_writer.cpp libsnapshot: Remove Initialize(fd, APPEND) 2020-11-05 18:38:58 -08:00
snapshotctl.cpp Add CLI entry point for map/unmap snapshot partitions 2021-03-22 13:43:14 -04:00
snapuserd.cpp libsnapshot:snapuserd: Cut down memory usage 2021-03-19 06:32:52 +00:00
snapuserd.h libsnapshot:snapuserd: Fix memory leak 2021-04-02 00:49:18 +00:00
snapuserd.rc Add support for compressed snapshot merges in fastboot. 2021-02-04 20:21:18 -08:00
snapuserd_client.cpp libsnaphot: Refactor cow_snapuserd test 2020-12-01 20:46:01 +00:00
snapuserd_daemon.cpp snapuserd: Add a no-socket mode. 2020-12-14 00:48:50 -08:00
snapuserd_daemon.h snapuserd: Add a no-socket mode. 2020-12-14 00:48:50 -08:00
snapuserd_server.cpp libsnapshot:snapuserd: Fix memory leak 2021-04-02 00:49:18 +00:00
snapuserd_server.h libsnapshot:snapuserd: Fix memory leak 2021-04-02 00:49:18 +00:00
snapuserd_worker.cpp libsnapshot:snapuserd: Cut down memory usage 2021-03-19 06:32:52 +00:00
test_helpers.cpp libsnapshot: Add a test for when partitions shrink and grow simultaneously. 2021-01-26 14:48:09 -08:00
utility.cpp libsnapshot: Pass the correct source device to snapuserd. 2021-01-20 18:17:08 -08:00
utility.h libsnapshot: Pass the correct source device to snapuserd. 2021-01-20 18:17:08 -08:00