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

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

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 #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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 /* TODO(pasko): Validator initialization can be slow, make it run only once. 114 /* TODO(pasko): Validator initialization can be slow, make it run only once.
115 */ 115 */
116 const struct NaClValidatorInterface *validator = NaClCreateValidator(); 116 const struct NaClValidatorInterface *validator = NaClCreateValidator();
117 117
118 /* check if NaCl thinks the given code segment is valid. */ 118 /* check if NaCl thinks the given code segment is valid. */
119 NaClSetAllCPUFeaturesX86((NaClCPUFeatures *) &cpu_features); 119 NaClSetAllCPUFeaturesX86((NaClCPUFeatures *) &cpu_features);
120 status = validator->Validate( 120 status = validator->Validate(
121 vbase, mbase, size, 121 vbase, mbase, size,
122 /* stubout_mode= */ FALSE, /* readonly_text= */ FALSE, 122 /* stubout_mode= */ FALSE, /* readonly_text= */ FALSE,
123 (NaClCPUFeatures *) &cpu_features, 123 (NaClCPUFeatures *) &cpu_features,
124 NULL); 124 NULL, NULL);
125 switch (status) { 125 switch (status) {
126 case NaClValidationSucceeded: 126 case NaClValidationSucceeded:
127 return TRUE; 127 return TRUE;
128 default: 128 default:
129 return FALSE; 129 return FALSE;
130 } 130 }
131 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698