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

Unified Diff: src/untrusted/irt/irt_memory.c

Issue 11141016: mprotect system call exposed to the untrusted code. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Split mprotect into separate dev interface. Created 8 years, 2 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/untrusted/irt/irt_memory.c
diff --git a/src/untrusted/irt/irt_memory.c b/src/untrusted/irt/irt_memory.c
index dbd8e738b5934809630fcbcc30228b928f52ea05..2eb0583ddf6b25ac5f12b37716c8f846dba8360a 100644
--- a/src/untrusted/irt/irt_memory.c
+++ b/src/untrusted/irt/irt_memory.c
@@ -45,8 +45,13 @@ static int nacl_irt_munmap(void *addr, size_t len) {
return -NACL_SYSCALL(munmap)(addr, len);
}
+static int nacl_irt_mprotect(void *addr, size_t len, int prot) {
Petr Hosek 2012/10/25 18:46:57 Removed as well.
+ return -NACL_SYSCALL(mprotect)(addr, len, prot);
+}
+
const struct nacl_irt_memory nacl_irt_memory = {
nacl_irt_sysbrk,
nacl_irt_mmap,
nacl_irt_munmap,
+ nacl_irt_mprotect,
Mark Seaborn 2012/10/25 17:05:36 You shouldn't be adding mprotect here.
Petr Hosek 2012/10/25 18:46:57 Removed.
};

Powered by Google App Engine
This is Rietveld 408576698