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

Side by Side Diff: src/trusted/validator/x86/64/ncvalidate_verbose.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/64/ncvalidate.c ('k') | src/trusted/validator/x86/nacl_cpuid.h » ('j') | 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 /* Implement the ApplyValidatorVerbosely API for the x86-64 architecture. */ 7 /* Implement the ApplyValidatorVerbosely API for the x86-64 architecture. */
8 8
9 #include "native_client/src/trusted/validator/ncvalidate.h" 9 #include "native_client/src/trusted/validator/ncvalidate.h"
10 10
(...skipping 19 matching lines...) Expand all
30 int bundle_size, 30 int bundle_size,
31 NaClCPUFeaturesX86 *cpu_features) { 31 NaClCPUFeaturesX86 *cpu_features) {
32 struct NaClValidatorState *vstate; 32 struct NaClValidatorState *vstate;
33 NaClValidationStatus status = 33 NaClValidationStatus status =
34 NaClValidatorSetup_x86_64(guest_addr, size, bundle_size, cpu_features, 34 NaClValidatorSetup_x86_64(guest_addr, size, bundle_size, cpu_features,
35 &vstate); 35 &vstate);
36 if (status != NaClValidationSucceeded) return status; 36 if (status != NaClValidationSucceeded) return status;
37 NaClValidatorStateSetLogVerbosity(vstate, LOG_ERROR); 37 NaClValidatorStateSetLogVerbosity(vstate, LOG_ERROR);
38 NaClValidatorStateSetMaxReportedErrors(vstate, -1); /* Report all errors. */ 38 NaClValidatorStateSetMaxReportedErrors(vstate, -1); /* Report all errors. */
39 NaClValidatorStateSetErrorReporter(vstate, &kNaClVerboseErrorReporter); 39 NaClValidatorStateSetErrorReporter(vstate, &kNaClVerboseErrorReporter);
40 return NaClSegmentValidate_x86_64(guest_addr, data, size, vstate) 40 NaClValidateSegment(data, guest_addr, size, vstate);
41 ? NaClValidationSucceeded : NaClValidationFailed; 41 status =
42 NaClValidatesOk(vstate) ? NaClValidationSucceeded : NaClValidationFailed;
43 NaClValidatorStateDestroy(vstate);
44 return status;
42 } 45 }
43 46
44 NaClValidationStatus NACL_SUBARCH_NAME(ApplyValidatorVerbosely, x86, 64) 47 NaClValidationStatus NACL_SUBARCH_NAME(ApplyValidatorVerbosely, x86, 64)
45 (enum NaClSBKind sb_kind, 48 (enum NaClSBKind sb_kind,
46 NaClApplyValidationKind kind, 49 NaClApplyValidationKind kind,
47 uintptr_t guest_addr, 50 uintptr_t guest_addr,
48 uint8_t *data, 51 uint8_t *data,
49 size_t size, 52 size_t size,
50 int bundle_size, 53 int bundle_size,
51 NaClCPUFeaturesX86 *cpu_features) { 54 NaClCPUFeaturesX86 *cpu_features) {
(...skipping 11 matching lines...) Expand all
63 status = NaClApplyValidatorStubout_x86_64( 66 status = NaClApplyValidatorStubout_x86_64(
64 guest_addr, data, size, bundle_size, cpu_features); 67 guest_addr, data, size, bundle_size, cpu_features);
65 break; 68 break;
66 default: 69 default:
67 /* If reached, it isn't implemented (yet). */ 70 /* If reached, it isn't implemented (yet). */
68 break; 71 break;
69 } 72 }
70 } 73 }
71 return status; 74 return status;
72 } 75 }
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate.c ('k') | src/trusted/validator/x86/nacl_cpuid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698