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

Unified Diff: src/trusted/validator_arm/ncvalidate.cc

Issue 10024039: Replace kind variable from validator API with Boolean stubout parameter. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Final edits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate_verbose.c ('k') | src/trusted/validator_x86/ncenuminsts_x86_32.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_arm/ncvalidate.cc
diff --git a/src/trusted/validator_arm/ncvalidate.cc b/src/trusted/validator_arm/ncvalidate.cc
index b4ab0bf241465435dd34f7c3128784f944bc42b0..6871b3f60b583c532eefdf86481cab57bf472dd3 100644
--- a/src/trusted/validator_arm/ncvalidate.cc
+++ b/src/trusted/validator_arm/ncvalidate.cc
@@ -67,11 +67,11 @@ int NCValidateSegment(uint8_t *mbase, uint32_t vbase, size_t size) {
NaClValidationStatus NACL_SUBARCH_NAME(ApplyValidator, arm, 32) (
enum NaClSBKind sb_kind,
- NaClApplyValidationKind kind,
uintptr_t guest_addr,
uint8_t *data,
size_t size,
int bundle_size,
+ int stubout_mode,
int readonly_text,
const NaClCPUFeaturesArm *cpu_features,
struct NaClValidationCache *cache) {
@@ -80,12 +80,11 @@ NaClValidationStatus NACL_SUBARCH_NAME(ApplyValidator, arm, 32) (
UNREFERENCED_PARAMETER(sb_kind);
/* The ARM validator is currently unsafe w.r.t. caching. */
UNREFERENCED_PARAMETER(cache);
+ if (stubout_mode) return NaClValidationFailedNotImplemented;
if (readonly_text) return NaClValidationFailedNotImplemented;
if (bundle_size == 16) {
- if (kind == NaClApplyCodeValidation) {
- status = ((0 == NCValidateSegment(data, guest_addr, size))
- ? NaClValidationSucceeded : NaClValidationFailed);
- }
+ status = ((0 == NCValidateSegment(data, guest_addr, size))
+ ? NaClValidationSucceeded : NaClValidationFailed);
}
return status;
}
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate_verbose.c ('k') | src/trusted/validator_x86/ncenuminsts_x86_32.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698