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

Side by Side Diff: src/trusted/validator_x86/ncenuminsts_x86_64.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, 8 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 NaClValidationStatus status; 114 NaClValidationStatus status;
115 /* TODO(pasko): Validator initialization can be slow, make it run only once. 115 /* TODO(pasko): Validator initialization can be slow, make it run only once.
116 */ 116 */
117 const struct NaClValidatorInterface *validator = NaClCreateValidator(); 117 const struct NaClValidatorInterface *validator = NaClCreateValidator();
118 118
119 /* check if NaCl thinks the given code segment is valid. */ 119 /* check if NaCl thinks the given code segment is valid. */
120 validator->SetAllCPUFeatures((NaClCPUFeatures *) &cpu_features); 120 validator->SetAllCPUFeatures((NaClCPUFeatures *) &cpu_features);
121 status = validator->Validate( 121 status = validator->Validate(
122 vbase, mbase, size, 122 vbase, mbase, size,
123 /* stubout_mode= */ FALSE, /* readonly_text= */ FALSE, 123 /* stubout_mode= */ FALSE, /* readonly_text= */ FALSE,
124 (NaClCPUFeatures *) &cpu_features, NULL); 124 (NaClCPUFeatures *) &cpu_features, 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
« src/trusted/validator/validator.gyp ('K') | « 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