| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * NaCl Simple/secure ELF loader (NaCl SEL). | 8 * NaCl Simple/secure ELF loader (NaCl SEL). |
| 9 * | 9 * |
| 10 * This loader can only process NaCl object files as produced using | 10 * This loader can only process NaCl object files as produced using |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "native_client/src/shared/srpc/nacl_srpc.h" | 40 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 41 | 41 |
| 42 #include "native_client/src/trusted/interval_multiset/nacl_interval_multiset.h" | 42 #include "native_client/src/trusted/interval_multiset/nacl_interval_multiset.h" |
| 43 #include "native_client/src/trusted/interval_multiset/nacl_interval_range_tree.h
" | 43 #include "native_client/src/trusted/interval_multiset/nacl_interval_range_tree.h
" |
| 44 | 44 |
| 45 #include "native_client/src/trusted/service_runtime/dyn_array.h" | 45 #include "native_client/src/trusted/service_runtime/dyn_array.h" |
| 46 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" | 46 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
| 47 #include "native_client/src/trusted/service_runtime/nacl_kern_services.h" | 47 #include "native_client/src/trusted/service_runtime/nacl_kern_services.h" |
| 48 #include "native_client/src/trusted/service_runtime/nacl_resource.h" | 48 #include "native_client/src/trusted/service_runtime/nacl_resource.h" |
| 49 | 49 |
| 50 #include "native_client/src/trusted/service_runtime/nacl_secure_service.h" |
| 51 |
| 50 #include "native_client/src/trusted/service_runtime/sel_mem.h" | 52 #include "native_client/src/trusted/service_runtime/sel_mem.h" |
| 51 #include "native_client/src/trusted/service_runtime/sel_util.h" | 53 #include "native_client/src/trusted/service_runtime/sel_util.h" |
| 52 #include "native_client/src/trusted/service_runtime/sel_rt.h" | 54 #include "native_client/src/trusted/service_runtime/sel_rt.h" |
| 53 | 55 |
| 54 #include "native_client/src/trusted/service_runtime/name_service/name_service.h" | 56 #include "native_client/src/trusted/service_runtime/name_service/name_service.h" |
| 55 | 57 |
| 56 #include "native_client/src/trusted/validator/cpufeatures.h" | 58 #include "native_client/src/trusted/validator/cpufeatures.h" |
| 57 #include "native_client/src/trusted/validator/ncvalidate.h" | 59 #include "native_client/src/trusted/validator/ncvalidate.h" |
| 58 | 60 |
| 59 EXTERN_C_BEGIN | 61 EXTERN_C_BEGIN |
| 60 | 62 |
| 61 #define NACL_SERVICE_PORT_DESCRIPTOR 3 | 63 #define NACL_SERVICE_PORT_DESCRIPTOR 3 |
| 62 #define NACL_SERVICE_ADDRESS_DESCRIPTOR 4 | 64 #define NACL_SERVICE_ADDRESS_DESCRIPTOR 4 |
| 63 | 65 |
| 64 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */ | 66 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */ |
| 65 | 67 |
| 66 #define NACL_SANDBOX_CHROOT_FD "SBX_D" | 68 #define NACL_SANDBOX_CHROOT_FD "SBX_D" |
| 67 | 69 |
| 68 struct NaClAppThread; | 70 struct NaClAppThread; |
| 69 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */ | 71 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */ |
| 70 struct NaClDynamicRegion; | 72 struct NaClDynamicRegion; |
| 71 struct NaClManifestProxy; | 73 struct NaClManifestProxy; |
| 72 struct NaClReverseQuotaInterface; | 74 struct NaClReverseQuotaInterface; |
| 73 struct NaClSecureService; | |
| 74 struct NaClSecureReverseService; | |
| 75 struct NaClSignalContext; | 75 struct NaClSignalContext; |
| 76 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ | 76 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ |
| 77 struct NaClValidationCache; | 77 struct NaClValidationCache; |
| 78 | 78 |
| 79 struct NaClDebugCallbacks { | 79 struct NaClDebugCallbacks { |
| 80 void (*thread_create_hook)(struct NaClAppThread *natp); | 80 void (*thread_create_hook)(struct NaClAppThread *natp); |
| 81 void (*thread_exit_hook)(struct NaClAppThread *natp); | 81 void (*thread_exit_hook)(struct NaClAppThread *natp); |
| 82 void (*process_exit_hook)(int exit_status); | 82 void (*process_exit_hook)(int exit_status); |
| 83 }; | 83 }; |
| 84 | 84 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 | 594 |
| 595 void NaClAppDescriptorHookupCheck(struct NaClApp *nap); | 595 void NaClAppDescriptorHookupCheck(struct NaClApp *nap); |
| 596 | 596 |
| 597 void NaClCreateServiceSocket(struct NaClApp *nap); | 597 void NaClCreateServiceSocket(struct NaClApp *nap); |
| 598 | 598 |
| 599 void NaClSetUpBootstrapChannel(struct NaClApp *nap, | 599 void NaClSetUpBootstrapChannel(struct NaClApp *nap, |
| 600 NaClHandle inherited_desc); | 600 NaClHandle inherited_desc); |
| 601 | 601 |
| 602 void NaClSecureCommandChannel(struct NaClApp *nap); | 602 void NaClSecureCommandChannel(struct NaClApp *nap); |
| 603 | 603 |
| 604 int NaClSecureReverseClientInsertHandler( | |
| 605 struct NaClSecureReverseClient *self, | |
| 606 void (*handler)( | |
| 607 void *handler_state, | |
| 608 struct NaClThreadInterface *thread_if, | |
| 609 struct NaClDesc *new_conn), | |
| 610 void *handler_state) NACL_WUR; | |
| 611 | |
| 612 NaClErrorCode NaClWaitForLoadModuleStatus(struct NaClApp *nap) NACL_WUR; | 604 NaClErrorCode NaClWaitForLoadModuleStatus(struct NaClApp *nap) NACL_WUR; |
| 613 | 605 |
| 614 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR; | 606 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR; |
| 615 | 607 |
| 616 /* | 608 /* |
| 617 * NaClBlockIfCommandChannelExists is used during error exit. If | 609 * NaClBlockIfCommandChannelExists is used during error exit. If |
| 618 * there is a secure command channel, we sent an RPC reply with the | 610 * there is a secure command channel, we sent an RPC reply with the |
| 619 * reason that the nexe was rejected. If we exit immediately, that | 611 * reason that the nexe was rejected. If we exit immediately, that |
| 620 * reply may still be in-flight and the various channel closure (esp | 612 * reply may still be in-flight and the various channel closure (esp |
| 621 * reverse channels, if those were set up) may be detected first by | 613 * reverse channels, if those were set up) may be detected first by |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 #else | 772 #else |
| 781 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) { | 773 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) { |
| 782 UNREFERENCED_PARAMETER(argc_p); | 774 UNREFERENCED_PARAMETER(argc_p); |
| 783 UNREFERENCED_PARAMETER(argv_p); | 775 UNREFERENCED_PARAMETER(argv_p); |
| 784 } | 776 } |
| 785 #endif | 777 #endif |
| 786 | 778 |
| 787 EXTERN_C_END | 779 EXTERN_C_END |
| 788 | 780 |
| 789 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ | 781 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ |
| OLD | NEW |