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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */ | 66 #define NACL_DEFAULT_STACK_MAX (16 << 20) /* main thread stack */ |
67 | 67 |
68 struct NaClAppThread; | 68 struct NaClAppThread; |
69 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */ | 69 struct NaClDesc; /* see native_client/src/trusted/desc/nacl_desc_base.h */ |
70 struct NaClDynamicRegion; | 70 struct NaClDynamicRegion; |
71 struct NaClManifestProxy; | 71 struct NaClManifestProxy; |
72 struct NaClReverseQuotaInterface; | 72 struct NaClReverseQuotaInterface; |
73 struct NaClSignalContext; | 73 struct NaClSignalContext; |
74 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ | 74 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ |
75 struct NaClValidationCache; | 75 struct NaClValidationCache; |
| 76 struct NaClValidationMetadata; |
76 | 77 |
77 struct NaClDebugCallbacks { | 78 struct NaClDebugCallbacks { |
78 void (*thread_create_hook)(struct NaClAppThread *natp); | 79 void (*thread_create_hook)(struct NaClAppThread *natp); |
79 void (*thread_exit_hook)(struct NaClAppThread *natp); | 80 void (*thread_exit_hook)(struct NaClAppThread *natp); |
80 void (*process_exit_hook)(void); | 81 void (*process_exit_hook)(void); |
81 }; | 82 }; |
82 | 83 |
83 enum NaClResourcePhase { | 84 enum NaClResourcePhase { |
84 NACL_RESOURCE_PHASE_START, | 85 NACL_RESOURCE_PHASE_START, |
85 NACL_RESOURCE_PHASE_REV_CHAN | 86 NACL_RESOURCE_PHASE_REV_CHAN |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 struct NaClApp *nap) NACL_WUR; | 455 struct NaClApp *nap) NACL_WUR; |
455 | 456 |
456 /* | 457 /* |
457 * Just like NaClAppLoadFile, but allow control over ASLR. | 458 * Just like NaClAppLoadFile, but allow control over ASLR. |
458 */ | 459 */ |
459 NaClErrorCode NaClAppLoadFileAslr(struct Gio *gp, | 460 NaClErrorCode NaClAppLoadFileAslr(struct Gio *gp, |
460 struct NaClApp *nap, | 461 struct NaClApp *nap, |
461 enum NaClAslrMode aslr_mode) NACL_WUR; | 462 enum NaClAslrMode aslr_mode) NACL_WUR; |
462 | 463 |
463 | 464 |
464 NaClErrorCode NaClAppLoadFileDynamically(struct NaClApp *nap, | 465 NaClErrorCode NaClAppLoadFileDynamically( |
465 struct Gio *gio_file) NACL_WUR; | 466 struct NaClApp *nap, |
| 467 struct Gio *gio_file, |
| 468 struct NaClValidationMetadata *metadata) NACL_WUR; |
466 | 469 |
467 void NaClAppPrintDetails(struct NaClApp *nap, | 470 void NaClAppPrintDetails(struct NaClApp *nap, |
468 struct Gio *gp); | 471 struct Gio *gp); |
469 | 472 |
470 NaClErrorCode NaClLoadImage(struct Gio *gp, | 473 NaClErrorCode NaClLoadImage(struct Gio *gp, |
471 struct NaClApp *nap) NACL_WUR; | 474 struct NaClApp *nap) NACL_WUR; |
472 | 475 |
473 int NaClValidateCode(struct NaClApp *nap, | 476 int NaClValidateCode(struct NaClApp *nap, |
474 uintptr_t guest_addr, | 477 uintptr_t guest_addr, |
475 uint8_t *data, | 478 uint8_t *data, |
476 size_t size) NACL_WUR; | 479 size_t size, |
| 480 const struct NaClValidationMetadata *metadata) NACL_WUR; |
477 | 481 |
478 /* | 482 /* |
479 * Validates that the code found at data_old can safely be replaced with | 483 * Validates that the code found at data_old can safely be replaced with |
480 * the code found at data_new. | 484 * the code found at data_new. |
481 */ | 485 */ |
482 int NaClValidateCodeReplacement(struct NaClApp *nap, | 486 int NaClValidateCodeReplacement(struct NaClApp *nap, |
483 uintptr_t guest_addr, | 487 uintptr_t guest_addr, |
484 uint8_t *data_old, | 488 uint8_t *data_old, |
485 uint8_t *data_new, | 489 uint8_t *data_new, |
486 size_t size); | 490 size_t size); |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 #else | 815 #else |
812 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) { | 816 static INLINE void NaClHandleBootstrapArgs(int *argc_p, char ***argv_p) { |
813 UNREFERENCED_PARAMETER(argc_p); | 817 UNREFERENCED_PARAMETER(argc_p); |
814 UNREFERENCED_PARAMETER(argv_p); | 818 UNREFERENCED_PARAMETER(argv_p); |
815 } | 819 } |
816 #endif | 820 #endif |
817 | 821 |
818 EXTERN_C_END | 822 EXTERN_C_END |
819 | 823 |
820 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ | 824 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ |
OLD | NEW |