Commit graph

67662 commits

Author SHA1 Message Date
Tej Singh
c9c6cc04bf Create libstatspull_lazy
Add lazy loading support to libstatspull.

There are a few clients (surfaceflinger, bootanimation dependencies)
that run before the statsd apex is mounted and cannot link
libstatspull.so when the process starts. Lazy loading will load the
library when the apis to set/clear callbacks or create PullAtomMetadata
get called.

This change is modeled heavily off of aosp/1570701, which added
libnativehelper_lazy.

Bug: 178480419
Test: atest libstatspull_lazy_test

Change-Id: I9956f5a690aec8c7ff9f0834a3f36387e5d8b23f
2021-03-15 20:38:28 -07:00
Tej Singh
f9d87bd36f Create libstatssocket_lazy
Add lazy loading support to libstatssocket.

There are many clients of libstatssocket (lmkd, surfaceflinger,
bootanimation dependencies) that run before the statsd apex is mounted
and cannot link libstatssocket.so when the process starts. Lazy loading
will load the library when the logging apis get called.

This change is modeled heavily off of aosp/1570701, which added
libnativehelper_lazy.

Bug: 178480419
Test: atest libstatssocket_lazy_test
Change-Id: I57e6f698ad43dddc98dc787ba2fe888030c8a282
2021-03-15 20:27:56 -07:00
Treehugger Robot
1d9764209f Merge "trusty: Export ConfirmationUI helper classes" 2021-02-26 22:31:59 +00:00
Treehugger Robot
0ab5ae9400 Merge "libprocessgroup: remove hardcoded freezer path" 2021-02-26 08:01:38 +00:00
Marco Ballesio
b47969b62e libprocessgroup: remove hardcoded freezer path
this removes the (temporary) hard-coded path to a cgroup.freeze file
to be used for checking the presence of the cgroup v2 uid/pid hierarchy
for the app freezer. From now on, only the new API must be used (see the
implementation under CacheAppOptimizer).

Bug: 180056337
Test: built without errors
Change-Id: Ifd0bce81a540a86c0c74d3e52fbe88fb731a02e1
2021-02-25 23:39:52 +00:00
Tri Vo
e3cdd2945a Merge "trusty: Add keymaster fuzzer corpus" 2021-02-25 23:18:08 +00:00
Treehugger Robot
0c931aa993 Merge "first_stage_mount: Create snapshot devices before launching first_stage_console" 2021-02-25 20:58:12 +00:00
David Anderson
aa431b7309 Merge "follows the advice of -Wsign-compare" 2021-02-25 18:21:00 +00:00
Tri Vo
ec1d6caec3 Merge "trusty: Increase maximum number of coverage counters" 2021-02-25 06:22:39 +00:00
Arve Hjønnevåg
06ac3e24fe Merge "trusty: Fix apploader short option" 2021-02-25 04:32:52 +00:00
Marco Ballesio
86f17cce1e Merge "libprocessgroup: new method to get cgroup paths" 2021-02-25 03:47:01 +00:00
Christopher Di Bella
68c70b5884 follows the advice of -Wsign-compare
Bug: 181177782
Test: None
Change-Id: I6c53a243639d6b086dc676995d83286d034d1083
2021-02-25 02:20:17 +00:00
Marco Ballesio
4e644c445f libprocessgroup: new method to get cgroup paths
Bug: 180056337
Test: Verified the app freezer is correctly enabled via logs
Change-Id: I3d954dd9bb0f1fa509a275d587e603f33a9d563f
2021-02-24 17:08:51 -08:00
Stephen Crane
0ecf0530db trusty: Increase maximum number of coverage counters
The keymaster TA has 30841 distinct coverage counters, so 0x4000 counter
slots is not enough to handle this TA. Increase maximum number of
coverage counters to 0x8000.

Test: adb shell trusty_keymaster_fuzzer
Bug: 175918322
Change-Id: I879d18538edb4933a4205c8f73b7939ddbf69e37
2021-02-24 15:37:10 -08:00
Stephen Crane
885295f070 trusty: Add keymaster fuzzer corpus
Add an initial corpus for the keymaster fuzzer derived from running the
keystore2 unittests.

