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

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: 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/tools/validator_tools/ncstubout.c ('k') | src/trusted/validator/ncvalidate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b9be9d4f7407555ed823bde8e8eb6eb0648b974b 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 */
+ 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);
}
« no previous file with comments | « src/tools/validator_tools/ncstubout.c ('k') | src/trusted/validator/ncvalidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698