| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The Native Client Authors. All rights reserved. | 2 * Copyright 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 * Copyright 2009, Google Inc. | |
| 6 */ | 5 */ |
| 7 | 6 |
| 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_NCVALIDATE_H |
| 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_NCVALIDATE_H |
| 10 | 9 |
| 11 /* | 10 /* |
| 12 * The C interface to the validator, for use by the sel_ldr (which isn't | 11 * The C interface to the validator, for use by the sel_ldr (which isn't |
| 13 * C++). This provides a restricted version of the validation process, | 12 * C++). This provides a restricted version of the validation process, |
| 14 * without detailed user feedback, etc. | 13 * without detailed user feedback, etc. |
| 15 * | 14 * |
| 16 * This header file must be valid C and C++! | 15 * This header file must be valid C and C++! |
| 17 */ | 16 */ |
| 18 | 17 |
| 19 #include <stdint.h> | 18 #include <stdint.h> |
| 20 #include "native_client/src/include/portability.h" | 19 #include "native_client/src/include/portability.h" |
| 21 | 20 |
| 22 EXTERN_C_BEGIN | 21 EXTERN_C_BEGIN |
| 23 | 22 |
| 24 /* | 23 /* |
| 25 * Validates a complete code segment. | 24 * Validates a complete code segment. |
| 26 * Arguments: | 25 * Arguments: |
| 27 * mbase location of the code in memory right now. | 26 * mbase location of the code in memory right now. |
| 28 * vbase virtual address where the code will appear at runtime. | 27 * vbase virtual address where the code will appear at runtime. |
| 29 * size number of bytes of code provided. | 28 * size number of bytes of code provided. |
| 29 * stubout_mode info if the validator should stub-out functions. |
| 30 * Result: 0 if validation succeeded, non-zero if we found problems. | 30 * Result: 0 if validation succeeded, non-zero if we found problems. |
| 31 */ | 31 */ |
| 32 int NCValidateSegment(uint8_t *mbase, uint32_t vbase, size_t size); | 32 int NCValidateSegment(uint8_t *mbase, uint32_t vbase, size_t size, |
| 33 bool stubout_mode = false); |
| 33 | 34 |
| 34 EXTERN_C_END | 35 EXTERN_C_END |
| 35 | 36 |
| 36 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_NCVALIDATE_H | 37 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_NCVALIDATE_H |
| OLD | NEW |