Commit graph

71606 commits

Author SHA1 Message Date
Steven Moreland
55862852fe Merge "libutils: LightRefBase: incStrongRequireStrong" am: 1c65d40154 am: b31a05bb47 am: 77b47c4185
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696268

Change-Id: Ia753aaf062e8d58c60ca1113922165a2946a9a07
2021-05-05 00:44:45 +00:00
Steven Moreland
77b47c4185 Merge "libutils: LightRefBase: incStrongRequireStrong" am: 1c65d40154 am: b31a05bb47
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696268

Change-Id: I136454f7dfa6e237fc40e7f1ef16ee4f300e9c0b
2021-05-05 00:27:12 +00:00
Steven Moreland
b31a05bb47 Merge "libutils: LightRefBase: incStrongRequireStrong" am: 1c65d40154
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696268

Change-Id: I95b4c3241f60be46d959c4d0477b9fd81a6fd286
2021-05-05 00:08:54 +00:00
Steven Moreland
1c65d40154 Merge "libutils: LightRefBase: incStrongRequireStrong" 2021-05-04 23:52:12 +00:00
Christopher Ferris
19b4af0945 Merge "Re-add backtrace note about unreadable elf." am: 24b15570b1 am: f1204ae11a am: a6bbbcedb4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1677039

Change-Id: Ideae1115d6f1eea0502dcc0bd7af4a2e006564fc
2021-05-04 22:49:04 +00:00
Christopher Ferris
a6bbbcedb4 Merge "Re-add backtrace note about unreadable elf." am: 24b15570b1 am: f1204ae11a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1677039

Change-Id: Iab3f56a249d332f5709455c5bd2cbc0790a61c4f
2021-05-04 22:32:32 +00:00
Christopher Ferris
f1204ae11a Merge "Re-add backtrace note about unreadable elf." am: 24b15570b1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1677039

Change-Id: I474af94e5ae8e18b05afd1f65fa435438b90c49d
2021-05-04 21:59:09 +00:00
Eric Biggers
6ba6672ce7 Merge "init: make reboot_on_failure not apply to manually stopped services" am: 890fd0c239 am: 7a07e8c1ad am: 506762b310
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1684056

Change-Id: Ia6a0f3b488a278c062b5cb6a01bc95300bbf788a
2021-05-04 21:53:53 +00:00
Christopher Ferris
24b15570b1 Merge "Re-add backtrace note about unreadable elf." 2021-05-04 21:44:53 +00:00
Steven Moreland
c2dc7cd31c libutils: LightRefBase: incStrongRequireStrong
Allow LightRefBase to be used with
ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION, mainly for
libhwui.

Bug: N/A
Test: libutils_test
Change-Id: I251c874a80f0a069572bc51da45f8f8e74ba6f5b
2021-05-04 21:42:26 +00:00
Eric Biggers
506762b310 Merge "init: make reboot_on_failure not apply to manually stopped services" am: 890fd0c239 am: 7a07e8c1ad
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1684056

Change-Id: I1850c2de08e94b12dcd92c8eaab6baefee457c0e
2021-05-04 21:37:32 +00:00
Eric Biggers
7a07e8c1ad Merge "init: make reboot_on_failure not apply to manually stopped services" am: 890fd0c239
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1684056

Change-Id: I5a89eea733b7c7fbbb4f73a766eb01feea36e0cb
2021-05-04 21:21:03 +00:00
Eric Biggers
890fd0c239 Merge "init: make reboot_on_failure not apply to manually stopped services" 2021-05-04 21:06:12 +00:00
Treehugger Robot
d75ae7e086 Merge "Add a small testcase for snapshot writer." am: f737614ce9 am: 4ed4ac6ea4 am: ab8ebd8542
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696066

Change-Id: Icba91ab8f16dabed7e14fdb8ff452681005582b7
2021-05-04 20:44:45 +00:00
Treehugger Robot
ab8ebd8542 Merge "Add a small testcase for snapshot writer." am: f737614ce9 am: 4ed4ac6ea4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696066

