Add /sys/kernel/tracing/trace_marker to whitelist of paths
that the zygote is allowed to keep open. It currently contains
/sys/kernel/debug/tracing/trace_marker which is only created when
debugfs is mounted. tracefs will be mounted at /sys/kernel/tracing
when debugfs is not mounted.
Test: AtraceHostTest
Bug: 148436518
Change-Id: I734120e8c88ba9d5451a1bd1589e084323824285
Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.
This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.
Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".
Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I27ed3fde40751d9ac136a31710c62004b1b8962f
Create framework-statsd jar in statsd apex.
Move StatsEvent to framework-statsd.jar.
Right now, frameworks jar links against framework-statsd directly. This
should be changed to link against framework-statsd-stubs.
Bug: 145923096
Bug: 145923116
Bug: 142810493
Test: m
Test: flashes successfully
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"
Change-Id: Ife224abd5c9b9b0eeab681dc4b7f71c0bdb856b1
These need to be whitelisted because they are not part of the jars
in /system/framework/ now. Earlier they were, due to which this was
not required since libs under /system/framework are already
whitelisted (through a separate rule).
Test: basic telephony sanity
Test: m com.android.telephony && adb install com.android.telephony.apex
Bug: 145555313
Change-Id: Ieaeec41f1db527f1dd8568a542697c5ba4a4c419
This change adds the IKE apex to the whitelist of open paths. Without
this change, adding IKE to the boot classpath will fail.
Bug: 143905344
Test: Compiles, doesn't fail.
Change-Id: I63a2531e88b9d715e5089a6dc9fec721970d0de5
A memfd file can be created with any name, but to protect ourselves
from unintended leakage, check that it's the name ART uses.
Test: boots
Bug: 119800099
Change-Id: Ibc684d09dd05f38933c6808b72fb402fc9d5e4eb
When there is overlay package in system_ext, turn on POLICY_SYSTEM_PARTITION.
In other words, overlay pacakge in /system_ext is considered as system's one
Test: mv vendor/overlay/framework-res__auto_generated_rro.apk system_ext/overlay
and then check if it works properly.
Bug: 136715327
Change-Id: Ib225368eae41203a8630f4310d26e9cf1afa706a
Merged-In: Ib225368eae41203a8630f4310d26e9cf1afa706a
(cherry picked from commit cba9579158)
This patch removes several debugging log messages. These messages were
useful when the `FDs to ignore` list was usually empty, but with the
addition of USAPs this has become spammy.
(cherry picked from commit da0a9cd05c)
Test: Build
Bug: 130172109
Change-Id: Id166990a63f20efb3bf6ffd5b697efd436d50921
Merged-In: Id166990a63f20efb3bf6ffd5b697efd436d50921
This patch removes several debugging log messages. These messages were
useful when the `FDs to ignore` list was usually empty, but with the
addition of USAPs this has become spammy.
Test: Build
Bug: 130172109
Change-Id: Id166990a63f20efb3bf6ffd5b697efd436d50921
This patch adds native support for spawning and managing blastula pools,
as well as several code cleanups and modernizations.
Changes includes:
* A function to fork blastulas
* A table for managing blastula-related data
* Functions for adding and removing blastula data from the
aforementioned table
* Switching from NULL to nullptr
* Replacing string-passing error handling with a curried failure
function
* Utility functions for handling managed objects
* JNI functions for blastula pool management
Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Merged-In: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
This adds the blastula pool sockets from aosp/843736 to the Zygote FD
white list in fd_utils.cpp.
Bug: 68253328
Test: m & flash image & boot
Change-Id: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
Merged-In: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
This patch adds native support for spawning and managing blastula pools,
as well as several code cleanups and modernizations.
Changes includes:
* A function to fork blastulas
* A table for managing blastula-related data
* Functions for adding and removing blastula data from the
aforementioned table
* Switching from NULL to nullptr
* Replacing string-passing error handling with a curried failure
function
* Utility functions for handling managed objects
* JNI functions for blastula pool management
Change-Id: I12cd9f2c87a2e3c00d64b683edf3631e29a51551
Topic: zygot-prefork
Test: make & flash & launch apps & check log for messages
Bug: 68253328
This adds the blastula pool sockets from aosp/843736 to the Zygote FD
white list in fd_utils.cpp.
Bug: 68253328
Test: m & flash image & boot
Change-Id: I1ff4bea0a2ea163bf9c1ccc0d80ffd5d04c49191
We are going to use the APEX copy of Conscrypt rather than the
/system/framework copy, so allow the zygote to keep it open.
Test: system boots
Bug: 110404540
Change-Id: I052b31223fa9220d0c67f579d230f06adf8800ba
* Add explicit to conversion constructors/operators
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I15ac3511154b652402c5a21a22ff0c306d806d84
Due to b/30963384, every time zygote creates a new child, zygote reopens
all existing file descriptors, taking careful measures to preserve the
file status flags, file descriptor flags, and seek offset. However, dup2
resets the sole file descriptor flag (FD_CLOEXEC) on duplication,
defeating the hard work done to preserve the flag.
From "man dup"
NAME
dup, dup2, dup3 - duplicate a file descriptor
DESCRIPTION
The dup() system call creates a copy ...
...
The two file descriptors do not share file descriptor flags
(the close-on-exec flag). The close-on-exec flag
(FD_CLOEXEC; see fcntl(2)) for the duplicate descriptor is off.
...
The dup2() system call performs the same task as dup() ...
Use dup3 instead to allow us to preserve the FD_CLOEXEC status.
Bug: 120983106
Test: Android compiles and boots
Change-Id: Idbb27c83092f30d8394c254cfbdf33406f74eb94
Prepare the idmap and asset managers for interfacing with idmap2 instead
of today's installd + idmap pipeline, but don't make the switch just
yet.
Instead, idmap2 runs as its own native daemon with an AIDL interface.
This removes the need for installd to fork and exec on each idmap call,
saving about 50 ms per call.
Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I60852e15d99329896ff9de6559d1e7cd1c67e33d
This allows users to target zygote for heap profiling without
causing it to crash on ForkCommon.
This also allows us to profile zygote in benchmark runs where we want to
profile as many processes as possible.
Bug: 117821125
Test: m
Test: flashed walleye
Change-Id: I3f41b64e0a64e362eafd02cd4e86cb77e434d94c
See CL I7a6a30bf8e8db9f2738594d187bb9148f138b8da for a more detailed
description of the change.
Test: see CL I7a6a30bf8e8db9f2738594d187bb9148f138b8da description
Bug: 80741439
Change-Id: I6cc9d713c07c319fc2ee1c531af41243bd1d4aee