Commit graph

3152 commits

Author SHA1 Message Date
Treehugger Robot
1059810759 Merge "Fix race condition is commitCheckpoint" 2019-08-23 00:11:38 +00:00
Paul Lawrence
1d57f686a3 Fix race condition is commitCheckpoint
If cp_commitCheckpoint is called twice at the same time, the second call
to setBowState will fail.

Add lock to remove possibility, and protect all uses of isCheckpointing

Bug: 138952436
Test: Boots after flashing in checkpoint mode
Change-Id: I131298adc506c3c176774d15e642b13d5f991087
2019-08-22 09:55:32 -07:00
Paul Lawrence
4b140d397f Fix ext4/metadata/udc issue
Test: Cannot test since no device supports this combo
Bug: 137924328
Change-Id: I451c90e0826ede71876f3e4f260e7083f3ab3fdb
2019-08-14 10:00:09 -07:00
android-build-team Robot
c4fd7be670 Snap for 5797917 from 6c5e453f9e to qt-c2f2-release
Change-Id: I92e29452f176731c03fc482e5394cc5fad17c9c9
2019-08-13 03:09:06 +00:00
Jaegeuk Kim
7ebe1a4bd8 secdiscard: should call fsync to avoid reordering IOs am: 6c5e453f9e
am: 2af145ef20

Change-Id: I6580f3e7b2adbb910295657e3c6ae67b8893da2a
2019-08-12 11:52:18 -07:00
Jaegeuk Kim
ceac8b8587 secdiscard: should call fsync to avoid reordering IOs am: 6c5e453f9e
am: 732faaeb94

Change-Id: I8ae6f3b8e7950a9978741879d3b4ac344af61a60
2019-08-12 11:50:28 -07:00
Jaegeuk Kim
732faaeb94 secdiscard: should call fsync to avoid reordering IOs
am: 6c5e453f9e

Change-Id: I5710fcce302d040a29ff798df85bf71ef6e3fbb5
2019-08-12 11:39:56 -07:00
Jaegeuk Kim
2af145ef20 secdiscard: should call fsync to avoid reordering IOs
am: 6c5e453f9e

Change-Id: I90de814c136171d4ff2ce913b801171e7f27c70e
2019-08-12 11:39:55 -07:00
Jaegeuk Kim
6c5e453f9e secdiscard: should call fsync to avoid reordering IOs
Don't make stale zero'ing IO in block device after unlink, since filesystem
can reuse the block addresses and issue some IOs. If block layer reordered
two IOs, filesystem will see zero data, which crashes filesystem consistency.

Bug: 136964285
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.CrossProfileAppsHostSideTest
Change-Id: I43c13622d094cecda1c53468adc240002111d605
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-08-12 15:31:10 +00:00
David Anderson
0be952d362 Merge "libdm now requires linking to libext2_uuid." am: 9e821da9fe am: e91c2686e9
am: d26cb98c4d

Change-Id: Ie6988c9cdf17a1f36a4f9aa59544ba5f461d825b
2019-07-12 17:20:37 -07:00
David Anderson
d26cb98c4d Merge "libdm now requires linking to libext2_uuid." am: 9e821da9fe
am: e91c2686e9

Change-Id: I585749bae8d30931a164b5f2a7900fea2fe1aa29
2019-07-12 16:53:04 -07:00
David Anderson
e91c2686e9 Merge "libdm now requires linking to libext2_uuid."
am: 9e821da9fe

Change-Id: Id33c9fc83352535cb45f27e70dec6000c73b07a5
2019-07-12 16:25:24 -07:00
David Anderson
9e821da9fe Merge "libdm now requires linking to libext2_uuid." 2019-07-12 23:03:41 +00:00
Xin Li
ccf6d331b8 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master" am: 711f4faac3 -s ours am: e7487087d0 -s ours
am: 49304ac627

