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

Side by Side Diff: src/trusted/validator_x86/ncenuminsts_x86_64.c

Issue 9535001: Add validation caching interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: More edits Created 8 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
« no previous file with comments | « src/trusted/validator_x86/ncenuminsts_x86_32.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NACL_TRUSTED_BUT_NOT_TCB 7 #ifndef NACL_TRUSTED_BUT_NOT_TCB
8 #error("This file is not meant for use in the TCB") 8 #error("This file is not meant for use in the TCB")
9 #endif 9 #endif
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Bool NaClSegmentValidates(uint8_t* mbase, 159 Bool NaClSegmentValidates(uint8_t* mbase,
160 uint8_t size, 160 uint8_t size,
161 NaClPcAddress vbase) { 161 NaClPcAddress vbase) {
162 NaClCPUFeaturesX86 cpu_features; 162 NaClCPUFeaturesX86 cpu_features;
163 NaClValidationStatus status; 163 NaClValidationStatus status;
164 164
165 /* check if NaCl thinks the given code segment is valid. */ 165 /* check if NaCl thinks the given code segment is valid. */
166 NaClSetAllCPUFeatures(&cpu_features); 166 NaClSetAllCPUFeatures(&cpu_features);
167 status = NaCl_ApplyValidator_x86_64( 167 status = NaCl_ApplyValidator_x86_64(
168 NACL_SB_DEFAULT, NaClApplyCodeValidation, vbase, mbase, size, 32, 168 NACL_SB_DEFAULT, NaClApplyCodeValidation, vbase, mbase, size, 32,
169 &cpu_features); 169 &cpu_features, NULL);
170 switch (status) { 170 switch (status) {
171 case NaClValidationSucceeded: 171 case NaClValidationSucceeded:
172 return TRUE; 172 return TRUE;
173 default: 173 default:
174 return FALSE; 174 return FALSE;
175 } 175 }
176 } 176 }
OLDNEW
« no previous file with comments | « src/trusted/validator_x86/ncenuminsts_x86_32.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698