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 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
This adds a new --start-child-zygote argument that instructs the main
zygote to create a new child process that will also be a zygote. The
system_server generates a random name in the abstract socket namespace
for it and the child-zygote to communicate over, and that is passed as
an argument to the new process.
A child-zygote bypasses the normal post-fork-child of the zygote process
in order to preserve itself as a zygote. This means not starting the
Binder threadpool nor launching into ActivityThread. Instead, a
child-zygote calls into its own main function. The main function runs a
ZygoteServer select loop, listening on the socket name specified by the
system_server when it was forked.
Unlike the system zygotes, a child-zygote can be killed without bringing
down the system. Killing a child-zygote will not terminate its child
processes, which will be reparented to init for reaping when they
eventually exit.
Bug: 63749735
Test: m (with multi-project commits landed)
Change-Id: I3e7ebbdba498f8fec1d84cdf927dc43a92be4b68
This CL will support the followings.
- installing a RRO package for framework from /product/overlay
- installing apps from /product/app
- installing priv-apps from /product/priv-app
- installing permissions from
/product/etc/[default-permissions|permissions|sysconfig]
Bug: 64195575
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
=> confirmed com.android.test.libs.product library
adb shell cmd package dump \
com.android.framework.permission.privapp.tests.product
=> confirmed that the package is a priv-app
And I moved vendor/overlay/framework-res__auto_generated_rro.apk into
system/product/overlay/ on sailfish, and I confirmed that the RRO was
installed properly.
Change-Id: I16175933cebd9ec665d190cc5d564b5414a91827
Also start using libbase style logging. Other log statements will
be converted in a follow up.
Test: make
Bug: 33579623
Change-Id: I34bb2ccab57e5bdd22aa35be8f8dcb68fdc4e097
Add file descriptors that should be ignored in the file descriptor
table check.
Use this to ignore the pipe file descriptors when starting an app
with invoke-with (wrapper).
Bug: 32607405
Test: m
Test: Device boots
Test: Apps start
Test: adb root && adb shell setprop wrap.com.android.calculator2 logwrapper && adb shell am start -S -n com.android.calculator2/.Calculator
Change-Id: I4a30dfc9382d3172cc815bd41b17a123799354f6
This refactors the whitelist to be a class, rather than just a static C array.
The whitelist can then be augmented dynamically when the package path is known
in the webview_zygote.
Test: m
Test: sailfish boots
Test: Enable Multi-process WebView in developer options, perform a search in GSA.
Bug: 21643067
Change-Id: Ia1f2535c7275b42b309631b4fe7859c30cbf7309
(cherry picked from commit 061ee3088a)