Commit graph

64876 commits

Author SHA1 Message Date
Tri Vo
91bc8e8105 Merge changes I7741c7e5,I30bb2844,If55b93b1,Ife058ca2 am: 0b0f7f31b9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1482120

Change-Id: I011d2980090658ab49fb3b649f987b1371b4e41d
2020-11-02 23:50:18 +00:00
Tri Vo
0b0f7f31b9 Merge changes I7741c7e5,I30bb2844,If55b93b1,Ife058ca2
* changes:
  trusty: fuzz: dump trusty kernel logs on crash
  trusty: Add corpus for gatekeeper fuzzer
  trusty: Fuzzer for Gatekeeper TA
  trusty: fuzz: Helper library
2020-11-02 23:09:13 +00:00
Treehugger Robot
bd0fe606b7 Merge "Move e2fsck into /first_stage_ramdisk." am: 8b4a9a9a61
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1478507

Change-Id: I1ff6a9cf72259e8227e1fe657e6228c354655c5e
2020-11-02 22:51:02 +00:00
Treehugger Robot
8b4a9a9a61 Merge "Move e2fsck into /first_stage_ramdisk." 2020-11-02 21:33:07 +00:00
Yifan Hong
32f6dd81fa Merge changes from topic "toybox_vendor_ramdisk" am: 92836b2e95
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1470053

Change-Id: I1fb8569f312fe4f24de637fa1534be29853c287b
2020-11-02 19:04:59 +00:00
Yifan Hong
bac613c540 Make libraries {vendor_,}ramdisk_available. am: 89d1c19ca0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1470052

Change-Id: Ia219d450141246d1f66ba928f0b9ee3bd33887ee
2020-11-02 19:04:35 +00:00
Yifan Hong
92836b2e95 Merge changes from topic "toybox_vendor_ramdisk"
* changes:
  Add shell_and_utilities_vendor_ramdisk
  Make libraries {vendor_,}ramdisk_available.
2020-11-02 18:33:33 +00:00
Stephen Crane
5e3a3ce011 trusty: fuzz: dump trusty kernel logs on crash
Adds an Abort() function to the fuzzer utils library that grabs and
prints the relevant trusty kernel logs before exiting the fuzzer.

Test: /data/fuzz/arm64/trusty_gatekeeper_fuzzer/trusty_gatekeeper_fuzzer
Change-Id: I7741c7e5e0ffdc402e3d3dd9a7e5856e2a640dd2
2020-11-02 10:16:44 -08:00
Stephen Crane
6c0fb906f6 trusty: Add corpus for gatekeeper fuzzer
Test: /data/fuzz/arm64/trusty_gatekeeper_fuzzer/trusty_gatekeeper_fuzzer
Change-Id: I30bb2844972df952d853f0809e2eb8d5b5a1dd9c
2020-11-02 09:58:54 -08:00
Treehugger Robot
90cc94fb11 Merge "Cleanup symlink for system/core/{libbacktrace, libunwindstack}" am: c635d568ed
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1480662

Change-Id: I8d454480fce0117b58707b805b33eadc18b00fe6
2020-10-30 22:30:06 +00:00
Treehugger Robot
c635d568ed Merge "Cleanup symlink for system/core/{libbacktrace, libunwindstack}" 2020-10-30 21:57:31 +00:00
Ryan Savitski
77032375b7 Merge "dev devices with permissive boot: disable perf_event_paranoid" am: 3b268df195
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1478778

Change-Id: I3ae7111485806f12e3885da358615426e412c5e4
2020-10-30 18:01:28 +00:00
Ryan Savitski
3b268df195 Merge "dev devices with permissive boot: disable perf_event_paranoid" 2020-10-30 17:48:04 +00:00
Rick Yiu
d944315715 Merge changes from topic "aosp_use_uclamp" am: 32809d8231
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1473218