Test: adb shell "cd /data/fuzz/arm64/trusty_keymaster_fuzzer/ && ./trusty_keymaster_fuzzer corpus"
Bug: 175918322
Change-Id: I839bb9bacee1800cf2da25aedbb4ce3eccf16cba
2021-02-24 15:34:35 -08:00
Jaegeuk Kim
e7ee9c19e2 Merge "bfq: set background cgroup weight to 10" 2021-02-24 22:40:58 +00:00
Daeho Jeong
272e7a60cb bfq: set background cgroup weight to 10
For better responsiveness of foreground task's io in BFQ I/O scheduler,
set background task's weight from default 100 to 10.

Test: cat /dev/blkio/background/blkio.bfq.weight
Bug: 171739280
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I6a4ea2d46c4426d3e34c7ea71a4653e0ce3ed0df
2021-02-24 19:42:50 +00:00
Devin Moore
cb4ebecbbd Merge "Support bootconfig in first stage init and fs_mgr" 2021-02-24 15:56:48 +00:00
Treehugger Robot
0d4089cb1c Merge "Add docs to SystemClock.h" 2021-02-24 00:03:15 +00:00
Chih-hung Hsieh
06e1b6c3cc Merge "Add include directory to -header-filter" 2021-02-23 23:27:43 +00:00
Tri Vo
7280acc996 Merge "trusty: fuzz: Link to libtrusty dynamically" 2021-02-23 20:35:01 +00:00
Zhomart Mukhamejanov
45e0dc1dae Add docs to SystemClock.h
Test: n/a
Change-Id: I16a41e9b98c88270857fe2a1d6b382bfe469bca6
2021-02-23 12:14:57 -08:00
Tri Vo
abd86f8f98 trusty: Export ConfirmationUI helper classes
And fix namespaces.

Bug: 174402999
Test: m
Change-Id: I54dcc92d8c153d0fa2b10b2679a9a871699de8b1
2021-02-23 11:31:35 -08:00
Tri Vo
cb89889af3 trusty: fuzz: Link to libtrusty dynamically
libtrusty can be depended on by multiple thing in a fuzzer's
dependencies tree. It's no longer convenient to link to statically.

Leave tests statically linked. Test infra doesn't seem to handle shared
test libs correctly.

Bug: 171750250
Test: trusty_test_fuzzer libtrusty_coverage_test
Change-Id: Ic7d003151e43fb5bab63354fd42ea9667332743f
2021-02-23 10:23:37 -08:00
Devin Moore
a4ef15bebb Support bootconfig in first stage init and fs_mgr
Androidboot parameters are being moved from the kernel commandline to
bootconfig.
fs_mgr looks for these parameters in properties and falls back to
reading directly from /proc/cmdline. So both of these sources are
updated for bootconfig.
The androidboot parameters from /proc/bootconfig
are added as ro.boot properties, and fs_mgr will fall back to searching
/proc/bootconfig if it is too early.

Test: boot cuttlefish with androidboot.fstab_suffix and
androidboot.hardware in bootconfig and not in cmdline.
Test: atest CtsFsMgrTestCases
Bug: 173815685

Change-Id: Iea36a0da94c26e1aa37d97c576725e0ad77cd3ad
2021-02-23 07:42:06 -08:00
Mohammad Islam
40839a8469 Merge "Create apex reserved dir for update_engine" 2021-02-23 10:26:26 +00:00
Tri Vo
3e9dbccde6 Merge "Update OWNERS based on Trusty team membership" 2021-02-23 05:56:19 +00:00
satayev
334a93381d Merge "Export *CLASSPATH variables after apexes are configured." 2021-02-23 04:05:14 +00:00
Treehugger Robot
acc82258cc Merge "Revert^2 "Remove ART APEX from the bootstrap apexes"" 2021-02-23 00:47:22 +00:00
Jaegeuk Kim
33d15ca2ce Merge "Try to remount mounted points only" 2021-02-22 23:53:26 +00:00
Tri Vo
eefaf0bb3a Update OWNERS based on Trusty team membership
Change-Id: I2a940f57b3f5da67e12d4f89f9980036d47be321
2021-02-22 14:51:14 -08:00
Julien Desprez
2c41c142ed Merge "Clean up cc_test TEST_MAPPING after default update" 2021-02-22 21:35:36 +00:00
Jaegeuk Kim
5ad7b3cbc5 Try to remount mounted points only
If we don't mount a certain partition intentionally, should be okay to bypass
remounting the partition.

