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

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: Fixed a few nits. Created 8 years, 2 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_kernel_service.h" 47 #include "native_client/src/trusted/service_runtime/nacl_kernel_service.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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 #endif 200 #endif
201 201
202 /* 202 /*
203 * The socket at which the app should be accepting connections. The 203 * The socket at which the app should be accepting connections. The
204 * corresponding socket address are made available by the JavaScript 204 * corresponding socket address are made available by the JavaScript
205 * bridge to other NaCl modules. 205 * bridge to other NaCl modules.
206 */ 206 */
207 struct NaClDesc *service_port; 207 struct NaClDesc *service_port;
208 struct NaClDesc *service_address; 208 struct NaClDesc *service_address;
209 209
210 struct NaClDesc *secure_service_port;
211 struct NaClDesc *secure_service_address;
212
210 struct NaClDesc *bootstrap_channel; 213 struct NaClDesc *bootstrap_channel;
211 214
212 struct NaClMutex mu; 215 struct NaClMutex mu;
213 struct NaClCondVar cv; 216 struct NaClCondVar cv;
214 217
215 #if NACL_WINDOWS 218 #if NACL_WINDOWS
216 /* 219 /*
217 * invariant: !(vm_hole_may_exist && threads_launching != 0). 220 * invariant: !(vm_hole_may_exist && threads_launching != 0).
218 * vm_hole_may_exist is set while mmap/munmap manipulates the memory 221 * vm_hole_may_exist is set while mmap/munmap manipulates the memory
219 * map, and threads_launching is set while a thread is launching 222 * map, and threads_launching is set while a thread is launching
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 597
595 void NaClAppDescriptorHookupCheck(struct NaClApp *nap); 598 void NaClAppDescriptorHookupCheck(struct NaClApp *nap);
596 599
597 void NaClCreateServiceSocket(struct NaClApp *nap); 600 void NaClCreateServiceSocket(struct NaClApp *nap);
598 601
599 void NaClSetUpBootstrapChannel(struct NaClApp *nap, 602 void NaClSetUpBootstrapChannel(struct NaClApp *nap,
600 NaClHandle inherited_desc); 603 NaClHandle inherited_desc);
601 604
602 void NaClSecureCommandChannel(struct NaClApp *nap); 605 void NaClSecureCommandChannel(struct NaClApp *nap);
603 606
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; 607 NaClErrorCode NaClWaitForLoadModuleStatus(struct NaClApp *nap) NACL_WUR;
613 608
614 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR; 609 NaClErrorCode NaClWaitForStartModuleCommand(struct NaClApp *nap) NACL_WUR;
615 610
616 /* 611 /*
617 * NaClBlockIfCommandChannelExists is used during error exit. If 612 * NaClBlockIfCommandChannelExists is used during error exit. If
618 * there is a secure command channel, we sent an RPC reply with the 613 * 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 614 * reason that the nexe was rejected. If we exit immediately, that
620 * reply may still be in-flight and the various channel closure (esp 615 * 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 616 * reverse channels, if those were set up) may be detected first by
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 UNREFERENCED_PARAMETER(argc_p); 782 UNREFERENCED_PARAMETER(argc_p);
788 UNREFERENCED_PARAMETER(argv_p); 783 UNREFERENCED_PARAMETER(argv_p);
789 } 784 }
790 #endif 785 #endif
791 786
792 int NaClPostTestInjectionMain(int argc, char **argv); 787 int NaClPostTestInjectionMain(int argc, char **argv);
793 788
794 EXTERN_C_END 789 EXTERN_C_END
795 790
796 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ 791 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl_secure_service.c ('k') | src/trusted/service_runtime/sel_ldr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698