Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 17 | // sys/mount.h has to come before linux/fs.h due to redefinition of MS_RDONLY, MS_BIND, etc |
| 18 | #include <sys/mount.h> |
| 19 | #include <linux/fs.h> |
| 20 | |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 21 | #include <grp.h> |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 22 | #include <paths.h> |
Elliott Hughes | ada2da9 | 2012-01-17 17:58:58 -0800 | [diff] [blame] | 23 | #include <signal.h> |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 24 | #include <stdlib.h> |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 25 | #include <sys/types.h> |
| 26 | #include <sys/wait.h> |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 27 | #include <unistd.h> |
| 28 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 29 | #include "cutils/fs.h" |
| 30 | #include "cutils/multiuser.h" |
Elliott Hughes | b6636b8 | 2012-04-24 10:41:16 -0700 | [diff] [blame] | 31 | #include "cutils/sched_policy.h" |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 32 | #include "debugger.h" |
| 33 | #include "jni_internal.h" |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 34 | #include "JNIHelp.h" |
| 35 | #include "ScopedLocalRef.h" |
| 36 | #include "ScopedPrimitiveArray.h" |
| 37 | #include "ScopedUtfChars.h" |
Brian Carlstrom | a3d2718 | 2013-11-05 23:22:27 -0800 | [diff] [blame] | 38 | #include "thread-inl.h" |
William Roberts | 1e7d1d5 | 2013-11-11 07:28:37 -0800 | [diff] [blame] | 39 | #include "utils.h" |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 40 | |
Elliott Hughes | b4807ec | 2012-01-17 18:33:04 -0800 | [diff] [blame] | 41 | #if defined(HAVE_PRCTL) |
| 42 | #include <sys/prctl.h> |
| 43 | #endif |
| 44 | |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 45 | #include <selinux/android.h> |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 46 | |
Brian Carlstrom | 154cef6 | 2012-05-02 22:34:03 -0700 | [diff] [blame] | 47 | #if defined(__linux__) |
| 48 | #include <sys/personality.h> |
Nick Kralevich | b788278 | 2012-09-27 12:29:02 -0700 | [diff] [blame] | 49 | #include <sys/utsname.h> |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame^] | 50 | #if defined(HAVE_ANDROID_OS) |
Nick Kralevich | 2b97c27 | 2013-03-01 11:14:38 -0800 | [diff] [blame] | 51 | #include <sys/capability.h> |
Brian Carlstrom | 154cef6 | 2012-05-02 22:34:03 -0700 | [diff] [blame] | 52 | #endif |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame^] | 53 | #endif |
Brian Carlstrom | 154cef6 | 2012-05-02 22:34:03 -0700 | [diff] [blame] | 54 | |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 55 | namespace art { |
| 56 | |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 57 | static pid_t gSystemServerPid = 0; |
| 58 | |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 59 | // Must match values in dalvik.system.Zygote. |
| 60 | enum MountExternalKind { |
| 61 | MOUNT_EXTERNAL_NONE = 0, |
| 62 | MOUNT_EXTERNAL_SINGLEUSER = 1, |
| 63 | MOUNT_EXTERNAL_MULTIUSER = 2, |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 64 | MOUNT_EXTERNAL_MULTIUSER_ALL = 3, |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 67 | // This signal handler is for zygote mode, since the zygote must reap its children |
Elliott Hughes | 1bac54f | 2012-03-16 12:48:31 -0700 | [diff] [blame] | 68 | static void SigChldHandler(int /*signal_number*/) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 69 | pid_t pid; |
| 70 | int status; |
| 71 | |
| 72 | while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { |
| 73 | // Log process-death status that we care about. In general it is |
| 74 | // not safe to call LOG(...) from a signal handler because of |
| 75 | // possible reentrancy. However, we know a priori that the |
| 76 | // current implementation of LOG() is safe to call from a SIGCHLD |
| 77 | // handler in the zygote process. If the LOG() implementation |
| 78 | // changes its locking strategy or its use of syscalls within the |
| 79 | // lazy-init critical section, its use here may become unsafe. |
| 80 | if (WIFEXITED(status)) { |
| 81 | if (WEXITSTATUS(status)) { |
| 82 | LOG(INFO) << "Process " << pid << " exited cleanly (" << WEXITSTATUS(status) << ")"; |
| 83 | } else if (false) { |
| 84 | LOG(INFO) << "Process " << pid << " exited cleanly (" << WEXITSTATUS(status) << ")"; |
| 85 | } |
| 86 | } else if (WIFSIGNALED(status)) { |
| 87 | if (WTERMSIG(status) != SIGKILL) { |
| 88 | LOG(INFO) << "Process " << pid << " terminated by signal (" << WTERMSIG(status) << ")"; |
| 89 | } else if (false) { |
| 90 | LOG(INFO) << "Process " << pid << " terminated by signal (" << WTERMSIG(status) << ")"; |
| 91 | } |
| 92 | #ifdef WCOREDUMP |
| 93 | if (WCOREDUMP(status)) { |
| 94 | LOG(INFO) << "Process " << pid << " dumped core"; |
| 95 | } |
| 96 | #endif /* ifdef WCOREDUMP */ |
| 97 | } |
| 98 | |
| 99 | // If the just-crashed process is the system_server, bring down zygote |
| 100 | // so that it is restarted by init and system server will be restarted |
| 101 | // from there. |
| 102 | if (pid == gSystemServerPid) { |
Brian Carlstrom | 6a4be3a | 2011-10-20 16:34:03 -0700 | [diff] [blame] | 103 | LOG(ERROR) << "Exit zygote because system server (" << pid << ") has terminated"; |
| 104 | kill(getpid(), SIGKILL); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 105 | } |
| 106 | } |
| 107 | |
| 108 | if (pid < 0) { |
| 109 | PLOG(WARNING) << "Zygote SIGCHLD error in waitpid"; |
| 110 | } |
| 111 | } |
| 112 | |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 113 | // Configures the SIGCHLD handler for the zygote process. This is configured |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 114 | // very late, because earlier in the runtime we may fork() and exec() |
| 115 | // other processes, and we want to waitpid() for those rather than |
| 116 | // have them be harvested immediately. |
| 117 | // |
| 118 | // This ends up being called repeatedly before each fork(), but there's |
| 119 | // no real harm in that. |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 120 | static void SetSigChldHandler() { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 121 | struct sigaction sa; |
| 122 | memset(&sa, 0, sizeof(sa)); |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 123 | sa.sa_handler = SigChldHandler; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 124 | |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 125 | int err = sigaction(SIGCHLD, &sa, NULL); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 126 | if (err < 0) { |
| 127 | PLOG(WARNING) << "Error setting SIGCHLD handler"; |
| 128 | } |
| 129 | } |
| 130 | |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 131 | // Sets the SIGCHLD handler back to default behavior in zygote children. |
| 132 | static void UnsetSigChldHandler() { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 133 | struct sigaction sa; |
| 134 | memset(&sa, 0, sizeof(sa)); |
| 135 | sa.sa_handler = SIG_DFL; |
| 136 | |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 137 | int err = sigaction(SIGCHLD, &sa, NULL); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 138 | if (err < 0) { |
| 139 | PLOG(WARNING) << "Error unsetting SIGCHLD handler"; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // Calls POSIX setgroups() using the int[] object as an argument. |
| 144 | // A NULL argument is tolerated. |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 145 | static void SetGids(JNIEnv* env, jintArray javaGids) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 146 | if (javaGids == NULL) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 147 | return; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | COMPILE_ASSERT(sizeof(gid_t) == sizeof(jint), sizeof_gid_and_jint_are_differerent); |
| 151 | ScopedIntArrayRO gids(env, javaGids); |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 152 | CHECK(gids.get() != NULL); |
| 153 | int rc = setgroups(gids.size(), reinterpret_cast<const gid_t*>(&gids[0])); |
| 154 | if (rc == -1) { |
| 155 | PLOG(FATAL) << "setgroups failed"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 156 | } |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | // Sets the resource limits via setrlimit(2) for the values in the |
| 160 | // two-dimensional array of integers that's passed in. The second dimension |
| 161 | // contains a tuple of length 3: (resource, rlim_cur, rlim_max). NULL is |
| 162 | // treated as an empty array. |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 163 | static void SetRLimits(JNIEnv* env, jobjectArray javaRlimits) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 164 | if (javaRlimits == NULL) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 165 | return; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 166 | } |
| 167 | |
Elliott Hughes | 7b9d996 | 2012-04-20 18:48:18 -0700 | [diff] [blame] | 168 | rlimit rlim; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 169 | memset(&rlim, 0, sizeof(rlim)); |
| 170 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 171 | for (int i = 0; i < env->GetArrayLength(javaRlimits); ++i) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 172 | ScopedLocalRef<jobject> javaRlimitObject(env, env->GetObjectArrayElement(javaRlimits, i)); |
| 173 | ScopedIntArrayRO javaRlimit(env, reinterpret_cast<jintArray>(javaRlimitObject.get())); |
| 174 | if (javaRlimit.size() != 3) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 175 | LOG(FATAL) << "rlimits array must have a second dimension of size 3"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | rlim.rlim_cur = javaRlimit[1]; |
| 179 | rlim.rlim_max = javaRlimit[2]; |
| 180 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 181 | int rc = setrlimit(javaRlimit[0], &rlim); |
| 182 | if (rc == -1) { |
| 183 | PLOG(FATAL) << "setrlimit(" << javaRlimit[0] << ", " |
| 184 | << "{" << rlim.rlim_cur << ", " << rlim.rlim_max << "}) failed"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 185 | } |
| 186 | } |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 187 | } |
| 188 | |
Elliott Hughes | 76e3694 | 2012-03-16 13:44:56 -0700 | [diff] [blame] | 189 | #if defined(HAVE_ANDROID_OS) |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 190 | |
| 191 | // The debug malloc library needs to know whether it's the zygote or a child. |
| 192 | extern "C" int gMallocLeakZygoteChild; |
| 193 | |
| 194 | static void EnableDebugger() { |
| 195 | // To let a non-privileged gdbserver attach to this |
| 196 | // process, we must set our dumpable flag. |
| 197 | if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) { |
| 198 | PLOG(ERROR) << "prctl(PR_SET_DUMPABLE) failed for pid " << getpid(); |
| 199 | } |
| 200 | // We don't want core dumps, though, so set the core dump size to 0. |
| 201 | rlimit rl; |
| 202 | rl.rlim_cur = 0; |
| 203 | rl.rlim_max = RLIM_INFINITY; |
| 204 | if (setrlimit(RLIMIT_CORE, &rl) == -1) { |
| 205 | PLOG(ERROR) << "setrlimit(RLIMIT_CORE) failed for pid " << getpid(); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | static void EnableKeepCapabilities() { |
| 210 | int rc = prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0); |
| 211 | if (rc == -1) { |
| 212 | PLOG(FATAL) << "prctl(PR_SET_KEEPCAPS) failed"; |
| 213 | } |
| 214 | } |
| 215 | |
Nick Kralevich | a0664be | 2013-02-13 14:39:17 -0800 | [diff] [blame] | 216 | static void DropCapabilitiesBoundingSet() { |
| 217 | for (int i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) { |
| 218 | if (i == CAP_NET_RAW) { |
| 219 | // Don't break /system/bin/ping |
| 220 | continue; |
| 221 | } |
| 222 | int rc = prctl(PR_CAPBSET_DROP, i, 0, 0, 0); |
| 223 | if (rc == -1) { |
| 224 | if (errno == EINVAL) { |
| 225 | PLOG(ERROR) << "prctl(PR_CAPBSET_DROP) failed with EINVAL. Please verify " |
| 226 | << "your kernel is compiled with file capabilities support"; |
| 227 | } else { |
| 228 | PLOG(FATAL) << "prctl(PR_CAPBSET_DROP) failed"; |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | |
Elliott Hughes | 76e3694 | 2012-03-16 13:44:56 -0700 | [diff] [blame] | 234 | static void SetCapabilities(int64_t permitted, int64_t effective) { |
Elliott Hughes | 7b9d996 | 2012-04-20 18:48:18 -0700 | [diff] [blame] | 235 | __user_cap_header_struct capheader; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 236 | memset(&capheader, 0, sizeof(capheader)); |
Elliott Hughes | e146765 | 2013-11-11 11:15:43 -0800 | [diff] [blame] | 237 | capheader.version = _LINUX_CAPABILITY_VERSION_3; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 238 | capheader.pid = 0; |
| 239 | |
Elliott Hughes | e146765 | 2013-11-11 11:15:43 -0800 | [diff] [blame] | 240 | __user_cap_data_struct capdata[2]; |
| 241 | memset(&capdata, 0, sizeof(capdata)); |
| 242 | capdata[0].effective = effective; |
| 243 | capdata[1].effective = effective >> 32; |
| 244 | capdata[0].permitted = permitted; |
| 245 | capdata[1].permitted = permitted >> 32; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 246 | |
Elliott Hughes | e146765 | 2013-11-11 11:15:43 -0800 | [diff] [blame] | 247 | if (capset(&capheader, &capdata[0]) == -1) { |
Elliott Hughes | 3d30d9b | 2011-12-07 17:35:48 -0800 | [diff] [blame] | 248 | PLOG(FATAL) << "capset(" << permitted << ", " << effective << ") failed"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 249 | } |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 250 | } |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 251 | |
| 252 | static void SetSchedulerPolicy() { |
| 253 | errno = -set_sched_policy(0, SP_DEFAULT); |
| 254 | if (errno != 0) { |
| 255 | PLOG(FATAL) << "set_sched_policy(0, SP_DEFAULT) failed"; |
| 256 | } |
| 257 | } |
| 258 | |
Elliott Hughes | 76e3694 | 2012-03-16 13:44:56 -0700 | [diff] [blame] | 259 | #else |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 260 | |
| 261 | static int gMallocLeakZygoteChild = 0; |
| 262 | |
| 263 | static void EnableDebugger() {} |
| 264 | static void EnableKeepCapabilities() {} |
Brian Carlstrom | 9b7085a | 2013-07-18 15:15:21 -0700 | [diff] [blame] | 265 | static void DropCapabilitiesBoundingSet() {} |
Elliott Hughes | 76e3694 | 2012-03-16 13:44:56 -0700 | [diff] [blame] | 266 | static void SetCapabilities(int64_t, int64_t) {} |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 267 | static void SetSchedulerPolicy() {} |
| 268 | |
Elliott Hughes | 76e3694 | 2012-03-16 13:44:56 -0700 | [diff] [blame] | 269 | #endif |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 270 | |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 271 | static void EnableDebugFeatures(uint32_t debug_flags) { |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 272 | // Must match values in dalvik.system.Zygote. |
| 273 | enum { |
| 274 | DEBUG_ENABLE_DEBUGGER = 1, |
| 275 | DEBUG_ENABLE_CHECKJNI = 1 << 1, |
| 276 | DEBUG_ENABLE_ASSERT = 1 << 2, |
| 277 | DEBUG_ENABLE_SAFEMODE = 1 << 3, |
| 278 | DEBUG_ENABLE_JNI_LOGGING = 1 << 4, |
| 279 | }; |
| 280 | |
| 281 | if ((debug_flags & DEBUG_ENABLE_CHECKJNI) != 0) { |
| 282 | Runtime* runtime = Runtime::Current(); |
| 283 | JavaVMExt* vm = runtime->GetJavaVM(); |
| 284 | if (!vm->check_jni) { |
| 285 | LOG(DEBUG) << "Late-enabling -Xcheck:jni"; |
Elliott Hughes | 88c5c35 | 2012-03-15 18:49:48 -0700 | [diff] [blame] | 286 | vm->SetCheckJniEnabled(true); |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 287 | // There's only one thread running at this point, so only one JNIEnv to fix up. |
Elliott Hughes | 88c5c35 | 2012-03-15 18:49:48 -0700 | [diff] [blame] | 288 | Thread::Current()->GetJniEnv()->SetCheckJniEnabled(true); |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 289 | } else { |
| 290 | LOG(DEBUG) << "Not late-enabling -Xcheck:jni (already on)"; |
| 291 | } |
| 292 | debug_flags &= ~DEBUG_ENABLE_CHECKJNI; |
| 293 | } |
| 294 | |
| 295 | if ((debug_flags & DEBUG_ENABLE_JNI_LOGGING) != 0) { |
Elliott Hughes | 4dd9b4d | 2011-12-12 18:29:24 -0800 | [diff] [blame] | 296 | gLogVerbosity.third_party_jni = true; |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 297 | debug_flags &= ~DEBUG_ENABLE_JNI_LOGGING; |
| 298 | } |
| 299 | |
| 300 | Dbg::SetJdwpAllowed((debug_flags & DEBUG_ENABLE_DEBUGGER) != 0); |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 301 | if ((debug_flags & DEBUG_ENABLE_DEBUGGER) != 0) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 302 | EnableDebugger(); |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 303 | } |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 304 | debug_flags &= ~DEBUG_ENABLE_DEBUGGER; |
| 305 | |
| 306 | // These two are for backwards compatibility with Dalvik. |
| 307 | debug_flags &= ~DEBUG_ENABLE_ASSERT; |
| 308 | debug_flags &= ~DEBUG_ENABLE_SAFEMODE; |
| 309 | |
| 310 | if (debug_flags != 0) { |
| 311 | LOG(ERROR) << StringPrintf("Unknown bits set in debug_flags: %#x", debug_flags); |
| 312 | } |
| 313 | } |
| 314 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 315 | // Create a private mount namespace and bind mount appropriate emulated |
| 316 | // storage for the given user. |
| 317 | static bool MountEmulatedStorage(uid_t uid, jint mount_mode) { |
| 318 | if (mount_mode == MOUNT_EXTERNAL_NONE) { |
| 319 | return true; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 320 | } |
| 321 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 322 | // See storage config details at http://source.android.com/tech/storage/ |
| 323 | userid_t user_id = multiuser_get_user_id(uid); |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 324 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 325 | // Create a second private mount namespace for our process |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 326 | if (unshare(CLONE_NEWNS) == -1) { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 327 | PLOG(WARNING) << "Failed to unshare()"; |
| 328 | return false; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 329 | } |
| 330 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 331 | // Create bind mounts to expose external storage |
| 332 | if (mount_mode == MOUNT_EXTERNAL_MULTIUSER || mount_mode == MOUNT_EXTERNAL_MULTIUSER_ALL) { |
| 333 | // These paths must already be created by init.rc |
| 334 | const char* source = getenv("EMULATED_STORAGE_SOURCE"); |
| 335 | const char* target = getenv("EMULATED_STORAGE_TARGET"); |
| 336 | const char* legacy = getenv("EXTERNAL_STORAGE"); |
| 337 | if (source == NULL || target == NULL || legacy == NULL) { |
| 338 | LOG(WARNING) << "Storage environment undefined; unable to provide external storage"; |
| 339 | return false; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 340 | } |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 341 | |
| 342 | // Prepare source paths |
| 343 | |
| 344 | // /mnt/shell/emulated/0 |
| 345 | std::string source_user(StringPrintf("%s/%d", source, user_id)); |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 346 | // /storage/emulated/0 |
| 347 | std::string target_user(StringPrintf("%s/%d", target, user_id)); |
| 348 | |
| 349 | if (fs_prepare_dir(source_user.c_str(), 0000, 0, 0) == -1 |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 350 | || fs_prepare_dir(target_user.c_str(), 0000, 0, 0) == -1) { |
| 351 | return false; |
| 352 | } |
| 353 | |
| 354 | if (mount_mode == MOUNT_EXTERNAL_MULTIUSER_ALL) { |
| 355 | // Mount entire external storage tree for all users |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 356 | if (TEMP_FAILURE_RETRY(mount(source, target, NULL, MS_BIND, NULL)) == -1) { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 357 | PLOG(WARNING) << "Failed to mount " << source << " to " << target; |
| 358 | return false; |
| 359 | } |
| 360 | } else { |
| 361 | // Only mount user-specific external storage |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 362 | if (TEMP_FAILURE_RETRY( |
| 363 | mount(source_user.c_str(), target_user.c_str(), NULL, MS_BIND, NULL)) == -1) { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 364 | PLOG(WARNING) << "Failed to mount " << source_user << " to " << target_user; |
| 365 | return false; |
| 366 | } |
| 367 | } |
| 368 | |
Jeff Sharkey | b8c46fc | 2013-09-10 18:28:10 -0700 | [diff] [blame] | 369 | if (fs_prepare_dir(legacy, 0000, 0, 0) == -1) { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 370 | return false; |
| 371 | } |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 372 | |
| 373 | // Finally, mount user-specific path into place for legacy users |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 374 | if (TEMP_FAILURE_RETRY( |
| 375 | mount(target_user.c_str(), legacy, NULL, MS_BIND | MS_REC, NULL)) == -1) { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 376 | PLOG(WARNING) << "Failed to mount " << target_user << " to " << legacy; |
| 377 | return false; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 378 | } |
| 379 | } else { |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 380 | LOG(WARNING) << "Mount mode " << mount_mode << " unsupported"; |
| 381 | return false; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 382 | } |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 383 | |
| 384 | return true; |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 385 | } |
| 386 | |
Nick Kralevich | b788278 | 2012-09-27 12:29:02 -0700 | [diff] [blame] | 387 | #if defined(__linux__) |
| 388 | static bool NeedsNoRandomizeWorkaround() { |
Nick Kralevich | 50e1744 | 2012-10-19 13:02:37 -0700 | [diff] [blame] | 389 | #if !defined(__arm__) |
| 390 | return false; |
| 391 | #else |
Nick Kralevich | b788278 | 2012-09-27 12:29:02 -0700 | [diff] [blame] | 392 | int major; |
| 393 | int minor; |
| 394 | struct utsname uts; |
| 395 | if (uname(&uts) == -1) { |
| 396 | return false; |
| 397 | } |
| 398 | |
| 399 | if (sscanf(uts.release, "%d.%d", &major, &minor) != 2) { |
| 400 | return false; |
| 401 | } |
| 402 | |
| 403 | // Kernels before 3.4.* need the workaround. |
| 404 | return (major < 3) || ((major == 3) && (minor < 4)); |
Nick Kralevich | 50e1744 | 2012-10-19 13:02:37 -0700 | [diff] [blame] | 405 | #endif |
Nick Kralevich | b788278 | 2012-09-27 12:29:02 -0700 | [diff] [blame] | 406 | } |
| 407 | #endif |
| 408 | |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 409 | // Utility routine to fork zygote and specialize the child process. |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 410 | static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray javaGids, |
| 411 | jint debug_flags, jobjectArray javaRlimits, |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 412 | jlong permittedCapabilities, jlong effectiveCapabilities, |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 413 | jint mount_external, |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 414 | jstring java_se_info, jstring java_se_name, |
| 415 | bool is_system_server) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 416 | Runtime* runtime = Runtime::Current(); |
| 417 | CHECK(runtime->IsZygote()) << "runtime instance not started with -Xzygote"; |
Mathieu Chartier | cc236d7 | 2012-07-20 10:29:05 -0700 | [diff] [blame] | 418 | if (!runtime->PreZygoteFork()) { |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 419 | LOG(FATAL) << "pre-fork heap failed"; |
| 420 | } |
| 421 | |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 422 | SetSigChldHandler(); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 423 | |
| 424 | // Grab thread before fork potentially makes Thread::pthread_key_self_ unusable. |
| 425 | Thread* self = Thread::Current(); |
| 426 | |
| 427 | // dvmDumpLoaderStats("zygote"); // TODO: ? |
| 428 | pid_t pid = fork(); |
| 429 | |
| 430 | if (pid == 0) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 431 | // The child process. |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 432 | gMallocLeakZygoteChild = 1; |
| 433 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 434 | // Keep capabilities across UID change, unless we're staying root. |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 435 | if (uid != 0) { |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 436 | EnableKeepCapabilities(); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 437 | } |
| 438 | |
Nick Kralevich | a0664be | 2013-02-13 14:39:17 -0800 | [diff] [blame] | 439 | DropCapabilitiesBoundingSet(); |
| 440 | |
Brian Carlstrom | bd86bcc | 2013-03-10 20:26:16 -0700 | [diff] [blame] | 441 | if (!MountEmulatedStorage(uid, mount_external)) { |
| 442 | PLOG(WARNING) << "Failed to mount emulated storage"; |
| 443 | if (errno == ENOTCONN || errno == EROFS) { |
| 444 | // When device is actively encrypting, we get ENOTCONN here |
| 445 | // since FUSE was mounted before the framework restarted. |
| 446 | // When encrypted device is booting, we get EROFS since |
| 447 | // FUSE hasn't been created yet by init. |
| 448 | // In either case, continue without external storage. |
| 449 | } else { |
| 450 | LOG(FATAL) << "Cannot continue without emulated storage"; |
| 451 | } |
| 452 | } |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 453 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 454 | SetGids(env, javaGids); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 455 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 456 | SetRLimits(env, javaRlimits); |
| 457 | |
Nick Kralevich | 7e2364c | 2013-02-20 14:46:54 -0800 | [diff] [blame] | 458 | int rc = setresgid(gid, gid, gid); |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 459 | if (rc == -1) { |
Nick Kralevich | 7e2364c | 2013-02-20 14:46:54 -0800 | [diff] [blame] | 460 | PLOG(FATAL) << "setresgid(" << gid << ") failed"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 461 | } |
| 462 | |
Nick Kralevich | 7e2364c | 2013-02-20 14:46:54 -0800 | [diff] [blame] | 463 | rc = setresuid(uid, uid, uid); |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 464 | if (rc == -1) { |
Nick Kralevich | 7e2364c | 2013-02-20 14:46:54 -0800 | [diff] [blame] | 465 | PLOG(FATAL) << "setresuid(" << uid << ") failed"; |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 466 | } |
| 467 | |
Brian Carlstrom | 154cef6 | 2012-05-02 22:34:03 -0700 | [diff] [blame] | 468 | #if defined(__linux__) |
Nick Kralevich | b788278 | 2012-09-27 12:29:02 -0700 | [diff] [blame] | 469 | if (NeedsNoRandomizeWorkaround()) { |
| 470 | // Work around ARM kernel ASLR lossage (http://b/5817320). |
| 471 | int old_personality = personality(0xffffffff); |
| 472 | int new_personality = personality(old_personality | ADDR_NO_RANDOMIZE); |
| 473 | if (new_personality == -1) { |
| 474 | PLOG(WARNING) << "personality(" << new_personality << ") failed"; |
| 475 | } |
Elliott Hughes | 51e5386 | 2012-05-02 17:17:28 -0700 | [diff] [blame] | 476 | } |
Brian Carlstrom | 154cef6 | 2012-05-02 22:34:03 -0700 | [diff] [blame] | 477 | #endif |
Elliott Hughes | 51e5386 | 2012-05-02 17:17:28 -0700 | [diff] [blame] | 478 | |
Elliott Hughes | 3d30d9b | 2011-12-07 17:35:48 -0800 | [diff] [blame] | 479 | SetCapabilities(permittedCapabilities, effectiveCapabilities); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 480 | |
Elliott Hughes | 2abeb9b | 2012-05-11 23:42:02 -0700 | [diff] [blame] | 481 | SetSchedulerPolicy(); |
Elliott Hughes | b6636b8 | 2012-04-24 10:41:16 -0700 | [diff] [blame] | 482 | |
Kenny Root | dc1cd10 | 2012-10-17 10:35:32 -0700 | [diff] [blame] | 483 | #if defined(HAVE_ANDROID_OS) |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 484 | { // NOLINT(whitespace/braces) |
Brian Carlstrom | 1a0b475 | 2012-10-17 16:23:18 -0700 | [diff] [blame] | 485 | const char* se_info_c_str = NULL; |
| 486 | UniquePtr<ScopedUtfChars> se_info; |
| 487 | if (java_se_info != NULL) { |
| 488 | se_info.reset(new ScopedUtfChars(env, java_se_info)); |
| 489 | se_info_c_str = se_info->c_str(); |
| 490 | CHECK(se_info_c_str != NULL); |
| 491 | } |
| 492 | const char* se_name_c_str = NULL; |
| 493 | UniquePtr<ScopedUtfChars> se_name; |
| 494 | if (java_se_name != NULL) { |
| 495 | se_name.reset(new ScopedUtfChars(env, java_se_name)); |
| 496 | se_name_c_str = se_name->c_str(); |
| 497 | CHECK(se_name_c_str != NULL); |
| 498 | } |
| 499 | rc = selinux_android_setcontext(uid, is_system_server, se_info_c_str, se_name_c_str); |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 500 | if (rc == -1) { |
| 501 | PLOG(FATAL) << "selinux_android_setcontext(" << uid << ", " |
| 502 | << (is_system_server ? "true" : "false") << ", " |
Brian Carlstrom | 1a0b475 | 2012-10-17 16:23:18 -0700 | [diff] [blame] | 503 | << "\"" << se_info_c_str << "\", \"" << se_name_c_str << "\") failed"; |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 504 | } |
William Roberts | 1e7d1d5 | 2013-11-11 07:28:37 -0800 | [diff] [blame] | 505 | |
| 506 | // Make it easier to debug audit logs by setting the main thread's name to the |
| 507 | // nice name rather than "app_process". |
| 508 | if (se_info_c_str == NULL && is_system_server) { |
| 509 | se_name_c_str = "system_server"; |
| 510 | } |
| 511 | if (se_info_c_str != NULL) { |
| 512 | SetThreadName(se_name_c_str); |
| 513 | } |
Elliott Hughes | c151f90 | 2012-06-21 20:33:21 -0700 | [diff] [blame] | 514 | } |
| 515 | #else |
| 516 | UNUSED(is_system_server); |
| 517 | UNUSED(java_se_info); |
| 518 | UNUSED(java_se_name); |
| 519 | #endif |
| 520 | |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 521 | // Our system thread ID, etc, has changed so reset Thread state. |
| 522 | self->InitAfterFork(); |
| 523 | |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 524 | EnableDebugFeatures(debug_flags); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 525 | |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 526 | UnsetSigChldHandler(); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 527 | runtime->DidForkFromZygote(); |
| 528 | } else if (pid > 0) { |
| 529 | // the parent process |
| 530 | } |
| 531 | return pid; |
| 532 | } |
| 533 | |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 534 | static jint Zygote_nativeForkAndSpecialize(JNIEnv* env, jclass, jint uid, jint gid, jintArray gids, |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 535 | jint debug_flags, jobjectArray rlimits, |
| 536 | jint mount_external, jstring se_info, jstring se_name) { |
| 537 | return ForkAndSpecializeCommon(env, uid, gid, gids, debug_flags, rlimits, 0, 0, mount_external, |
| 538 | se_info, se_name, false); |
Brian Carlstrom | a9f1978 | 2011-10-13 00:14:47 -0700 | [diff] [blame] | 539 | } |
| 540 | |
Elliott Hughes | 0512f02 | 2012-03-15 22:10:52 -0700 | [diff] [blame] | 541 | static jint Zygote_nativeForkSystemServer(JNIEnv* env, jclass, uid_t uid, gid_t gid, jintArray gids, |
| 542 | jint debug_flags, jobjectArray rlimits, |
Brian Carlstrom | 01add2c | 2013-12-16 09:50:35 -0800 | [diff] [blame] | 543 | jlong permittedCapabilities, |
| 544 | jlong effectiveCapabilities) { |
Elliott Hughes | 4ffd313 | 2011-10-24 12:06:42 -0700 | [diff] [blame] | 545 | pid_t pid = ForkAndSpecializeCommon(env, uid, gid, gids, |
| 546 | debug_flags, rlimits, |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 547 | permittedCapabilities, effectiveCapabilities, |
| 548 | MOUNT_EXTERNAL_NONE, NULL, NULL, true); |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 549 | if (pid > 0) { |
| 550 | // The zygote process checks whether the child process has died or not. |
| 551 | LOG(INFO) << "System server process " << pid << " has been created"; |
| 552 | gSystemServerPid = pid; |
| 553 | // There is a slight window that the system server process has crashed |
| 554 | // but it went unnoticed because we haven't published its pid yet. So |
| 555 | // we recheck here just to make sure that all is well. |
| 556 | int status; |
| 557 | if (waitpid(pid, &status, WNOHANG) == pid) { |
| 558 | LOG(FATAL) << "System server process " << pid << " has died. Restarting Zygote!"; |
| 559 | } |
| 560 | } |
| 561 | return pid; |
| 562 | } |
| 563 | |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 564 | static JNINativeMethod gMethods[] = { |
Elliott Hughes | 178cdcc | 2012-08-16 16:47:31 -0700 | [diff] [blame] | 565 | NATIVE_METHOD(Zygote, nativeForkAndSpecialize, "(II[II[[IILjava/lang/String;Ljava/lang/String;)I"), |
Brian Carlstrom | caabb1b | 2011-10-11 18:09:13 -0700 | [diff] [blame] | 566 | NATIVE_METHOD(Zygote, nativeForkSystemServer, "(II[II[[IJJ)I"), |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 567 | }; |
| 568 | |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 569 | void register_dalvik_system_Zygote(JNIEnv* env) { |
Elliott Hughes | 7756d54 | 2012-05-24 21:56:51 -0700 | [diff] [blame] | 570 | REGISTER_NATIVE_METHODS("dalvik/system/Zygote"); |
Elliott Hughes | 01158d7 | 2011-09-19 19:47:10 -0700 | [diff] [blame] | 571 | } |
| 572 | |
| 573 | } // namespace art |