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

Side by Side Diff: src/trusted/validator/x86/ncval_seg_sfi/ncvalidate_detailed.h

Issue 10116004: Eliminate bundle_size parameter from validator interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Merge 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
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 NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETAILE D_H__ 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETAILE D_H__
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETAILE D_H__ 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETAILE D_H__
9 9
10 /* 10 /*
(...skipping 15 matching lines...) Expand all
26 * 26 *
27 * This secondary interface is considerbly slower than the primary interface 27 * This secondary interface is considerbly slower than the primary interface
28 * in that it does 2 walks over the code segment instead of one. However, by 28 * in that it does 2 walks over the code segment instead of one. However, by
29 * doing this second walk, it can generate more detailed error reports. 29 * doing this second walk, it can generate more detailed error reports.
30 * The secondary interface is engaged if one calls NCValidateInitDetailed 30 * The secondary interface is engaged if one calls NCValidateInitDetailed
31 * in place of NCValidateInit. The rest of the interface to the 31 * in place of NCValidateInit. The rest of the interface to the
32 * NaCl validator is the same. 32 * NaCl validator is the same.
33 * 33 *
34 * Basic usage: 34 * Basic usage:
35 * if (!NaClArchSuppported()) fail 35 * if (!NaClArchSuppported()) fail
36 * vstate = NCValidateInitDetailed(base, size, 16) 36 * vstate = NCValidateInitDetailed(base, size, cpu_features)
37 * if vstate == 0 fail 37 * if vstate == 0 fail
38 * for each section: 38 * for each section:
39 * NCValidateSegment(maddr, base, size, vstate); 39 * NCValidateSegment(maddr, base, size, vstate);
40 * rc = NCValidateFinish(); 40 * rc = NCValidateFinish();
41 * if rc != 0 fail 41 * if rc != 0 fail
42 * NCValidateFreeState(&vstate); 42 * NCValidateFreeState(&vstate);
43 * 43 *
44 * See the README file in this directory for more info on the general 44 * See the README file in this directory for more info on the general
45 * structure of the validator. 45 * structure of the validator.
46 */ 46 */
47 47
48 #include "native_client/src/trusted/validator/x86/ncval_seg_sfi/ncvalidate.h" 48 #include "native_client/src/trusted/validator/x86/ncval_seg_sfi/ncvalidate.h"
49 49
50 /* 50 /*
51 * NCValidateInitDetailed: Initialize NaCl validator internal state. Focus 51 * NCValidateInitDetailed: Initialize NaCl validator internal state. Focus
52 * is on error details rather then performance. Note: The paramters and 52 * is on error details rather then performance. Note: The paramters and
53 * return values for this function is the same as NCValidateInit 53 * return values for this function is the same as NCValidateInit
54 * from the primary interface to the NaCl validator, and replaces it 54 * from the primary interface to the NaCl validator, and replaces it
55 * in the secondary interface.o 55 * in the secondary interface.o
56 * 56 *
57 * Parameters: 57 * Parameters:
58 * vbase: base virtual address for code segment 58 * vbase: base virtual address for code segment
59 * codesize: size in bytes of code segment 59 * codesize: size in bytes of code segment
60 * alignment: 16 or 32, specifying alignment
61 * features: the features supported by the CPU that will run the code 60 * features: the features supported by the CPU that will run the code
62 * Returns: 61 * Returns:
63 * an initialized struct NCValidatorState * if everything is okay, 62 * an initialized struct NCValidatorState * if everything is okay,
64 * else NULL 63 * else NULL
65 */ 64 */
66 struct NCValidatorState *NCValidateInitDetailed( 65 struct NCValidatorState *NCValidateInitDetailed(
67 const NaClPcAddress vbase, 66 const NaClPcAddress vbase,
68 const NaClMemorySize codesize, 67 const NaClMemorySize codesize,
69 const uint8_t alignment,
70 const NaClCPUFeaturesX86* features); 68 const NaClCPUFeaturesX86* features);
71 69
72 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETA ILED_H__ */ 70 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_SEG_SFI_NCVALIDATE_DETA ILED_H__ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698