Commit graph

64828 commits

Author SHA1 Message Date
Branden Archer
c02f17c216 Add @SensitiveData to GateKeeperService
Bug: 171501998
Test: Builds and manual evaluation
Change-Id: Ic62ca4b35529b2066cd536c5b414a53e254f808c
2020-11-04 13:51:04 -08: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
8b4a9a9a61 Merge "Move e2fsck into /first_stage_ramdisk." 2020-11-02 21:33:07 +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
c635d568ed Merge "Cleanup symlink for system/core/{libbacktrace, libunwindstack}" 2020-10-30 21:57:31 +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
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
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
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
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
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
67c71a1b4f libprocessgroup_headers: make vendor_ramdisk_available.
Test: pass
Bug: 156098440
Change-Id: I4d66c3e0aa2bbc972d2d6fe16dec95a45bfb2889
2020-10-28 10:57:51 -07: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
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
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
30d70441e5 Merge "Revert "Revert "Switch "system/core/base" ref to "system/libbase"""" 2020-10-27 19:38:09 +00:00
Baligh Uddin
f0c169a7fd Revert "Revert "Switch "system/core/base" ref to "system/libbase"""
This reverts commit 2f77d1adc8.

Reason for revert: Applying a Fix to DS directly.  No need for merged-In, since the topic is already landed in DS branch

Change-Id: I86cba9b20efebc9e700522e1697bc8f893c43089
2020-10-27 19:37:59 +00:00
David Anderson
0cbc6e8119 Merge changes I48e62f25,Ib04e80e8,I3878abfd
* changes:
  snapuserd: Fix infinite loop when reading ops.
  libsnapshot: Add Initialize and InitializeAppend methods to ISnapshotWriter.
  libsnapshot: Implement OpenReader for CompressedSnapshotWriter.
2020-10-27 16:48:12 +00:00
Elliott Hughes
52dac2f8b7 Merge "Remove unused utf8_length()." 2020-10-27 15:31:03 +00:00
Joanne Chung
ad5f9c3820 Merge "Revert "Switch "system/core/base" ref to "system/libbase""" 2020-10-27 09:40:29 +00:00
Joanne Chung
2f77d1adc8 Revert "Switch "system/core/base" ref to "system/libbase""
This reverts commit e960b47673.

Reason for revert: Looks to have broken sc-d1-dev b/171770441

Change-Id: I958a95c3b57e46cab2ce17c4a4f9e80b45f2ad71
2020-10-27 09:14:21 +00:00
Woody Lin
9b4debbc27 Merge "init/service_parser: Add arguments window' and target' for `critical'" 2020-10-27 08:22:14 +00:00
David Anderson
0a03a5a8ec snapuserd: Fix infinite loop when reading ops.
Bug: 168554689
Test: vts_libsnapshot_test
Change-Id: I48e62f258ef2b4c368e8237a132c802a03d7020b
2020-10-26 22:30:21 -07:00
David Anderson
a2b5d9978a libsnapshot: Add Initialize and InitializeAppend methods to ISnapshotWriter.
This is so update engine can resume from the correct label.

Bug: 168554689
Test: vts_libsnapshot_test
Change-Id: Ib04e80e8219f954f105d5a85f86efa7bb9097579
2020-10-26 22:30:21 -07:00
David Anderson
0544f91a9a libsnapshot: Implement OpenReader for CompressedSnapshotWriter.
Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: I3878abfd767d2e47cf8486bc2c06233da2f1ef08
2020-10-26 22:30:21 -07:00
Baligh Uddin
35bd0446c3 Cleanup references to system/core/liblog -> system/logging/liblog
BUG: 170387172
Test: TH
Change-Id: Ibb503b051582ff06a298a9e64e52981c0c089b4c
2020-10-27 03:51:36 +00:00
Baligh Uddin
25254eb315 Merge "Switch "system/core/base" ref to "system/libbase"" 2020-10-27 03:38:20 +00:00
Elliott Hughes
939e43e66e Remove unused utf8_length().
Test: treehugger
Change-Id: Idcebc4ae1dcad102873d50f199f5e8745e589da4
2020-10-26 13:14:47 -07:00
Treehugger Robot
df17454a84 Merge "Fix lseek() check" 2020-10-26 17:24:31 +00:00
Greg Kaiser
74b8449f58 Fix lseek() check
Since 'pos' is unsigned, we need to tweak the check.

Test: TreeHugger
Change-Id: I97dcb50fb86196b09b11ba725593e6c83c5586d9
2020-10-26 06:37:32 -07:00
Yo Chiang
346e6792b4 Merge "Call GetDsuMetadataKeyDir() for DSU metadata encryption dir" 2020-10-26 05:27:36 +00:00
Woody Lin
45215ae6e5 init/service_parser: Add arguments window' and target' for `critical'
The critical services can now using the interface `critical
[window=<fatal crash window mins>] [target=<fatal reboot target>]` to
setup the timing window that when there are more than 4 crashes in it,
the init will regard it as a fatal system error and reboot the system.

Config `window=${zygote.critical_window.minute:-off}' and
`target=zygote-fatal' for all system-server services, so platform that
configures ro.boot.zygote_critical_window can escape the system-server
crash-loop via init fatal handler.

Bug: 146818493
Change-Id: Ib2dc253616be6935ab9ab52184a1b6394665e813
2020-10-26 11:38:01 +08:00
Baligh Uddin
e960b47673 Switch "system/core/base" ref to "system/libbase"
BUG: 148941208
Test: TH
Change-Id: Ifa87b06ad7cfce94ed9b5be6b1ee0c358e52aba1
2020-10-24 02:31:13 +00:00