Changed "whitelist" to "allowlist" in many Zygote files.
BYPASS_INCLUSIVE_LANGUAGE_REASON="compatability with vendor files"
Test: cts
Change-Id: Ia0a8548f2e254fc36a9dce7e50af8284ed0caa47
SocketUtils contains system APIs for modules to interact for sockets,
wrapping internal APIs. It should be part of the platform to keep access
to the internal APIs.
This involves splitting NetworkUtils.protectVpn to NetworkUtilsInternal,
since SocketUtils and VpnService are the only users of that method.
The @UnsupportedAppUsage NetworkUtils.protectVpn has low usage
count, and is already available through VpnService.protect.
Bug: 181512874
Test: boots, VPN working
Change-Id: I7028d334975f7536c06afac7a22200c33db707ac
memtagMode allows an app to opt in to MTE in either sync or async mode.
nativeHeapZeroInit enables automatic initialization of heap memory.
Both attributes default to off and can be specified at either
application or process level.
Bug: 135772972
Bug: 177438394
Bug: 178038272
Test: CtsTaggingHostTestCases
Change-Id: I6a481a9d2363997bf954f248d08224c79f0c2afb
Merged-In: I6a481a9d2363997bf954f248d08224c79f0c2afb
Since FUSE in R, there are only 4 mount modes that are used
from IVold.aidl:
REMOUNT_MODE_NONE
REMOUNT_MODE_DEFAULT
REMOUNT_MODE_INSTALLER
REMOUNT_MODE_PASS_THROUGH
REMOUNT_MODE_ANDROID_WRITABLE
Bug: 148454884
Test: Manual
Change-Id: I62b66083f2099b429474872b6f9c7cffb9fb906d
Merged-In: I62b66083f2099b429474872b6f9c7cffb9fb906d
This reverts commit 0648bad1b6.
Reason for revert: commit 0208449c3b ("Defer UID data removal until after reading is finished") has now been merged to remove the deadlock that required reverting.
Bug: 177011744
Bug: 174739872
Change-Id: I4fc120dc4410e21327700cb62900b3991ec981ec
Do not return to Java mode between consecutive fork operations.
This greatly reduces the Zygote overhead, since we no longer need to
stop and restart Java daemons.
By not switching back to Java mode, and being careful about what memory
we touch between forks, we also keep the Zygote heaps much more stable,
facilitating page sharing between the zygote and all its children.
Under normal operation we should no longer allocate any memory in the
zygote between forks. That applies to both the Java and C++ heap.
This makes the zygote behave much more like the mental model many
of us had assumed: It has nearly constant memory contents, which are
copy-on-right cloned at each fork. This does not apply to the initial
system server and webzygote forks, that are currently still handled
differently.
This includes
1. Add ZygoteCommandBuffer, and switch the argument parsing code to use it.
This slightly reduces allocation and enables (3).
2. Support process specialization in the child, even when the arguments
are already know, Leverages existing Usap code.
3. Add support for forking multiple child processes directly to the
ZygoteCommandBuffer data structure. This directly uses the buffer
internals, and avoids returning to Java so long as it can handle the
zygote commands it sees.
FUNCTIONALITY CHANGE:
We now limit the total size of the zygote command, rather than the
number of arguments.
Initial performance observations:
[ These are not perfect, since I'm comparing to numbers before I
started. There may have been other moving parts, but they should be
minor. ]
System-server-observed launch latency:
[Not the best metric, but easy to measure. In particular, this
does not represent a significant reduction in application launch
time.]
Based on measuring the last 10 launches in a lightly used cf AOSP
instance, the system server latency from requesting an app launch to
response with the pid (which does not require the child to execute
anything) went from an average of about 10.7(25) msecs to 6.8(9) and
7.9(16) in two tries with the CL. (The parenthetical numbers are
maxima from among the 10; the variance appears to have decreased
appreciably.)
Dirty pages:
The number of private dirty pages in the zygote itself appears to have
decreased from about 4000 to about 2200. The number of dalvik-main
private dirty pages went from about 1500 to nearly zero.
Initially ART benchmarking service claim -1.88% in PSS. But this is not
consistently repeatable.
Drive-by fix:
Call setAllowNetworkingForProcess on usap / native loop path.
Bug: 159631815
Bug: 174211442
Test: Boots AOSP
Change-Id: I90d2e381bada1b6c9857666d5e87372b6a4c1a70
This reverts commit bff33b8c31.
Reason for revert: cts tests on -user builds is broken
Change-Id: I2edf200561f839e49e067403714ea6fa65bdc978
Merged-In: I2edf200561f839e49e067403714ea6fa65bdc978
- dupin@ landed the folder & code in it originally
- good idea to move review off the plates of generic frameworks/base
OWNERS
Change-Id: I03a1e8ec00d5b658ee026a44038703e5b31ca52e
This CL cleans up some warnings in the ZygoteInit.java and
ZygoteServer.java files. These warnings were mostly about unused
variables, protection class changes, and dead code. Some changes
to code in Zygote.java and ZygoteConnection.java were needed due to
function signature changes.
Test: Built and booted image
Merged-In: I6ba33cfcb4729a75dbbd4f908f4b46110d3bb991
Change-Id: I6ba33cfcb4729a75dbbd4f908f4b46110d3bb991
Removing UID data inside readDelta() callbacks causes deadlocks when
BPF data is used. Instead, build a list of UIDs to remove but defer
deletion until after readDelta() returns.
Bug: 177011744
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsCpuTimesTest
Change-Id: I41881571f6955a47186797f2d9db9c7594740c6b
Merged-In: I38e037b89e71b0cb1ba01374189ba8b7af01d632
Signed-off-by: Connor O'Brien <connoro@google.com>
With this change, callers can set overrides for specific versions of an
app. The framework falls back to default version when the given version
doesn't have an override set.
Bug: 174043039
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Test: atest PlatformCompatGating
Change-Id: Ib5ff67e752a9c5ee94b6e1dd664d324ab5bf4542
The system server inherits the ELF note from the Zygote, but should also
be able to be overwritten by the system property. This needs to be
manually parsed.
Bug: 172365548
Test: 'adb shell setprop arm64.memtag.process.system_server 123' \
Test: ... kill the system_server, and and look in logcat for
Test ... "Unknown memory tag level for the system server".
Test: 'adb shell setprop arm64.memtag.process.system_server sync' \
Test: ... kill the system_server, and look in logcat for
Test: ... "SetHeapTaggingLevel: tag level set to 3".
Change-Id: Icda4ff141646086ae85d751b8af9b1fe94bfd7b5
The flow has been replaced by @ChangeId ALLOW_TEST_API_ACCESS, making
old approach obsolete.
Bug: 147113465
Test: atest CameraEvictionTest#testBasicCamera2ActivityEviction
Merged-In: I0bf109fa78212d6d71ba85d25f80e27e8e7cd900
Merged-In: I0e58b6924744590afaadec6a6230aa9d552b2f6f
Change-Id: I9cf8f80abb0165d4aefbf943bade57f5e031904b
Exempt-From-Owner-Approval: cp
Bug: 178391911,147113465
(cherry picked from commit a27cd30535)
In preparation for making tombstones available to apps, extract the
tombstone tracking code from BootReceiver to its own service.
Bug: http://b/159164105
Test: manual
Change-Id: I789f41f12a8be312b6e966226646c4ec4becc1aa
This CL addresses a bug in the USAP Pool refill logic that could cause
refill events to be delayed indefinitely. This would not prevent future
refill events from triggering, but could cause temporary degradation in
USAP performance.
Test: launch applications from USAP pool and inspect log
Bug: 177795408
Merged-In: I2e46eae431a1d9671d31c29b3552cd0287c66239
Change-Id: I2e46eae431a1d9671d31c29b3552cd0287c66239