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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/untrusted/irt/irt.gyp ('k') | src/untrusted/irt/irt_interfaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/untrusted/irt/irt.h" 7 #include "native_client/src/untrusted/irt/irt.h"
8 #include "native_client/src/untrusted/irt/irt_interfaces.h" 8 #include "native_client/src/untrusted/irt/irt_interfaces.h"
9 #include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h" 9 #include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
10 10
11 static int nacl_irt_dev_getpid_func(int *pid) { 11 static int nacl_irt_mprotect(void *addr, size_t len, int prot) {
12 int rv = NACL_SYSCALL(getpid)(); 12 return -NACL_SYSCALL(mprotect)(addr, len, prot);
13 if (rv < 0)
14 return -rv;
15 *pid = rv;
16 return 0;
17 } 13 }
18 14
19 const struct nacl_irt_dev_getpid nacl_irt_dev_getpid = { 15 const struct nacl_irt_dev_mprotect nacl_irt_dev_mprotect = {
20 nacl_irt_dev_getpid_func, 16 nacl_irt_mprotect,
21 }; 17 };
OLDNEW
« 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