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

Unified Diff: src/trusted/service_runtime/sel_validate_image.c

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: 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
Index: src/trusted/service_runtime/sel_validate_image.c
diff --git a/src/trusted/service_runtime/sel_validate_image.c b/src/trusted/service_runtime/sel_validate_image.c
index 02072b20d5965b127c859746ccbf372c473fdb08..a2af8cb79bd87f3f9429b3b587c293f1086f8834 100644
--- a/src/trusted/service_runtime/sel_validate_image.c
+++ b/src/trusted/service_runtime/sel_validate_image.c
@@ -71,22 +71,24 @@ int NaClValidateCode(struct NaClApp *nap, uintptr_t guest_addr,
NACL_TARGET_ARCH,
NACL_TARGET_SUBARCH)(
sb_kind,
- NaClApplyValidationDoStubout,
guest_addr, data, size,
nap->bundle_size,
+ TRUE, /* stub out */
FALSE, /* text is not read-only */
&nap->cpu_features,
cache);
}
if (status == NaClValidationSucceeded) {
+ /* fixed feature cpu mode implies read-only */
Mark Seaborn 2012/04/10 19:04:09 Capitalise 'Fixed' and 'CPU'
Nick Bray (chromium) 2012/04/10 19:12:40 Done.
+ int readonly_text = nap->fixed_feature_cpu_mode;
status = NACL_SUBARCH_NAME(ApplyValidator,
NACL_TARGET_ARCH,
NACL_TARGET_SUBARCH)(
sb_kind,
- NaClApplyCodeValidation,
guest_addr, data, size,
nap->bundle_size,
- nap->fixed_feature_cpu_mode,
+ FALSE, /* do not stub out */
+ readonly_text,
&nap->cpu_features,
cache);
}

Powered by Google App Engine
This is Rietveld 408576698