Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: src/trusted/service_runtime/sel_ldr.h

Issue 10914138: Split secure command channel and untrusted application channel (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 #include "native_client/src/trusted/service_runtime/nacl_command_service.h"
52
50 #include "native_client/src/trusted/service_runtime/sel_mem.h" 53 #include "native_client/src/trusted/service_runtime/sel_mem.h"
51 #include "native_client/src/trusted/service_runtime/sel_util.h" 54 #include "native_client/src/trusted/service_runtime/sel_util.h"
52 #include "native_client/src/trusted/service_runtime/sel_rt.h" 55 #include "native_client/src/trusted/service_runtime/sel_rt.h"
53 56
54 #include "native_client/src/trusted/service_runtime/name_service/name_service.h" 57 #include "native_client/src/trusted/service_runtime/name_service/name_service.h"
55 58
56 #include "native_client/src/trusted/validator/cpufeatures.h" 59 #include "native_client/src/trusted/validator/cpufeatures.h"
57 #include "native_client/src/trusted/validator/ncvalidate.h" 60 #include "native_client/src/trusted/validator/ncvalidate.h"
58 61
59 EXTERN_C_BEGIN 62 EXTERN_C_BEGIN
60 63
61 #define NACL_SERVICE_PORT_DESCRIPTOR 3 64 #define NACL_SERVICE_PORT_DESCRIPTOR 3
62 #define NACL_SERVICE_ADDRESS_DESCRIPTOR 4 65 #define NACL_SERVICE_ADDRESS_DESCRIPTOR 4
63 66
64 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */ 67 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */
65 68
66 #define NACL_SANDBOX_CHROOT_FD "SBX_D" 69 #define NACL_SANDBOX_CHROOT_FD "SBX_D"
67 70
68 struct NaClAppThread; 71 struct NaClAppThread;
69 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */ 72 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */
70 struct NaClDynamicRegion; 73 struct NaClDynamicRegion;
71 struct NaClManifestProxy; 74 struct NaClManifestProxy;
72 struct NaClReverseQuotaInterface; 75 struct NaClReverseQuotaInterface;
73 struct NaClSecureService;
74 struct NaClSecureReverseService;
75 struct NaClSignalContext; 76 struct NaClSignalContext;
76 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ 77 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */
77 struct NaClValidationCache; 78 struct NaClValidationCache;
78 79
79 struct NaClDebugCallbacks { 80 struct NaClDebugCallbacks {
80 void (*thread_create_hook)(struct NaClAppThread *natp); 81 void (*thread_create_hook)(struct NaClAppThread *natp);
81 void (*thread_exit_hook)(struct NaClAppThread *natp); 82 void (*thread_exit_hook)(struct NaClAppThread *natp);
82 void (*process_exit_hook)(int exit_status); 83 void (*process_exit_hook)(int exit_status);
83 }; 84 };
84 85
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 struct NaClSyscallTableEntry *syscall_table; 237 struct NaClSyscallTableEntry *syscall_table;
237 238
238 /* 239 /*
239 * Name service must launch after mu, cv, vm_hole_may_exit, 240 * Name service must launch after mu, cv, vm_hole_may_exit,
240 * threads_launching are initialized. 241 * threads_launching are initialized.
241 */ 242 */
242 struct NaClNameService *name_service; /* default name server */ 243 struct NaClNameService *name_service; /* default name server */
243 struct NaClDesc *name_service_conn_cap; 244 struct NaClDesc *name_service_conn_cap;
244 245
245 struct NaClSecureService *secure_service; 246 struct NaClSecureService *secure_service;
247 struct NaClCommandService *command_service;
246 struct NaClManifestProxy *manifest_proxy; 248 struct NaClManifestProxy *manifest_proxy;
247 struct NaClKernService *kern_service; 249 struct NaClKernService *kern_service;
248 250
249 struct NaClResourceNaClApp resources; 251 struct NaClResourceNaClApp resources;
250 enum NaClResourcePhase resource_phase; 252 enum NaClResourcePhase resource_phase;
251 253
252 struct NaClSecureReverseClient *reverse_client; 254 struct NaClSecureReverseClient *reverse_client;
253 enum NaClReverseChannelInitializationState { 255 enum NaClReverseChannelInitializationState {
254 NACL_REVERSE_CHANNEL_UNINITIALIZED, 256 NACL_REVERSE_CHANNEL_UNINITIALIZED,
255 NACL_REVERSE_CHANNEL_INITIALIZATION_STARTED, 257 NACL_REVERSE_CHANNEL_INITIALIZATION_STARTED,
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 596
595 void NaClAppDescriptorHookupCheck(struct NaClApp *nap); 597 void NaClAppDescriptorHookupCheck(struct NaClApp *nap);
596 598
597 void NaClCreateServiceSocket(struct NaClApp *nap); 599 void NaClCreateServiceSocket(struct NaClApp *nap);
598 600
599 void NaClSetUpBootstrapChannel(struct NaClApp *nap, 601 void NaClSetUpBootstrapChannel(struct NaClApp *nap,
600 NaClHandle inherited_desc); 602 NaClHandle inherited_desc);
601 603
602 void NaClSecureCommandChannel(struct NaClApp *nap); 604 void NaClSecureCommandChannel(struct NaClApp *nap);
603 605
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; 606 NaClErrorCode NaClWaitForLoadModuleStatus(struct NaClApp *nap) NACL_WUR;
613 607
614 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR; 608 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR;
615 609
616 /* 610 /*
617 * NaClBlockIfCommandChannelExists is used during error exit. If 611 * NaClBlockIfCommandChannelExists is used during error exit. If
618 * there is a secure command channel, we sent an RPC reply with the 612 * 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 613 * reason that the nexe was rejected. If we exit immediately, that
620 * reply may still be in-flight and the various channel closure (esp 614 * 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 615 * reverse channels, if those were set up) may be detected first by
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 #else 774 #else
781 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) { 775 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) {
782 UNREFERENCED_PARAMETER(argc_p); 776 UNREFERENCED_PARAMETER(argc_p);
783 UNREFERENCED_PARAMETER(argv_p); 777 UNREFERENCED_PARAMETER(argv_p);
784 } 778 }
785 #endif 779 #endif
786 780
787 EXTERN_C_END 781 EXTERN_C_END
788 782
789 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ 783 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698