Bug: 180435772
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I7e4d420693f8ba35ec7881d39d0ca682688743c5
2021-02-22 20:46:41 +00:00
Greg Kaiser
cd101cd769 Merge "trusty: Remove redundant check" 2021-02-22 18:38:54 +00:00
satayev
7f9fabad4f Merge "Introduce load_exports action." 2021-02-22 17:14:19 +00:00
Lisa (LeeWei) Liu
74b03a16be Merge "init: ro.boottime.init.modules" 2021-02-22 01:57:17 +00:00
Greg Kaiser
3e02a60412 trusty: Remove redundant check
This repeats a check in the lines immediately before it.

Test: TreeHugger
Change-Id: I47ac9f359018b87bc283657eddb75ad3d175244e
2021-02-21 10:31:40 -08:00
Bob Badour
d0bfde2f78 Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/core" 2021-02-21 15:24:32 +00:00
Chih-Hung Hsieh
84006f5ab1 Add include directory to -header-filter
* Only add owned header directories.
* Do not add extra quotes around -header-filter argument,
  or the quotes will be part of the regex and fail to
  match header file paths.

Bug: 179530304
Test: make with WITH_TIDY=1
Change-Id: Icea867cb22264fb2dbbff079a1fc914bf48bbdef
2021-02-19 18:38:06 -08:00
Bob Badour
d69ad69a93 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  bootstat/Android.bp
  cli-test/Android.bp
  code_coverage/Android.bp
  cpio/Android.bp
  debuggerd/crasher/Android.bp
  debuggerd/proto/Android.bp
  diagnose_usb/Android.bp
  fs_mgr/libdm/Android.bp
  fs_mgr/libfiemap/Android.bp
  fs_mgr/liblp/Android.bp
  fs_mgr/libsnapshot/Android.bp
  fs_mgr/libstorage_literals/Android.bp
  fs_mgr/libvbmeta/Android.bp
  fs_mgr/tests/Android.bp
  fs_mgr/tools/Android.bp
  gatekeeperd/Android.bp
  healthd/Android.bp
  healthd/testdata/Android.bp
  init/Android.bp
  init/Android.mk
  init/sysprop/Android.bp
  init/test_kill_services/Android.bp
  init/test_service/Android.bp
  libappfuse/Android.bp
  libasyncio/Android.bp
  libbinderwrapper/Android.bp
  libcrypto_utils/Android.bp
  libcrypto_utils/tests/Android.bp
  libdiskconfig/Android.bp
  libgrallocusage/Android.bp
  libkeyutils/mini_keyctl/Android.bp
  libmodprobe/Android.bp
  libnetutils/Android.bp
  libpackagelistparser/Android.bp
  libprocessgroup/Android.bp
  libprocessgroup/cgrouprc/Android.bp
  libprocessgroup/cgrouprc_format/Android.bp
  libprocessgroup/profiles/Android.bp
  libprocessgroup/setup/Android.bp
  libqtaguid/Android.bp
  libsparse/Android.bp
  libstats/push_compat/Android.bp
  libsuspend/Android.bp
  libsync/Android.bp
  libsystem/Android.bp
  libsysutils/Android.bp
  libusbhost/Android.bp
  libutils/Android.bp
  libvndksupport/Android.bp
  libvndksupport/tests/Android.bp
  llkd/Android.bp
  llkd/tests/Android.bp
  property_service/libpropertyinfoparser/Android.bp
  property_service/libpropertyinfoserializer/Android.bp
  property_service/property_info_checker/Android.bp
  qemu_pipe/Android.bp
  reboot/Android.bp
  rootdir/Android.bp
  rootdir/Android.mk
  rootdir/avb/Android.bp
  rootdir/avb/Android.mk
  run-as/Android.bp
  sdcard/Android.bp
  set-verity-state/Android.bp
  shell_and_utilities/Android.bp
  storaged/Android.bp
  toolbox/Android.bp
  trusty/apploader/Android.bp
  trusty/confirmationui/Android.bp
  trusty/confirmationui/fuzz/Android.bp
  trusty/coverage/Android.bp
  trusty/fuzz/Android.bp
  trusty/fuzz/test/Android.bp
  trusty/gatekeeper/Android.bp
  trusty/gatekeeper/fuzz/Android.bp
  trusty/keymaster/Android.bp
  trusty/keymaster/fuzz/Android.bp
  trusty/libtrusty/Android.bp
  trusty/libtrusty/tipc-test/Android.bp
  trusty/secure_dpu/Android.bp
  trusty/storage/interface/Android.bp
  trusty/storage/lib/Android.bp
  trusty/storage/proxy/Android.bp
  trusty/storage/tests/Android.bp
  trusty/utils/spiproxyd/Android.bp
  trusty/utils/trusty-ut-ctrl/Android.bp
  usbd/Android.bp
  watchdogd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  debuggerd/Android.bp
  fastboot/Android.bp
  libkeyutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT
to:
  libcutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  fs_mgr/Android.bp
  fs_mgr/libfs_avb/Android.bp
  trusty/Android.bp
  trusty/utils/rpmb_dev/Android.bp

Added SPDX-license-identifier-BSD
to:
  fastboot/fuzzy_fastboot/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
2021-02-19 12:59:05 -08:00
Julien Desprez
c1f8bf6094 Clean up cc_test TEST_MAPPING after default update
After b/179092189, cc_test host_supported:true doesn't need TEST_MAPPING config anymore to
run in presubmit.

Change-Id: I4985b9f1bc0d8bef24df447720d138b1a5072c9c
Test: presubmit
Bug: 178646865
2021-02-19 20:07:05 +00:00
Christopher Ferris
d57652f15b Merge "Update for new kernel 5.11 headers." 2021-02-19 19:47:44 +00:00
Christopher Ferris
a4807cba22 Merge "Don't hard-code number of tombstones." 2021-02-19 17:46:54 +00:00
Artur Satayev
c19f99781b Export *CLASSPATH variables after apexes are configured.
For now, export the exact same values, on `post-fs-data` instead of on
`early-init` to soak the change. As a follow up, the actual values will
be generated by a new oneshot service.

See go/updatable-classpath for more details.

Bug: 180105615
Test: manual - device boots
Change-Id: I5f6826a0f87a5e01233e876d820e581feb555bca
2021-02-19 17:12:26 +00:00
Artur Satayev
500946b637 Introduce load_exports action.
The action reads a file with individual `export` actions declared on
each line, and calls `setenv` for each.

See go/updatable-classpath for details on how this is going to be used.

Bug: 180105615
Test: manual
Change-Id: I5390e52cf8ffd9c3babf31ed854eeecc727351eb
2021-02-19 17:12:26 +00:00
Martijn Coenen
73dea057c2 Merge "Add on-device signing binary." 2021-02-19 11:31:50 +00:00
Lisa Liu
08c862fa00 init: ro.boottime.init.modules
Add a property ro.boottime.init.modules to provide kernel modules
loading time in milliseconds. Also add corresponding log to show in init
log along with loaded module count.

Test: boot test
Bug: 178143513
Change-Id: I77e3939c2a271da6841350a8c2a34ad32f637377
2021-02-19 15:59:04 +08:00
Josh Gao
8c164946d8 Merge "Generate text tombstones from proto tombstones by default." 2021-02-19 03:34:27 +00:00
Josh Gao
3be68745ae Generate text tombstones from proto tombstones by default.
We're running into timeouts from death tests because we're ~doubling the
cost of crash dumping by doing it twice.

Bug: http://b/180605583
Test: treehugger
Change-Id: If5b40434171323a09960b70af0124ec08bd3fbe8
2021-02-18 16:57:53 -08:00
Christopher Ferris
35da288199 Don't hard-code number of tombstones.
On cuttlefish, the number of tombstones allowed is much larger
than 50, so change the algorithm to search for any tombstone
file.

Test: Ran unit tests on cuttlefish with > 50 tombstones.
Test: Ran unit tests on device.
Change-Id: Ia1d885fe19a7f7751fe3386d40b48750d1e21bd5
2021-02-18 15:29:13 -08:00