Change-Id: I98f2d2225efa2b1e30fea04383b285dd8508b282
2021-05-04 20:24:29 +00:00
Treehugger Robot
4ed4ac6ea4 Merge "Add a small testcase for snapshot writer." am: f737614ce9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696066

Change-Id: I5e15b76ffe92f930bfbb373f72a2741c1c07138d
2021-05-04 20:02:12 +00:00
Treehugger Robot
f737614ce9 Merge "Add a small testcase for snapshot writer." 2021-05-04 19:37:19 +00:00
Kelvin Zhang
ab42259321 Add a small testcase for snapshot writer.
update_engine heavily relies on snapshot writer, add a testcase

Test: th
Change-Id: I4e3cf47dcff92ec4df0b3b84a0a8c7cb7866e7e7
2021-05-04 13:51:34 -04:00
Tri Vo
bbc9f3216e Merge "trusty: Helper library for metrics" am: e23e85bee5 am: 1eed4fbf64 am: e8f8a915d1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1629434

Change-Id: Ic516d1bc54eaee18751400f40f8c7b00a0b68ac5
2021-05-04 15:04:21 +00:00
Tri Vo
e8f8a915d1 Merge "trusty: Helper library for metrics" am: e23e85bee5 am: 1eed4fbf64
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1629434

Change-Id: Ia54a4aa6dd5768f6e0ca44fb15eb72b22499a477
2021-05-04 14:47:41 +00:00
Tri Vo
1eed4fbf64 Merge "trusty: Helper library for metrics" am: e23e85bee5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1629434

Change-Id: Ie2a265b9ad6b18902a395d12eb2bd9e4d2310b11
2021-05-04 14:31:27 +00:00
Tri Vo
e23e85bee5 Merge "trusty: Helper library for metrics" 2021-05-04 14:17:05 +00:00
Akilesh Kailash
27595361c0 Merge changes from topic "snapuserd-enable-read-ahead" am: 362b2b7537 am: aa5be17a2a am: 646db6c47c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690661

Change-Id: Ie3084fe832b1a93c7fd6321e92a359497df08a2c
2021-05-04 05:34:15 +00:00
Akilesh Kailash
646db6c47c Merge changes from topic "snapuserd-enable-read-ahead" am: 362b2b7537 am: aa5be17a2a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690661

Change-Id: I3d4a8307106710447a1eb91a2fecceab9a779216
2021-05-04 05:06:04 +00:00
Akilesh Kailash
aa5be17a2a Merge changes from topic "snapuserd-enable-read-ahead" am: 362b2b7537
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690661

Change-Id: Iccce1cbfcd7e99e40a5be8ff8a4ecbc64ba24cb0
2021-05-04 04:47:11 +00:00
Eric Biggers
1c51525f66 init: make reboot_on_failure not apply to manually stopped services
Add a new service flag SVC_STOPPING which tracks whether a service is
being manually stopped by init, and make the "reboot_on_failure" service
setting not apply when SVC_STOPPING is set.

This is needed for devices that use FDE, because otherwise the device
reboots during the following init script fragment:

    on property:vold.decrypt=trigger_shutdown_framework
        class_reset late_start
        class_reset main
        class_reset_post_data core
        class_reset_post_data hal

... because that stops all services, including apexd which has been
marked with reboot_on_failure since
https://android-review.googlesource.com/c/platform/system/apex/+/1325212.
So init was killing apexd, then rebooting the device because apexd
"failed" due to having been killed.  Making reboot_on_failure not apply
when init stops a service itself fixes the problem.

This is one of a set of changes that is needed to get FDE working again
so that devices that launched with FDE can be upgraded to Android 12.

