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

Side by Side Diff: src/trusted/validator_ragel/unreviewed/dfa_validate_64.c

Issue 10070010: validator_ragel: Link into TCB, use under env var (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: revert introducing extra empty line Created 8 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
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/dfa_validate_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
(Empty)
1 /*
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
4 * found in the LICENSE file.
5 */
6
7 /* Implement the ApplyDfaValidator API for the x86-64 architecture. */
8 #include <assert.h>
9 #include "native_client/src/shared/platform/nacl_log.h"
10 #include "native_client/src/trusted/validator/ncvalidate.h"
11 #include "native_client/src/trusted/validator/validation_cache.h"
12 #include "native_client/src/trusted/validator_ragel/unreviewed/validator.h"
13
14 /* Be sure the correct compile flags are defined for this. */
15 #if NACL_ARCH(NACL_TARGET_ARCH) != NACL_x86
16 # error("Can't compile, target is for x86-64")
17 #else
18 # if NACL_TARGET_SUBARCH != 64
19 # error("Can't compile, target is for x86-64")
20 # endif
21 #endif
22
23 static void ProcessError(const uint8_t *ptr, void *userdata) {
24 UNREFERENCED_PARAMETER(ptr);
25 UNREFERENCED_PARAMETER(userdata);
26 }
27
28 NaClValidationStatus NACL_SUBARCH_NAME(ApplyDfaValidator, x86, 64) (
29 uintptr_t guest_addr,
30 uint8_t *data,
31 size_t size,
32 int stubout_mode,
33 int readonly_text,
34 const NaClCPUFeaturesX86 *cpu_features,
35 struct NaClValidationCache *cache) {
36 UNREFERENCED_PARAMETER(guest_addr);
37 UNREFERENCED_PARAMETER(cache);
38
39 if (stubout_mode || readonly_text) {
40 return NaClValidationFailedNotImplemented;
41 }
42 if (!NaClArchSupported(cpu_features)) {
43 return NaClValidationFailedCpuNotSupported;
44 }
45 if (ValidateChunkAMD64(data, size, ProcessError, 0) == 0) {
46 return NaClValidationSucceeded;
47 }
48 return NaClValidationFailed;
49 }
OLDNEW
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/dfa_validate_32.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698