| 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 #include "native_client/src/trusted/validator_mips/ncvalidate.h" | 7 #include "native_client/src/trusted/validator_mips/ncvalidate.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 return 0; | 106 return 0; |
| 107 } | 107 } |
| 108 | 108 |
| 109 static NaClValidationStatus ApplyValidatorMips( | 109 static NaClValidationStatus ApplyValidatorMips( |
| 110 uintptr_t guest_addr, | 110 uintptr_t guest_addr, |
| 111 uint8_t *data, | 111 uint8_t *data, |
| 112 size_t size, | 112 size_t size, |
| 113 int stubout_mode, | 113 int stubout_mode, |
| 114 int readonly_text, | 114 int readonly_text, |
| 115 const NaClCPUFeatures *cpu_features, | 115 const NaClCPUFeatures *cpu_features, |
| 116 const struct NaClValidationMetadata *metadata, |
| 116 struct NaClValidationCache *cache) { | 117 struct NaClValidationCache *cache) { |
| 117 NaClValidationStatus status = NaClValidationFailedNotImplemented; | 118 NaClValidationStatus status = NaClValidationFailedNotImplemented; |
| 118 UNREFERENCED_PARAMETER(cpu_features); | 119 UNREFERENCED_PARAMETER(cpu_features); |
| 120 UNREFERENCED_PARAMETER(metadata); |
| 119 UNREFERENCED_PARAMETER(cache); | 121 UNREFERENCED_PARAMETER(cache); |
| 120 if (stubout_mode) { | 122 if (stubout_mode) { |
| 121 NCValidateSegment(data, guest_addr, size, true); | 123 NCValidateSegment(data, guest_addr, size, true); |
| 122 status = NaClValidationSucceeded; | 124 status = NaClValidationSucceeded; |
| 123 } else if (readonly_text) { | 125 } else if (readonly_text) { |
| 124 status = NaClValidationFailedNotImplemented; | 126 status = NaClValidationFailedNotImplemented; |
| 125 } else { | 127 } else { |
| 126 status = ((0 == NCValidateSegment(data, guest_addr, size, false)) | 128 status = ((0 == NCValidateSegment(data, guest_addr, size, false)) |
| 127 ? NaClValidationSucceeded : NaClValidationFailed); | 129 ? NaClValidationSucceeded : NaClValidationFailed); |
| 128 } | 130 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 */ | 181 */ |
| 180 int NaClCopyInstruction(uint8_t *dst, uint8_t *src, uint8_t sz) { | 182 int NaClCopyInstruction(uint8_t *dst, uint8_t *src, uint8_t sz) { |
| 181 UNREFERENCED_PARAMETER(dst); | 183 UNREFERENCED_PARAMETER(dst); |
| 182 UNREFERENCED_PARAMETER(src); | 184 UNREFERENCED_PARAMETER(src); |
| 183 UNREFERENCED_PARAMETER(sz); | 185 UNREFERENCED_PARAMETER(sz); |
| 184 | 186 |
| 185 return 0; | 187 return 0; |
| 186 } | 188 } |
| 187 | 189 |
| 188 EXTERN_C_END | 190 EXTERN_C_END |
| OLD | NEW |