Bug: 186165644
Test: Tested FDE on Cuttlefish
Change-Id: I599f7ba107e6c126e8f31d0ae659f0ae672a25e4
2021-05-03 21:38:50 -07:00
Akilesh Kailash
362b2b7537 Merge changes from topic "snapuserd-enable-read-ahead"
* changes:
  libsnapshot: snapuserd: Enable read-ahead functionality
  libsnapshot: Bump up the kCowVersionManifest version
2021-05-04 04:28:29 +00:00
Akilesh Kailash
a1647cfe47 Merge changes from topic "snapuserd-read-ahead" am: eebf447fef am: fcc5b53c7e am: 6093592fbb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1656316

Change-Id: If48d39cf0bc1ae6cf2cc91d1a24acea65f6faa68
2021-05-04 02:50:42 +00:00
Akilesh Kailash
b2e125cb1a libsnapshot: snapuserd: Enable read-ahead functionality
This enables read-ahead functionality by having
scratch space in the COW

Bug: 183863613
Test: OTA tests with new COW format

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I7988687c81d0ea239e71695818199db4653ddb80
2021-05-04 02:41:35 +00:00
Akilesh Kailash
c67686ecb9 libsnapshot: Bump up the kCowVersionManifest version
kCowVersionManifest will be 2. This should now
be in sync with kCowVersionMajor.

Bug: 183863613
Test: OTA with new COW format (by enabling scratch space option)
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ia6c31e399de723ee83459b59d6b076b48f5c88d5
2021-05-04 02:41:23 +00:00
Akilesh Kailash
6093592fbb Merge changes from topic "snapuserd-read-ahead" am: eebf447fef am: fcc5b53c7e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1656316

Change-Id: I8861386eb0289bd7d473cbad04cb2b2e3f527ace
2021-05-04 01:31:37 +00:00
Akilesh Kailash
fcc5b53c7e Merge changes from topic "snapuserd-read-ahead" am: eebf447fef
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1656316

Change-Id: I9d623ff7206acc32bec19974672a9f7204f32e16
2021-05-04 01:16:25 +00:00
Akilesh Kailash
eebf447fef Merge changes from topic "snapuserd-read-ahead"
* changes:
  libsnapshot:snapuserd:Add unit test for read-ahead code path.
  libsnapshot: Flush data to scratch space only for overlapping regions
  libsnapshot:snapuserd: read-ahead COW copy ops
  libsnapshot: Retrieve COW version from update engine manifest
  libsnapshot:snapuserd: Add 2MB scratch space in COW file
  libsnapshot:snapuserd: mmap + msync header after merge
2021-05-04 00:55:28 +00:00
Tri Vo
a8919a2e82 trusty: Helper library for metrics
Bug: 182489121
Test: libtrusty_metrics_test
Change-Id: I7fc45ea3319185a8ac55889e56bd484d4774e928
2021-05-03 17:15:30 -07:00
Christopher Ferris
fe751c5a61 Re-add backtrace note about unreadable elf.
When moving to the proto-ized tombstones, the note about unreadable
elf files in a backtrace got lost. This re-adds it and adds a test
to verify that the note properly shows up.

Bug: 185428454

Test: Ran unit tests.
Change-Id: I1150cc737772e1b79fd73ec5c782caadc4629421
2021-05-03 15:21:11 -07:00
Treehugger Robot
d41a75a5f0 Merge "Make mkbootfs self-contained" am: 4f8a56f15d am: 14f3b1b0d2 am: 434735eab7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690535

Change-Id: I6bbf10d4d326d069f8e311ade2b487e7c66bc201
2021-05-03 18:03:59 +00:00
Treehugger Robot
434735eab7 Merge "Make mkbootfs self-contained" am: 4f8a56f15d am: 14f3b1b0d2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690535

Change-Id: I8c679e880ecea0539d84bd2a0cd4dd09fcc8fbb8
2021-05-03 17:39:48 +00:00
Treehugger Robot
14f3b1b0d2 Merge "Make mkbootfs self-contained" am: 4f8a56f15d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690535