Change-Id: I0ef4e364f9afe14cec3a1c9a6d389709bf2e59ce
2019-07-09 17:24:55 -07:00
Xin Li
1c4860773a [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master am: 33080d8b49 -s ours am: 2c1e06e589 -s ours
am: 4c373e4563

Change-Id: If915398214afac55d629175c502dbaaa1a875f3c
2019-07-09 16:52:34 -07:00
Xin Li
49304ac627 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master" am: 711f4faac3 -s ours
am: e7487087d0 -s ours
am skip reason: subject contains skip directive

Change-Id: I94ad8ca99f9a6b2aa522e8371794d43ae8840117
2019-07-09 16:27:56 -07:00
Xin Li
e7487087d0 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master"
am: 711f4faac3 -s ours
am skip reason: subject contains skip directive

Change-Id: I334dfe94d70709434fd3c98c581a80cc4a7c00a4
2019-07-09 16:22:08 -07:00
Xin Li
4c373e4563 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master am: 33080d8b49 -s ours
am: 2c1e06e589 -s ours
am skip reason: subject contains skip directive

Change-Id: If8cd430d5b10fbc50fc0cde9314644ec34b2309b
2019-07-09 16:00:55 -07:00
Xin Li
2c1e06e589 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
am: 33080d8b49 -s ours
am skip reason: subject contains skip directive

Change-Id: Id76bbc6615fa330e65f857c365e96c446855a242
2019-07-09 15:18:16 -07:00
Xin Li
711f4faac3 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master" 2019-07-09 21:38:47 +00:00
Xin Li
33080d8b49 DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
Bug: 136196576
Change-Id: I2fc2c9bb2631e627ebe74b6f081819c1eb0f3fcd
2019-07-09 11:24:40 -07:00
android-build-team Robot
ec0cb71ca1 Snap for 5622519 from 59295fbb94 to pi-platform-release
Change-Id: I402d144258df8eefe4c87766616ba32221bfbb67
2019-07-08 23:36:54 +00:00
Xin Li
e39e69254e DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
am: aaea4b51ed

Change-Id: Id23cf76973224c771883eb1abb38191fc52d679b
2019-07-02 13:47:31 -07:00
Xin Li
aaea4b51ed DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016
Change-Id: I19ac2279aa2cb1c5ad444d25484aa1ec0d7efac6
2019-07-01 21:00:30 +00:00
Paul Lawrence
39a0ecec18 [automerger skipped] Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev am: dde9704664
am: 7d43cb0ae9 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history

Change-Id: I2b29a01279fcd03f35a17156d5eafc42ce510980
2019-06-28 15:07:54 -07:00
android-build-team Robot
dae28203f8 Snap for 5694913 from 7d43cb0ae9 to qt-c2f2-release
Change-Id: I1c3491d2e7453d6d909292bb706b1c6d0b6f898d
2019-06-28 04:02:45 +00:00
Paul Lawrence
d233d202ba [automerger skipped] Merge "Add property to prevent commit for Vts test" am: 5bcfb5bf45 am: 3507d68556 -s ours
am: d5fe5cfcb5 -s ours
am skip reason: change_id I20441964dbc7b6ad5b445fa17a1374c1282bbbd8 with SHA1 3f1ce062d5 is in history

Change-Id: Iab7f9bf4e3d7968384b2a35ae398e60e84bf0664
2019-06-27 17:06:54 -07:00
Paul Lawrence
d5fe5cfcb5 [automerger skipped] Merge "Add property to prevent commit for Vts test" am: 5bcfb5bf45
am: 3507d68556 -s ours
am skip reason: change_id I20441964dbc7b6ad5b445fa17a1374c1282bbbd8 with SHA1 3f1ce062d5 is in history

Change-Id: I2a5fe3fc7bbf3af55facde1ab07bd0559d8e7d87
2019-06-27 16:46:06 -07:00
Paul Lawrence
125e79e344 [automerger skipped] Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev am: dde9704664 -s ours
am: 13539f79f5 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history

Change-Id: I0ed87e8107d4007c42545397d2cb03628527671a
2019-06-27 16:38:26 -07:00
Paul Lawrence
3507d68556 Merge "Add property to prevent commit for Vts test"
am: 5bcfb5bf45

Change-Id: Ic6b0e863fb9c6ddea2cb19390a9520c3c87cf704
2019-06-27 16:26:57 -07:00
Paul Lawrence
13539f79f5 [automerger skipped] Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev
am: dde9704664 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history

Change-Id: I11c77206000895c27aee9ad8326778ec95e233df
2019-06-27 16:25:58 -07:00
Paul Lawrence
7d43cb0ae9 Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev
am: dde9704664

Change-Id: I091c8d095b29dc966da86c2d4c93281615043355
2019-06-27 16:25:15 -07:00
Treehugger Robot
5bcfb5bf45 Merge "Add property to prevent commit for Vts test" 2019-06-27 22:39:57 +00:00
TreeHugger Robot
dde9704664 Merge "Make ext4 userdata checkpoints work with metadata encryption" into qt-dev 2019-06-27 22:36:27 +00:00
David Anderson
10de69d7bb libdm now requires linking to libext2_uuid.
Bug: 135771280
Test: mm vold -j
Change-Id: Id71c71926841581d4d3bc4a66f4c06294df21028
2019-06-27 13:41:03 -07:00
Paul Lawrence
4f4c7263ea Merge "Make ext4 userdata checkpoints work with metadata encryption" am: 2c792e0720 am: 5f19ef31c8
am: 4ad86a9315

Change-Id: I84b4618240530e4368a6275b84a456da9b518057
2019-06-27 11:13:01 -07:00
Paul Lawrence
4ad86a9315 Merge "Make ext4 userdata checkpoints work with metadata encryption" am: 2c792e0720
am: 5f19ef31c8

Change-Id: I7da7077c70484cb5873b9316058bc73158c19ab6
2019-06-27 11:03:03 -07:00
Paul Lawrence
5f19ef31c8 Merge "Make ext4 userdata checkpoints work with metadata encryption"
am: 2c792e0720

Change-Id: I1aed54ccf98fb73b29ed13fa971bbfbb25a489ae
2019-06-27 10:50:06 -07:00
Paul Lawrence
b5ebd7d9c7 Make ext4 userdata checkpoints work with metadata encryption
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.

Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
    Unfortunately metadata is not wiped by fastboot -w, so it is
    necessary to rm metadata/vold -rf whenever you wipe data.
    fastboot flashall -w works
    fastboot reboot -w works
    A normal boot works
    Disable checkpoint commits with
    setprop persist.vold.dont_commit_checkpoint 1
    vdc checkpoint startCheckpoint 10
    adb reboot
    wait for device to fully boot then
    adb reboot
    Wait for device to fully boot then
    adb logcat -d | grep Checkpoint shows the rollback in the logs

    This tests encryption on top of checkpoints with commit, encryption
    without checkpoints, and rollback, which seems to be the key cases.

    Also ran same tests on unmodified Taimen and Blueline

Bug: 135905679
Merged-In: I8365a40298b752af4bb10d00d9ff58ce04beab1f
Change-Id: I8365a40298b752af4bb10d00d9ff58ce04beab1f
2019-06-27 17:42:25 +00:00
Treehugger Robot
2c792e0720 Merge "Make ext4 userdata checkpoints work with metadata encryption" 2019-06-27 17:29:03 +00:00
Tri Vo
b8e6df416e Merge "vold: use RAII wake locks" am: b585363d93 am: 99fd2a4b5a
am: a4a04f5717

Change-Id: Ifc5e42eaebc4e07688180e008612c5b2de3d7caf
2019-06-27 09:12:35 -07:00
android-build-team Robot
db3270a460 Snap for 5691653 from cd5df6e1ef to qt-c2f2-release
Change-Id: Ia29b034ba05fb150d148ad8ab53b447ddd1cdacb
2019-06-27 03:08:27 +00:00
Tri Vo
a4a04f5717 Merge "vold: use RAII wake locks" am: b585363d93
am: 99fd2a4b5a

Change-Id: I8e37d315ecb6bad994d2a9c748cfc835756e265e
2019-06-26 19:43:21 -07:00
Tri Vo
99fd2a4b5a Merge "vold: use RAII wake locks"
am: b585363d93

Change-Id: I21be9e28c19901c9ca3aa91eb2f7394d1f788ff2
2019-06-26 19:30:09 -07:00
Tri Vo
b585363d93 Merge "vold: use RAII wake locks" 2019-06-27 01:59:08 +00:00
Android Build Merger (Role)
e7cd361716 Merge "[automerger skipped] Restore historical behavior with fsck_msdos (always accept fixes). am: 3601f4790b am: cd5df6e1ef -s ours am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history" into qt-r1-dev-plus-aosp 2019-06-26 22:23:00 +00:00
Xin Li
201932c1b9 [automerger skipped] Restore historical behavior with fsck_msdos (always accept fixes). am: 3601f4790b
am: cd5df6e1ef -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history

Change-Id: I8c1479273fc202237237f57a3ed2e79401083dd5
2019-06-26 15:22:32 -07:00
Xin Li
adeb6833b2 [automerger skipped] Restore historical behavior with fsck_msdos (always accept fixes). am: 3601f4790b -s ours
am: 0092301976 -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history

Change-Id: Ife2798dfa4052da6c8fe8512f5899efd3a11cfe8
2019-06-26 15:22:31 -07:00
Paul Lawrence
236e5e800e Make ext4 userdata checkpoints work with metadata encryption
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.

Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
    Unfortunately metadata is not wiped by fastboot -w, so it is
    necessary to rm metadata/vold -rf whenever you wipe data.
    fastboot flashall -w works
    fastboot reboot -w works
    A normal boot works
    Disable checkpoint commits with
    setprop persist.vold.dont_commit_checkpoint 1
    vdc checkpoint startCheckpoint 10
    adb reboot
    wait for device to fully boot then
    adb reboot
    Wait for device to fully boot then
    adb logcat -d | grep Checkpoint shows the rollback in the logs

    This tests encryption on top of checkpoints with commit, encryption
    without checkpoints, and rollback, which seems to be the key cases.

Bug: 135905679
Change-Id: I8365a40298b752af4bb10d00d9ff58ce04beab1f
2019-06-26 15:19:24 -07:00
Xin Li
0092301976 [automerger skipped] Restore historical behavior with fsck_msdos (always accept fixes).
am: 3601f4790b -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history

Change-Id: Ib97568c9eaecb3c52e4703f7d14a8235b9cc0cc4
2019-06-26 15:09:02 -07:00