Change-Id: I0c1760ed9da1452bfbfe7239d53151431d2a8a22
2020-10-30 07:44:26 +00:00
Rick Yiu
32809d8231 Merge changes from topic "aosp_use_uclamp"
* changes:
  init: Add cpu controller hierarchy to use utilclamp controller
  libprocessgroup: Replace stune with utilclamp profiles
2020-10-30 07:12:32 +00:00
Baligh Uddin
0d6808eafe Merge "Cleanup references to system/core/liblog -> system/logging/liblog" am: 61adc0d239
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1475702

Change-Id: Ia04e42a2fff3aa17bffde22ed959d3baadd5104f
2020-10-30 01:59:54 +00:00
Baligh Uddin
14aa6aa8c7 Cleanup symlink for system/core/{libbacktrace, libunwindstack}
BUG: 170465278
Test: TH
Change-Id: Ib906c46141886e691f4fc908d7b2f5dbe5eeda08
2020-10-30 01:44:43 +00:00
Baligh Uddin
61adc0d239 Merge "Cleanup references to system/core/liblog -> system/logging/liblog" 2020-10-30 01:30:18 +00:00
Tri Vo
10ffc3417d trusty: Fuzzer for Gatekeeper TA
Test: /data/fuzz/arm64/trusty_gatekeeper_fuzzer/trusty_gatekeeper_fuzzer
Change-Id: If55b93b1a15c5bd9a1148ff54a859635a6e7290c
2020-10-29 18:02:01 -07:00
Tri Vo
e8823ffcb4 trusty: fuzz: Helper library
Test: /data/fuzz/arm64/trusty_gatekeeper_fuzzer/trusty_gatekeeper_fuzzer
Change-Id: Ife058ca25417e6bee4bf593b10a4e7e4000f9f2f
2020-10-29 18:01:59 -07:00
Yifan Hong
3337e782e6 Move e2fsck into /first_stage_ramdisk.
On devices without a dedicated recovery partition, it is possible that
e2fsck exists in /system/bin, not /first_stage_ramdisk/system/bin, if
it is using generic ramdisk. When force_normal_boot, /system/bin/e2fsck
would not exist during first stage mount.

In this case, move /first_stage_ramdisk/system/bin/e2fsck to
/system/bin/e2fsck before switching root into /first_stage_ramdisk.
Abort if the operation fails.

On devices launching with R, e2fsck should already exist in the correct
place, so skip moving if force_normal_boot and
/first_stage_ramdisk/system/bin/e2fsck already exists.

On devices launching before R, it is possible that /system/bin/e2fsck
does not exist. Skip moving if force_normal_boot and /system/bin/e2fsck
does not exist.

Fixes: 171326057
Test: boot with GKI and move_recover_resources_to_vendor_boot, and
      check serial output

Change-Id: I8008a4cad54c7c74a84cbcabe56723bf0e193025
2020-10-29 12:59:36 -07:00
Yifan Hong
91ec520939 Merge changes from topic "vendor_ramdisk" am: 0248561ae6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1478358

Change-Id: Ia0b6af9130badb8d4962bc27e48a681f6eb0522a
2020-10-29 17:49:29 +00:00
Yifan Hong
363d557428 libdebuggerd_handler_fallback: make vendor_ramdisk_available. am: 2ec92cfc28
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1477502

Change-Id: I0af6eba6f8be6ee4489dc814ff630be897aa03a2
2020-10-29 17:49:24 +00:00
Yifan Hong
861fd6376b libcutils: make vendor_ramdisk_available. am: 55015ffb82
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1477501

Change-Id: I68d5532918c31209c61733fb546b1fd4ee836eb7
2020-10-29 17:49:19 +00:00
Yifan Hong
4570aa6caa libpropertyinfoparser: make vendor_ramdisk_available. am: f3b2b96925
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1470051