Change-Id: If2264860a48b2c5e240808eccace000a30689952
2021-05-03 17:18:57 +00:00
Treehugger Robot
4f8a56f15d Merge "Make mkbootfs self-contained" 2021-05-03 16:58:55 +00:00
Yi-Yo Chiang
288f9eec0f Make mkbootfs self-contained
Now that mkbootfs is in prebuilt build tools, make it have no dynamic
dependency so that the binary is portable.

Bug: 184490452
Test: Presubmit
Change-Id: Ida4ee9af3c51ba9d163cf9c1e7b7098fd24e0de1
2021-05-02 19:36:23 +08:00
Treehugger Robot
8f4082617e Merge "filesystem_config: Add a aid/uid for UWB subsystem" am: 2de90ca526 am: a6528dee6e am: 000f1c0fd3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690654

Change-Id: Ia2c811c60616eb1033fc44e5e1a431b04b86998c
2021-04-30 20:10:17 +00:00
Treehugger Robot
000f1c0fd3 Merge "filesystem_config: Add a aid/uid for UWB subsystem" am: 2de90ca526 am: a6528dee6e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690654

Change-Id: I14327ad6b7d91e3e899f5bd7470539eed5247b11
2021-04-30 19:40:15 +00:00
Treehugger Robot
a6528dee6e Merge "filesystem_config: Add a aid/uid for UWB subsystem" am: 2de90ca526
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690654

Change-Id: I250b410112c97ad4f2e1023b85a6a5c8f6a5c0c5
2021-04-30 19:22:48 +00:00
Akilesh Kailash
b913e9d261 Merge "libsnapshot: Add Version field which will be used by update-engine manifest" am: 0ec13ceda9 am: a728724a34 am: 0bfd808995
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1676194

Change-Id: Iddee4f742bc6dfb8c7e07b0d5697360f5404d4fa
2021-04-30 19:08:03 +00:00
Treehugger Robot
2de90ca526 Merge "filesystem_config: Add a aid/uid for UWB subsystem" 2021-04-30 19:04:57 +00:00
Akilesh Kailash
0bfd808995 Merge "libsnapshot: Add Version field which will be used by update-engine manifest" am: 0ec13ceda9 am: a728724a34
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1676194

Change-Id: I7411a1b89bb3efe4c069f6e5b039c449252f0644
2021-04-30 18:50:57 +00:00
Akilesh Kailash
a728724a34 Merge "libsnapshot: Add Version field which will be used by update-engine manifest" am: 0ec13ceda9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1676194

Change-Id: Iec662bd6a12d8be199fe15ffb0511309110e0945
2021-04-30 18:26:15 +00:00
Akilesh Kailash
0ec13ceda9 Merge "libsnapshot: Add Version field which will be used by update-engine manifest" 2021-04-30 18:08:54 +00:00
Akilesh Kailash
936e9ce79d libsnapshot:snapuserd:Add unit test for read-ahead code path.
Add overlapping copy ops to test the read-ahead logic.

Bug: 183863613
Test: cow_snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ie96bc644c5f2eaae45cf048d9ba8a206930c3ce8
2021-04-30 06:49:03 +00:00
Akilesh Kailash
150bcbf7c6 libsnapshot: Flush data to scratch space only for overlapping regions
When read-ahead thread caches the data from base device, flush the data
only if there are overlapping regions. If there is crash, subsequent
reboot will not recover the data from scratch space. Rather, data
will be re-constructed from base device.

Additionally, allow batch merge of blocks by the kernel even for
overlapping region given that we have the read-ahead thread
taking care of the overlapping blocks.

Bug: 183863613
Test: 1: Incremental OTA from build 7284758 to 7288239. Merge time
         reduces from ~6 minutes to ~2.5 minutes
      2: Reboot and crash kernel multiple times when merge was in
         progress
      3: Verify read-ahead thread re-constructs the data for overlapping
         region.
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I50e0d828f4fb36a23f0ca13b07a73229ba68874d
2021-04-30 06:46:47 +00:00