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

Unified Diff: src/untrusted/irt/irt_dev_mprotect.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: Removed leftover code. 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
« no previous file with comments | « src/untrusted/irt/irt.gyp ('k') | src/untrusted/irt/irt_interfaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/irt_dev_mprotect.c
diff --git a/src/untrusted/irt/irt_dev_getpid.c b/src/untrusted/irt/irt_dev_mprotect.c
similarity index 62%
copy from src/untrusted/irt/irt_dev_getpid.c
copy to src/untrusted/irt/irt_dev_mprotect.c
index 8360fc8eecbf6015a38f4b39c545fa1028851e31..486667f86a35a2822685c43f202ae92fcb5d04bc 100644
--- a/src/untrusted/irt/irt_dev_getpid.c
+++ b/src/untrusted/irt/irt_dev_mprotect.c
@@ -8,14 +8,10 @@
#include "native_client/src/untrusted/irt/irt_interfaces.h"
#include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
-static int nacl_irt_dev_getpid_func(int *pid) {
- int rv = NACL_SYSCALL(getpid)();
- if (rv < 0)
- return -rv;
- *pid = rv;
- return 0;
+static int nacl_irt_mprotect(void *addr, size_t len, int prot) {
+ return -NACL_SYSCALL(mprotect)(addr, len, prot);
}
-const struct nacl_irt_dev_getpid nacl_irt_dev_getpid = {
- nacl_irt_dev_getpid_func,
+const struct nacl_irt_dev_mprotect nacl_irt_dev_mprotect = {
+ nacl_irt_mprotect,
};
« no previous file with comments | « src/untrusted/irt/irt.gyp ('k') | src/untrusted/irt/irt_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698