Change-Id: Ic28b1777532d1c4b39b2640080b66db8f9234f4b
2020-10-29 17:48:59 +00:00
Ryan Savitski
ea93f110d2 dev devices with permissive boot: disable perf_event_paranoid
Some functionality based on eBPF attached to tracepoints (gpu memory
accounting and time-in-state) rely on newer devices running with
"disabled" perf_event_paranoid controls as a result of the kernel having
LSM hooks in the perf_event_open syscall instead. This is tested
for, and set up by init via the sys.init.perf_lsm_hooks sysprop.

Development devices that boot into permissive mode still want the
eBPF-based functionality to work, but end up with a paranoid value that
disallows the syscall, as the LSM hook test expects to observe a SELinux
denial (which doesn't happen due to permissiveness).

As a pragmatic way of achieving the paranoid value override, we pretend
that the hook test has succeeded if we detect permissive SELinux during
second-stage init. It'd be nicer if we had a sysprop to reflect the
device's on-boot status of SELinux, but it's not worth adding for this
case.

BYPASS_INCLUSIVE_LANGUAGE_REASON=technical term

Bug: 170674916
Tested: booted crosshatch-userdebug with permissive kernel cmdline,
        confirmed that the log message from the new codepath was present
        in logcat, sysprop is 1, and paranoid is -1.
Change-Id: I9df5da2076cdbd777d35e50e8cd7a483ec85e20a
2020-10-29 17:41:36 +00:00
Yifan Hong
0248561ae6 Merge changes from topic "vendor_ramdisk"
* changes:
  libprocessgroup_headers: make vendor_ramdisk_available.
  libdebuggerd_handler_fallback: make vendor_ramdisk_available.
  libcutils: make vendor_ramdisk_available.
  libpropertyinfoparser: make vendor_ramdisk_available.
2020-10-29 17:17:27 +00:00
Suren Baghdasaryan
c6baa19d6c init: Add cpu controller hierarchy to use utilclamp controller
For devices using utilclamp create cpu controller hierarchy. Do not
remove schedtune hierarchy yet because init.rc is generic and should
work with devices which still use schedtune.

Bug: 170507876
Test: cpuctl groups worked
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8494b0b64336e0c882847d555c262814bef2ffa1
2020-10-29 16:52:18 +00:00
Suren Baghdasaryan
1b53c2496d libprocessgroup: Replace stune with utilclamp profiles
Replace schedtune out-of-tree controller's usage in the performance
profiles with utilclamp controller. Stop mounting schedtune controller.

Bug: 170507876
Test: cpuctl groups worked
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ib7fa6c902581398587c75414845c2ff6c8bdb005
2020-10-29 16:21:09 +00:00
David Anderson
58c45b4f06 Merge "libsnapshot: Add a tool for inspecting COW files." am: 4e4cff7e46
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1475325

Change-Id: I94d657bb055a653628a68fae39576f1ba402446e
2020-10-29 01:38:00 +00:00
David Anderson
d0952ff3b8 Merge "libsnapshot: Add a skeleton API for mapping and unmapping all snapshots." am: 5fea7df825
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1475500

Change-Id: I78c5cbd1b2b53b2749c57089d7b73808f3160830
2020-10-29 01:37:43 +00:00
David Anderson
2e831f7e66 Merge "libsnapshot: Stop reading ops once we reach a footer." am: a1a5fdc6ee
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1475324

Change-Id: Iaf4f52de6b6ce0acd96b435fd183c4aa57c71fae
2020-10-29 01:31:46 +00:00
Yifan Hong
c0b3a8b6fb Merge "Revert "Always create ramdisk/first_stage_ramdisk."" am: 7173ca82a4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1470698

Change-Id: Ic0091f44446c9e77b9d5695abd8852a4b3ac6472
2020-10-29 01:21:46 +00:00
David Anderson
4e4cff7e46 Merge "libsnapshot: Add a tool for inspecting COW files." 2020-10-29 00:27:28 +00:00
David Anderson
5fea7df825 Merge "libsnapshot: Add a skeleton API for mapping and unmapping all snapshots." 2020-10-29 00:27:19 +00:00
David Anderson
a1a5fdc6ee Merge "libsnapshot: Stop reading ops once we reach a footer." 2020-10-29 00:27:02 +00:00
Yifan Hong
7173ca82a4 Merge "Revert "Always create ramdisk/first_stage_ramdisk."" 2020-10-28 21:21:36 +00:00
Yifan Hong
89d1c19ca0 Make libraries {vendor_,}ramdisk_available.
Test: pass
Bug: 156098440
Change-Id: I07bb2fdc5113a5113b648795a1f60c09f20e12f1
2020-10-28 10:57:51 -07:00
Yifan Hong
80604abe0f Add shell_and_utilities_vendor_ramdisk
Test: build it
Bug: 156098440
Change-Id: I8dbddd57e5569d5db969b83ae77a36f839806583
2020-10-28 10:57:51 -07:00
Yifan Hong
2ec92cfc28 libdebuggerd_handler_fallback: make vendor_ramdisk_available.
Test: builds
Bug: 156098440
Change-Id: I11466de73bbb3a30c10a7a9088954e37772b7a00
2020-10-28 10:57:51 -07:00
Yifan Hong
55015ffb82 libcutils: make vendor_ramdisk_available.
Test: builds
Bug: 156098440
Change-Id: I663a3839e402a83ebf31b8a680c61f1e269548f6
2020-10-28 10:57:51 -07:00
Yifan Hong
f3b2b96925 libpropertyinfoparser: make vendor_ramdisk_available.
Test: pass
Bug: 156098440
Change-Id: I9c9e74c431ac0f8c382bea0ecd290968aa3f4448
2020-10-28 10:57:51 -07:00
Yifan Hong
67c71a1b4f libprocessgroup_headers: make vendor_ramdisk_available.
Test: pass
Bug: 156098440
Change-Id: I4d66c3e0aa2bbc972d2d6fe16dec95a45bfb2889
2020-10-28 10:57:51 -07:00
David Anderson
936b56838f Merge changes I2b3f5b33,I464b683b,I8e97c543 am: 49a428b62e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1471409

Change-Id: Idd80c608cb27f1d31120f5e30e9e41a6a153031f
2020-10-28 02:44:27 +00:00
David Anderson
49a428b62e Merge changes I2b3f5b33,I464b683b,I8e97c543
* changes:
  libsnapshot: Remove the timeout on client recv().
  libsnapshot: Integrate with snapuserd.
  snapuserd: Add an API call to wait for device deletion.
2020-10-28 01:55:09 +00:00
David Anderson
3fa66c7283 libsnapshot: Add a tool for inspecting COW files.
This simple tool will dump the COW header and included ops to stdout.

Bug: N/A
Test: mm inspect_cow && inspect_cow <file>
Change-Id: I369c4a21a84c95ffc10670bd9eeb2ceccb2a56d6
2020-10-27 18:30:13 -07:00
David Anderson
07ad1b3566 libsnapshot: Add a skeleton API for mapping and unmapping all snapshots.
Bug: 168554689
Test: builds
Change-Id: I0da50275cc4d0a85bd6b176b5c1286659d51a25c
2020-10-27 18:30:13 -07:00
David Anderson
485fe695c1 libsnapshot: Stop reading ops once we reach a footer.
Bug: 168554689
Test: vts_libsnapshot_test
Change-Id: Id8b5ba33220028c856d3761832fe231fd93e94cd
2020-10-27 18:30:13 -07:00
Baligh Uddin
95c0590278 Merge "Revert "Revert "Switch "system/core/base" ref to "system/libbase"""" am: 30d70441e5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1476616

Change-Id: Ib4c3d90835e2b7c82f157fb57ceeafea39beaf9e
2020-10-27 19:50:16 +00:00
Baligh Uddin
30d70441e5 Merge "Revert "Revert "Switch "system/core/base" ref to "system/libbase"""" 2020-10-27 19:38:09 +00:00