OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // A mini-zygote specifically for Native Client. | 5 // A mini-zygote specifically for Native Client. |
6 | 6 |
7 #include "components/nacl/loader/nacl_helper_linux.h" | 7 #include "components/nacl/loader/nacl_helper_linux.h" |
8 | 8 |
9 // Exclude most of code in this file for nacl_helper_nonsfi temporarily. | 9 // Exclude most of code in this file for nacl_helper_nonsfi temporarily. |
10 // TODO(hidehiko): Enable this code path as dependencies become ready. | 10 // TODO(hidehiko): Enable this code path as dependencies become ready. |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "base/posix/global_descriptors.h" | 37 #include "base/posix/global_descriptors.h" |
38 #include "base/posix/unix_domain_socket_linux.h" | 38 #include "base/posix/unix_domain_socket_linux.h" |
39 #include "base/process/kill.h" | 39 #include "base/process/kill.h" |
40 #include "base/process/process_handle.h" | 40 #include "base/process/process_handle.h" |
41 #include "base/rand_util.h" | 41 #include "base/rand_util.h" |
42 #include "components/nacl/common/nacl_switches.h" | 42 #include "components/nacl/common/nacl_switches.h" |
43 #include "components/nacl/loader/nacl_listener.h" | 43 #include "components/nacl/loader/nacl_listener.h" |
44 #include "components/nacl/loader/nonsfi/irt_exception_handling.h" | 44 #include "components/nacl/loader/nonsfi/irt_exception_handling.h" |
45 #include "components/nacl/loader/nonsfi/nonsfi_listener.h" | 45 #include "components/nacl/loader/nonsfi/nonsfi_listener.h" |
46 #include "components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h" | 46 #include "components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h" |
47 #include "content/public/common/child_process_sandbox_support_linux.h" | |
48 #include "content/public/common/content_descriptors.h" | 47 #include "content/public/common/content_descriptors.h" |
| 48 #include "content/public/common/send_zygote_child_ping_linux.h" |
49 #include "content/public/common/zygote_fork_delegate_linux.h" | 49 #include "content/public/common/zygote_fork_delegate_linux.h" |
50 #include "crypto/nss_util.h" | 50 #include "crypto/nss_util.h" |
51 #include "ipc/ipc_descriptors.h" | 51 #include "ipc/ipc_descriptors.h" |
52 #include "ipc/ipc_switches.h" | 52 #include "ipc/ipc_switches.h" |
53 #include "sandbox/linux/services/libc_urandom_override.h" | 53 #include "sandbox/linux/services/libc_urandom_override.h" |
54 | 54 |
55 namespace { | 55 namespace { |
56 | 56 |
57 struct NaClLoaderSystemInfo { | 57 struct NaClLoaderSystemInfo { |
58 size_t prereserved_sandbox_size; | 58 size_t prereserved_sandbox_size; |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 while (true) { | 454 while (true) { |
455 bool request_handled = HandleZygoteRequest( | 455 bool request_handled = HandleZygoteRequest( |
456 kNaClZygoteDescriptor, system_info, nacl_sandbox.get()); | 456 kNaClZygoteDescriptor, system_info, nacl_sandbox.get()); |
457 // Do not turn this into a CHECK() without thinking about robustness | 457 // Do not turn this into a CHECK() without thinking about robustness |
458 // against malicious IPC requests. | 458 // against malicious IPC requests. |
459 DCHECK(request_handled); | 459 DCHECK(request_handled); |
460 } | 460 } |
461 NOTREACHED(); | 461 NOTREACHED(); |
462 #endif // !defined(__native_client_nonsfi__) | 462 #endif // !defined(__native_client_nonsfi__) |
463 } | 463 } |
OLD | NEW |