| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
use memmove_words for word atomic memmove
Change-Id: Ife31c217f7038f5054969b4bbe1108b351881b3b
|
| |
|
|
|
|
|
|
|
| |
As promised, this is the cleanup patch-set which removes the
old native "fork and specialize" API, which has been replaced
by a slightly-enhanced one which can close the Zygote socket
descriptors in the Zygote child.
Change-Id: I33f504afd242e268863270139b4e421d4b0728f2
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID. These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.
This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected. The CLs need to be approved
together, lest the build break or the software fail to boot.
Round 2: whitespace
Bug: 12114500
Change-Id: I989c83291d0c42d4cad63f24a3e98a93e231c9d3
|
| |
|
|
|
|
| |
This is to generate coredumps for processes spawned by zygote
Change-Id: I2dbac76fbcaa7be3845ba5e12ad064548a25e2e3
|
| |
|
|
|
|
|
|
| |
Bug: 7103825
(cherry picked from commit dc6cb9c7cb4ef636aa6f542615410b56a67b94dc)
Change-Id: I0b8ab789ffb8702bc134b32398c120cc3ed29b9c
|
| |
|
|
|
|
|
| |
mount() may fail EINTR, and when it does this causes dalvik to crash.
Use the regular retry macro to avoid these problems.
Change-Id: I436fe4f0fab36c8172b43b8b9caedcb6d8167a4f
|
| |
|
|
|
|
| |
use memmove from bioinc if it is halfword atomic.
Change-Id: I81c38c2b504483b69b0b1c1e4ffb63cb81d347d5
|
| |
|
|
|
|
|
|
| |
RETURN_VOID doesn't set the return value. This means that we are
returning random garbage when the allocation doesn't succeed.
Bug: 11971220
Change-Id: I570562c7bb9dc573161294916f582709774b35fd
|
| |
|
|
|
|
|
|
|
|
|
| |
When debugging audit logs, it is often helpful to
have the packages name. Bear in mind that the
package name is the right most chars up to
TASK_COMM_LEN. Although a possibility of truncation
exists, it can be useful for narrowing down the
possibilities.
Change-Id: Ia735b03f64352d155f8b96e1d47f48e6519b1d4f
|
| |\
| |
| |
| | |
cm-11.0
|
| | |
| |
| |
| |
| |
| |
| | |
Enable 64-bit capabilities when starting Zygote to allow
>32-bit capabilties to be set, such as CAP_BLOCK_SUSPEND.
Change-Id: I2821a2a393dc521c7b99a7283ba17b3ae3b375fd
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Copy the correct starting heap size at process init.
Interfaces to set GC/managed heap parameters.
Change-Id: I454b1985a3225d7dbdea9c5d4e6f0c9f5e24352e
(cherry picked from commit ea59f91c8559dee1710f38a27db10f76f4753fea)
(cherry picked from commit 12fc949d46e988ce6877ad4c60f5fc983c5dc202)
(cherry picked from commit 73a1dac0b14ab5159453c2d696049e233e7476b0)
|
| |\|
| |
| |
| | |
Android 4.4 Release 1.0
|
| | |
| |
| |
| |
| |
| | |
Bug: 11045348
Change-Id: Ib13f96563f3b7ead17620e409735a0e9abb2a109
|
| | |
| |
| |
| |
| | |
Bug: 11045348
Change-Id: I287703eaa964dcbd2e8d5a6c7db7ac378e19e2c1
|
| | |
| |
| |
| |
| |
| | |
Bug 10907247
Change-Id: I0665cce648dd892db4cc59e82c325b376dad97dd
|
| | |
| |
| |
| |
| | |
Bug: 10899202.
Change-Id: I6247f895a11b41a70d7f43562d868dd91e8b1a91
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The OBB storage area is now presented on a per-user basis by the FUSE
daemon, so we no longer need to create bind mounts. (In fact, we
must use the FUSE daemon since it now correctly synthesizes UID
ownership on a per-user basis.)
Bug: 10506809
Change-Id: I2d6c5643d7c89d7a15ceb28af871e44618ad33ad
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows traceview to tell whether tracing is active, and whether
it is sampling or method tracing.
Bug: 9968521
Change-Id: I72100d1536ea3168998110ec1cfa5a183b55a67c
(cherry picked from commit 9d3a0a2e253aecd07c4a053c19cf9b0ccaa2db49)
|
| | |
| |
| |
| |
| |
| | |
(cherry picked from commit 86bb14a3e4d7ef3b8b4240bbc2a8b989a1b8c7c0)
Change-Id: Ifece45f6a6644c20b6681a58dd3eae3534ad47e4
|
| | |
| |
| |
| |
| | |
Bug: 9071417
Change-Id: I49429db9bde41065281512915cd1fbb18de6f951
|
| | |
| |
| |
| |
| |
| | |
(cherry picked from commit 46963dff1d1592729ba1e8b274835bf6c80a50bd)
Change-Id: I2d054bf0824ec8378291d2035fc0586c6ec9aa2e
|
| | |
| |
| |
| | |
Change-Id: I46588f15f92c8298130c49773951c62b05b44a4f
(cherry picked from commit 6d6dfeaa7f9d22fcf323f35712ab82d541ca3030)
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add the heap size/alloc/free stats to the Dalvik heap space breakdown section in dumpsys meminfo.
Also, now the zygote heap has a distict ashmem region name.
Bug: 9532137
Bug: 8266259
(cherry picked from commit 3edfe0b32753309ad7dcccd894239cb0a8aefb85)
Change-Id: I9b32727e4211f571a5205b6b7281958514d245d4
|
| | |\ \
| | |/
| |/|
| | |
| | | |
* commit '58de514b160674a483bcb912d367072c7354cc1e':
Fix Class.getDex.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Dalvik doesn't check its own .so when looking for JNI methods, so
manually register Class.getDex. Also fix a bug in that native method's
implementation.
Change-Id: Ic87484fac888e9eea0e5d51a2d2447eee860ece5
|
| | | |
| | |
| | |
| | |
| | |
| | | |
(Cherry-pick of b4d5cf78d4731ffc6211d07a0d69c92c559ba792.)
Change-Id: I5d1b41f029c9c49a2d60a066a5fb0ed0f52f4b52
|
| | | |
| | |
| | |
| | | |
Change-Id: I9ef0da6f715e2727d8530aa7a8edee97b5bfa48d
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
updateProcessState is called from the ActivityManager. It is used in ART
to help determine GC behavior.
Change-Id: I65662708ffd8443fff0c3d0e320bf8922e22d7cf
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
From:
https://googleplex-android-review.googlesource.com/#/c/328818/
Change-Id: I5a930e629c5a2062f01f870b4a44dcd98cb4ffe9
|
| | |/
| |
| |
| |
| |
| | |
(cherry picked from commit 70c799fc91564b497dedc408943065ed58a275bb)
Change-Id: I8392e9f9dd92420b5d5c61f83a32fae6e23ebee3
|
| | |
| |
| |
| |
| |
| | |
(cherry picked from commit 0f526895f34904784e3d2ef964b016d2764cb662)
Change-Id: I4f6f22e782e58a9b21af68aab1cebc21b3437976
|
| | |
| |
| |
| |
| | |
Change-Id: Ib1a0143752e701bf2f1e0b7edb4ea7829aa4edc3
Signed-off-by: Dima Zavin <dima@android.com>
|
| | |
| |
| |
| | |
Change-Id: I2b394c620af31914606763b35847b7f412774cf4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
system-wide volumes"
No longer needed as su calls piped through the Superuser daemon run outside
zygote mountspaces.
This reverts commit a4c574321cfe9d874e69d365b1326ccc27f4e9dd.
Change-Id: I39ad8842604b5067dc3e735bcbe5fce1f3454ca8
|
| | |
| |
| |
| |
| |
| |
| | |
Copy the correct starting heap size at process init.
Interfaces to set GC/managed heap parameters.
Change-Id: I454b1985a3225d7dbdea9c5d4e6f0c9f5e24352e
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Android 4.2 implements multi-user storage using per-process mount
namespaces. Originally, everything under "/" (the entire filesystem
hierarchy) is marked as a recursive-slave mountspace for all zygote
instances. This is done so that user-storage sandbox mounts under
/storage/emulated are hidden from other apps and users.
Unfortunately this means that any Dalvik app (actually, any program whose
clone/fork ancestry includes a Dalvik zygote, which is everything except
services spawned directly from init) cannot mount system-wide volumes.
Thus, apps like CifsManager are effectively broken in Android 4.2, since
its cifs mounts are only visible to the CifsManager app itself. All other
apps see empty mountpoints instead of the mounted volume. Furthermore,
Linux provides no provision for a process to "escape" a recursive-slave
mountspace in versions prior to Linux 3.8 (setns syscall).
Here, we restrict the slave mountspace to /storage (and, due to a possible
kernel bug, /mnt/shell/emulated) so that Dalvik apps can mount system-wide
volumes elsewhere (with appropriate permission, as in earlier versions of
Android), while retaining full multi-user storage compatibility.
This change requires that a tmpfs volume is mounted as /storage in init.rc.
If this volume is unavailable, then Zygote falls back to the previous
behavior of marking the entire filesystem hierarchy as slave. It also
implicitly requires that EMULATED_STORAGE_TARGET is path-prefixed by (part
of the subhierarchy of) ANDROID_STORAGE, which is the typical case.
|
| | |
| |
| |
| |
| |
| | |
Patch Set 2: Added gcc version check as suggested by jeagoss
Change-Id: I7743d5fab8d026e12ad9e9ef4d4fbabe0a9bded7
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Be sure to add '#define MADV_MERGEABLE 12' to
bionic/libc/include/sys/mman.h so we can have a central place for this
parse the process memory map and inform madvise common HEAP/Stack
regions on fork from zygote
These then can be used by the kernel KSM module to re-join (copy on write)
pages between the various dalvik processes.
As is on a fully loaded system you can expect ~12MB to be indicated to be
scanned by KSM.. of this 10-15% will be saved; as such a recommend a very
slow scan until as any logic to stop scanning while sleeping will require
another process and remove all memory savings provided by this logic.
To activate on a KSM kernel (2min for full scan of ~16m and 1%CPU):
echo 4000 > /sys/kernel/mm/ksm/sleep_millisecs
echo 128 > /sys/kernel/mm/ksm/pages_to_scan
echo 1 > /sys/kernel/mm/ksm/run
Newer kernels only require the last line.
In future additional memory regions and kernel logic may improve this.
Change-Id: I271cbee74a1f02a89c34c6ee9006a4ea81360154
|
| |/
|
|
|
|
| |
(cherry-pick of 7bf47d1d0d95c3ea9dfa7472e473edc820f21009.)
Change-Id: I0d4b96125e185b37767873e6fd88a59b63b6f7bd
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
capset is defined in <sys/capability.h>
Change-Id: Ifb340cfb3506830242749456706d4eddb73fb2aa
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
ping no longer needs CAP_NET_RAW. See:
* http://lwn.net/Articles/443051/
* https://android-review.googlesource.com/52090
* https://android-review.googlesource.com/52072
Eliminate the CAP_NET_RAW special case in zygote.
Change-Id: Ie4b1d2b65a27051bbd2825d288f9838762ae31c8
|
| |
|
|
|
|
|
| |
setuid -> setresuid()
setgid -> setresgid()
Change-Id: I319a6a0ea63cf5bd3755ec8371064365be30872b
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: I5b7964e53eca6f2da949d6ef24d42a9c6ed3996c
|
| | |
| |
| |
| |
| |
| | |
Previous review at https://android-review.googlesource.com/51731
Change-Id: Idfe6c95976cc8f82ec473bcb630678fa9ec9486a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prevent a zygote spawned application from acquiring
capabilities other than CAP_NET_RAW. The only Zygote
accessible program on Android which grants capabilities
is /system/bin/ping (CAP_NET_RAW), so we don't need to
keep the other capabilities in our bounding set.
If the kernel doesn't support file capabilities, we
end up printing approx 30 lines of warning messages. Hopefully
this will encourage kernel developers to upgrade. In a future
change, we can turn a prctl(PR_CAPBSET_DROP) failure into
a fatal error.
Change-Id: I8560fa5ad125bf31f0d13be513431697bc7d22bb
|
| |/
|
|
|
|
| |
This reverts commit 921e9aea72bc2aa99a52ccdb90573bbd3bf3508f, which prevents the emulator from booting.
Change-Id: I73b7afba38d4087d552dd685c56d4e5ddb3103cf
|