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/sys_memory.c

Issue 1234393005: A mechanism to identify/forbid/"rewrite" non-temporal instructions (and other) (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Fixing nits Created 5 years, 5 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/sys_memory.c
diff --git a/src/trusted/service_runtime/sys_memory.c b/src/trusted/service_runtime/sys_memory.c
index 46767b9a89120d37510728da3092e1108ac730ea..7b0d7033d81a0b7192236b7dc312bb997d656b7a 100644
--- a/src/trusted/service_runtime/sys_memory.c
+++ b/src/trusted/service_runtime/sys_memory.c
@@ -267,6 +267,7 @@ int32_t NaClSysMmapIntern(struct NaClApp *nap,
nacl_off64_t file_bytes;
nacl_off64_t host_rounded_file_bytes;
size_t alloc_rounded_file_bytes;
+ uint32_t val_flags;
holding_app_lock = 0;
ndp = NULL;
@@ -721,6 +722,7 @@ int32_t NaClSysMmapIntern(struct NaClApp *nap,
goto cleanup;
}
+ val_flags = nap->pnacl_mode ? DISABLE_NONTEMPORALS : 0;
/* Ask validator / validation cache */
NaClMetadataFromNaClDescCtor(&metadata, ndp);
validator_status = NACL_FI("MMAP_FORCE_MMAP_VALIDATION_FAIL",
@@ -729,6 +731,7 @@ int32_t NaClSysMmapIntern(struct NaClApp *nap,
(uint8_t *) image_sys_addr,
length,
0, /* stubout_mode: no */
+ val_flags,
1, /* readonly_text: yes */
nap->cpu_features,
&metadata,

Powered by Google App Engine
This is Rietveld 408576698