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

Side by Side Diff: src/trusted/validator_arm/ncvalidate.cc

Issue 12600034: Provide metadata to validator to allow faster caching. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First fixes Created 7 years, 9 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 #include <climits> 7 #include <climits>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return 0; 137 return 0;
138 } 138 }
139 139
140 static NaClValidationStatus ApplyValidatorArm( 140 static NaClValidationStatus ApplyValidatorArm(
141 uintptr_t guest_addr, 141 uintptr_t guest_addr,
142 uint8_t *data, 142 uint8_t *data,
143 size_t size, 143 size_t size,
144 int stubout_mode, 144 int stubout_mode,
145 int readonly_text, 145 int readonly_text,
146 const NaClCPUFeatures *cpu_features, 146 const NaClCPUFeatures *cpu_features,
147 const struct NaClValidationMetadata *metadata,
147 struct NaClValidationCache *cache) { 148 struct NaClValidationCache *cache) {
148 /* The ARM validator is currently unsafe w.r.t. caching. */ 149 /* The ARM validator is currently unsafe w.r.t. caching. */
150 UNREFERENCED_PARAMETER(metadata);
149 UNREFERENCED_PARAMETER(cache); 151 UNREFERENCED_PARAMETER(cache);
150 CheckAddressAlignAndOverflow((uint8_t *) guest_addr, size); 152 CheckAddressAlignAndOverflow((uint8_t *) guest_addr, size);
151 CheckAddressOverflow(data, size); 153 CheckAddressOverflow(data, size);
152 CheckAddressOverflow(data, size); 154 CheckAddressOverflow(data, size);
153 155
154 if (stubout_mode) 156 if (stubout_mode)
155 return NaClValidationFailedNotImplemented; 157 return NaClValidationFailedNotImplemented;
156 if (readonly_text) 158 if (readonly_text)
157 return NaClValidationFailedNotImplemented; 159 return NaClValidationFailedNotImplemented;
158 160
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // so is their mix (single instruction update is atomic). 193 // so is their mix (single instruction update is atomic).
192 // We just have to make sure that unintended fallthrough doesn't 194 // We just have to make sure that unintended fallthrough doesn't
193 // happen, and we don't change position of guard instructions. 195 // happen, and we don't change position of guard instructions.
194 // Problem is that code is mapped for execution at different address 196 // Problem is that code is mapped for execution at different address
195 // that one we use here, and ARM usually use virtually indexed caches, 197 // that one we use here, and ARM usually use virtually indexed caches,
196 // so we couldn't invalidate correctly anyway. 198 // so we couldn't invalidate correctly anyway.
197 return 0; 199 return 0;
198 } 200 }
199 201
200 EXTERN_C_END 202 EXTERN_C_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698