Chromium Code Reviews| 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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ |
| 9 | 9 |
| 10 /* Defines the API to the native client validation code. | 10 /* Defines the API to the native client validation code. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 NACL_TARGET_SUBARCH)( | 91 NACL_TARGET_SUBARCH)( |
| 92 enum NaClSBKind sb_kind, | 92 enum NaClSBKind sb_kind, |
| 93 uintptr_t guest_addr, | 93 uintptr_t guest_addr, |
| 94 uint8_t *data, | 94 uint8_t *data, |
| 95 size_t size, | 95 size_t size, |
| 96 int stubout_mode, | 96 int stubout_mode, |
| 97 int readonly_text, | 97 int readonly_text, |
| 98 const NaClCPUFeatures *cpu_features, | 98 const NaClCPUFeatures *cpu_features, |
| 99 struct NaClValidationCache *cache); | 99 struct NaClValidationCache *cache); |
| 100 | 100 |
| 101 /* Applies the DFA-based validator as in the ApplyValidator case described | |
| 102 * above. The interface of this new validator must remain the same as of the | |
| 103 * ApplyValidator. Less arguments will be ignored as the new validator | |
| 104 * implements features, such as stubout mode. | |
| 105 */ | |
| 106 extern NaClValidationStatus NACL_SUBARCH_NAME(ApplyDfaValidator, | |
|
Nick Bray
2012/04/19 23:11:08
Don't specify this interface into ncvalidate, just
pasko-google - do not use
2012/04/20 14:30:38
I did not want to include directly anything from u
| |
| 107 NACL_TARGET_ARCH, | |
| 108 NACL_TARGET_SUBARCH)( | |
| 109 enum NaClSBKind sb_kind, | |
| 110 uintptr_t guest_addr, | |
| 111 uint8_t *data, | |
| 112 size_t size, | |
| 113 int stubout_mode, | |
| 114 int readonly_text, | |
| 115 const NaClCPUFeatures *cpu_features, | |
| 116 struct NaClValidationCache *cache); | |
| 117 | |
| 101 /* Applies the validator, as used in a command-line tool to report issues. | 118 /* Applies the validator, as used in a command-line tool to report issues. |
| 102 * Note: This is intentionally separated from ApplyValidator, since it need | 119 * Note: This is intentionally separated from ApplyValidator, since it need |
| 103 * not be performance critical. | 120 * not be performance critical. |
| 104 * Parameters are: | 121 * Parameters are: |
| 105 * local_cpu: True if local cpu rules should be applied. | 122 * local_cpu: True if local cpu rules should be applied. |
| 106 * Otherwise, assume no cpu specific rules. | 123 * Otherwise, assume no cpu specific rules. |
| 107 * guest_addr - The virtual pc to assume with the beginning address of the | 124 * guest_addr - The virtual pc to assume with the beginning address of the |
| 108 * code segment. Typically, this is the corresponding addresss that | 125 * code segment. Typically, this is the corresponding addresss that |
| 109 * will be used by objdump. | 126 * will be used by objdump. |
| 110 * data - The contents of the code segment to be validated. | 127 * data - The contents of the code segment to be validated. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 enum NaClSBKind sb_kind, | 182 enum NaClSBKind sb_kind, |
| 166 uintptr_t guest_addr, | 183 uintptr_t guest_addr, |
| 167 uint8_t *data_old, | 184 uint8_t *data_old, |
| 168 uint8_t *data_new, | 185 uint8_t *data_new, |
| 169 size_t size, | 186 size_t size, |
| 170 const NaClCPUFeatures *cpu_features); | 187 const NaClCPUFeatures *cpu_features); |
| 171 | 188 |
| 172 EXTERN_C_END | 189 EXTERN_C_END |
| 173 | 190 |
| 174 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ */ | 191 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVALIDATE_H__ */ |
| OLD | NEW |