Commit graph

68389 commits

Author SHA1 Message Date
Bob Badour
576104304d [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  libstats/pull_lazy/Android.bp
  libstats/socket_lazy/Android.bp
  trusty/utils/acvp/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I33005150521238b61d1a8c923749b17d36bba693
2021-03-17 12:59:19 -07:00
Bob Badour
d13478ef14 Merge "Remove NOTICE file; use global Android-Apache-2.0" 2021-03-17 19:45:15 +00:00
Wenhao Wang
b0f77dfe3b Merge "Trusty: Add BoringSSL modulewrapper for ACVP" 2021-03-17 18:54:36 +00:00
Peter Collingbourne
d9bb7106bc Merge "Add support for a hw_timeout_multiplier system property." 2021-03-17 18:18:51 +00:00
Bob Badour
2f51435809 Remove NOTICE file; use global Android-Apache-2.0
Test: m nothing
Change-Id: Idb76c9b6e5dbce1741fc5f320ea259773558ff2e
2021-03-17 10:39:49 -07:00
Treehugger Robot
3990a658c4 Merge "Separate out libkeyutils and mini_keyctl." 2021-03-17 17:33:41 +00:00
Paul Hu
b684856949 Merge "Migrate net.tcp.default_init_rwnd to net.tcp_def_init_rwnd" 2021-03-17 11:24:53 +00:00
satayev
294167d436 Merge "Exec_start derive_classpath on post-fs-data." 2021-03-17 10:58:30 +00:00
paulhu
f8cdebfc35 Migrate net.tcp.default_init_rwnd to net.tcp_def_init_rwnd
Currently, tcp receive window size is read from
net.tcp.default_init_rwnd then set to net.tcp_def_init_rwnd. It
should not use seperate property to read/write the value, it only
needs one of property basically. So migrate
net.tcp.default_init_rwnd to net.tcp_def_init_rwnd which has
formal API.

Bug: 182538166
Test: Manually check that net.tcp_def_init_rwnd has default
      value and proc/sys/net/ipv4/tcp_default_inti_rwnd node
      is created with same value.
Change-Id: I6748485f99198b1200c67d6595b659aac7d7e1e0
2021-03-17 13:59:22 +08:00
Pirama Arumuga Nainar
bb03b3626f Merge "Ignore deliberate free() of non-heap memory" 2021-03-17 03:56:07 +00:00
Treehugger Robot
94dbc5d609 Merge "debuggerd: remove unused file." 2021-03-17 03:16:59 +00:00
Treehugger Robot
8a8bde07f5 Merge "Keystore 2.0: Add keystore2 to llkd ignore list." 2021-03-17 01:41:31 +00:00
Pirama Arumuga Nainar
982e2a5018 Ignore deliberate free() of non-heap memory
Bug: http://b/181927912

Clang already has -Wfree-nonheap-object but it became a default warning
with clang-r416183

Test: compile crasher.cpp
Change-Id: Ice532e9f373a628e07acd08a4fc7bfa7cf5d4e08
2021-03-16 18:16:15 -07:00
Elliott Hughes
4d93ef79a2 Separate out libkeyutils and mini_keyctl.
They have different licenses.

Test: treehugger
Change-Id: I9ab8ff33d2b302a9e334b29152f6cabf46121ea9
2021-03-16 17:39:00 -07:00
Elliott Hughes
b68b07391a debuggerd: remove unused file.
Test: treehugger
Change-Id: I17f5f88e91be3dccbf01b93ca93b0879a997bb4d
2021-03-16 17:35:33 -07:00
Tri Vo
8ac78838fc Merge "trusty: fuzz: Poke the port of lazy-loaded TAs to load them." 2021-03-16 23:08:23 +00:00
Treehugger Robot
eb6a9ceb2f Merge changes from topic "tej_pull_lazy"
* changes:
  Create libstatspull_lazy
  Create libstatssocket_lazy
2021-03-16 17:10:19 +00:00
Tri Vo
9905ad2cad trusty: fuzz: Poke the port of lazy-loaded TAs to load them.
We need to do this to make sure that target TA is connected to coverage
service.

Bug: 171750250
Test: trusty_test_fuzzer
Change-Id: I207b8c674a0c5630dd6baf966d3dfb243a855be0
2021-03-15 23:31:00 -07:00
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
David Anderson
102f7e4d7e Merge "libsnapshot: Add boot_complete metrics." 2021-03-16 00:30:46 +00:00
Janis Danisevskis
028437445e Keystore 2.0: Add keystore2 to llkd ignore list.
Due to Keystore's handling of sensitive information we cannot allow
any other process ptrace privileges over Keystore. To silence SELinux
denials llkd must ignore the keystore process.

This CL adds keystore2 to the ignore list because it replaces keystore.
In a followup the keystore entry will be removed.

Bug: 170144267
Test: N/A
Change-Id: I28eafc1f4341cdd371ad78d3a7a9ba8ac128c1b1
2021-03-15 16:37:55 -07:00
Nicolas Geoffray
f85f3d628e Merge "Add libsigchain as dependency of platform." 2021-03-15 16:04:38 +00:00
Alistair Delva
fb1cffb46b Merge "init: check for verifiedbootstate in properties" 2021-03-15 04:03:17 +00:00
Inseob Kim
b56165cce3 Merge "Allow precompiled sepolicy w/o system_ext/product" 2021-03-14 15:28:42 +00:00
Nicolas Geoffray
8a3f8853d3 Add libsigchain as dependency of platform.
Test: m and boot
Test: atest CtsJniTestCases
Bug: 142944043
Change-Id: Iefded35c478d6278c56fbfa02e5cb364a9326c5c
2021-03-13 16:07:13 +00:00
David Anderson
a0992300f2 libsnapshot: Add boot_complete metrics.
Bug: 180535575
Test: apply OTA
Change-Id: Ifea51c4c83ba03012f557927e8694e7c613335a7
2021-03-12 18:35:44 -08:00
David Anderson
ccc7db3d92 Merge "libsnapshot: Fix CowWriter::Finalize() not restoring footer correctly." 2021-03-12 18:43:58 +00:00
Roman Kiryanov
dce1f88bfb Merge "Populate ro.boot.qemu for the emulator device" 2021-03-12 06:06:03 +00:00
Roman Kiryanov
7787e70417 Merge "Populate only emulator specific properties into ro.kernel." 2021-03-12 06:05:35 +00:00
Roman Kiryanov
a3d37ac9b2 Merge "Move the androidboot. literal into its own variable" 2021-03-12 04:32:13 +00:00
Inseob Kim
d99d977f17 Allow precompiled sepolicy w/o system_ext/product
Some devices might not have system_ext or product partitions. But init
has been refusing to use precompiled sepolicy because init always checks
system / system_ext / product hashes, regardless of existence. This
makes system_ext and product optional, so hash check can be skipped for
non-existing partitions. Of course system is always checked.

Bug: 181640066
Test: boot microdroid and cuttlefish, see precompiled sepolicy works
Change-Id: I32c296fffd894c27097e8b4e10ade977a21d61ab
2021-03-12 11:40:15 +09:00
Roman Kiryanov
4a47c74b75 Populate ro.boot.qemu for the emulator device
Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ied78f42363c1f6580fe6e5660b14c257960aed98
2021-03-11 16:49:17 -08:00
Roman Kiryanov
1a705d4943 Populate only emulator specific properties into ro.kernel.
`ro.kernel.` is an emulator specific prefix.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ie4a19127f05f3074ccb02bd055711e9b70702ba6
2021-03-11 16:48:26 -08:00
Roman Kiryanov
ccc15c5dbd Move the androidboot. literal into its own variable
Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I19f25671c82fff34dd52e3557361c4340706aab0
2021-03-11 16:46:00 -08:00
David Anderson
bf3020b749 libsnapshot: Fix CowWriter::Finalize() not restoring footer correctly.
Bug: 173432386
Test: cow_api_test
Change-Id: If1b856fcdcd6b6ded5e00342037308c6b35d6fc0
2021-03-11 16:16:36 -08:00
Peter Collingbourne
fb5eac9445 Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
2021-03-11 14:04:18 -08:00
Kris Alder
d5bd5437b0 Merge "enable fuzzing trusty targets automatically" 2021-03-11 17:54:04 +00:00
Suren Baghdasaryan
d9f1884aeb Merge "libprocessgroup: introduce optional attribute for cgroup controllers" 2021-03-11 17:42:37 +00:00
Suren Baghdasaryan
7f19b1e6de libprocessgroup: introduce optional attribute for cgroup controllers
Memory cgroup controller is not used by high-end Android devices and is
disabled in Android kernels 5.10+, however Android Go devices still
require this controller.
Similarly schedtune controller is being replaced with cpu controller's
utilclamp feature, however some devices are using older kernels which
only support schedtune.
To prevent spamming logcat with errors we need a way to mark a
controller optional in such cases without removing it from
cgroups.json file.
Introduce "Optional" attribute to cgroup controller's cgroups.json
description to accomodate these cases. When an optional controller
fails to mount due to lack of support in the kernel it will log an
informational message without generating further errors.

Bug: 181866655
Test: boot and observe libprocessgroup messages in logcat
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ib5bcfdd8d338704f3f9d8b326d8ddd88b67915a1
2021-03-11 17:42:30 +00:00
Alistair Delva
c19a7dd30e Merge changes from topic "bootconfig-selinux-property"
* changes:
  Allow selinux to be set by bootconfig
  Allow android_dt_dir to be set by bootconfig
2021-03-11 15:52:02 +00:00
Kris Alder
5e8ee3102e enable fuzzing trusty targets automatically
The non-test fuzz targets should run automatically in Haiku.

None of these should be built for Host, and all but the
trusty_test_fuzzer should be built for Target.

Test: built locally (make haiku) and checked that non-test trusty fuzz
targets are included as expected.

Change-Id: Ic67b1e1ddea8ed61b83deef66acdeb0891489195
2021-03-11 15:07:01 +00:00
Martijn Coenen
43defd972f Merge "Add some keystore boot levels." 2021-03-11 09:25:40 +00:00
Artur Satayev
1320668c52 Exec_start derive_classpath on post-fs-data.
The service parses and merges configs from multiple partitions, defines
*CLASSPATH environ variables' values and writes them to file, for
init to export.

See go/updatable-classpath for more details.

Bug: 180105615
Test: manual
Change-Id: I60c539a8fef4d690f47704e896f67949ec49db60
2021-03-11 07:20:23 +00:00
Suren Baghdasaryan
72ad5d2958 Merge "libprocessgroup: remove a false error message" 2021-03-11 03:04:41 +00:00
Suren Baghdasaryan
f46a2297d0 libprocessgroup: remove a false error message
Remove an error message generated when changing permissions succeed.

Bug: 181866655
Test: boot and observe libprocessgroup messages in logcat
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If95fcbd5171b73191504beffdc504c44eef3b4c1
2021-03-11 03:01:46 +00:00
Peter Collingbourne
90947d442c Merge "Teach debuggerd to pass the secondary ring buffer to __scudo_get_error_info()." 2021-03-11 01:15:49 +00:00
Akilesh Kailash
bd83b72bc8 Merge "libsnapshot:snapuserd: Multithreading support" 2021-03-11 00:51:20 +00:00
Devin Moore
394a1ede40 Merge "Handle "hardware" bootconfig parameter as "androidboot.hardware"" 2021-03-10 22:42:12 +00:00
Akilesh Kailash
8f0840940e libsnapshot:snapuserd: Multithreading support
Add worker threads per partition to serve the IO request.

Remove memset of buffer in IO path which was impacting
4k IO performance.

update_verifier performance:

1: ~10-12 seconds with this change (both on full OTA and incremental
OTA); ~70 seconds observed without this changeset

2: ~8 seconds without the daemon once merge is completed
and snapshot devices are removed.

Bug: 181293939
Test: update_verifier, full OTA, incremental OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Id90887f3f4a664ee5d39433715d1c166acbd6c60
2021-03-10 07:53:16 +00:00