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

Side by Side Diff: src/untrusted/irt/irt.h

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: Bump the IRT memory interface version. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/untrusted/irt/irt_interfaces.c » ('j') | src/untrusted/irt/irt_interfaces.c » ('J')
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 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ 6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_
7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_ 7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H_
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread); 80 int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread);
81 }; 81 };
82 82
83 #define NACL_IRT_FILENAME_v0_1 "nacl-irt-filename-0.1" 83 #define NACL_IRT_FILENAME_v0_1 "nacl-irt-filename-0.1"
84 struct nacl_irt_filename { 84 struct nacl_irt_filename {
85 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd); 85 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd);
86 int (*stat)(const char *pathname, struct stat *); 86 int (*stat)(const char *pathname, struct stat *);
87 }; 87 };
88 88
89 #define NACL_IRT_MEMORY_v0_1 "nacl-irt-memory-0.1" 89 #define NACL_IRT_MEMORY_v0_1 "nacl-irt-memory-0.1"
90 #define NACL_IRT_MEMORY_v0_2 "nacl-irt-memory-0.2"
90 struct nacl_irt_memory { 91 struct nacl_irt_memory {
91 int (*sysbrk)(void **newbrk); 92 int (*sysbrk)(void **newbrk);
92 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off); 93 int (*mmap)(void **addr, size_t len, int prot, int flags, int fd, off_t off);
93 int (*munmap)(void *addr, size_t len); 94 int (*munmap)(void *addr, size_t len);
95 int (*mprotect)(void *addr, size_t len, int prot);
Mark Seaborn 2012/10/18 00:27:23 Modifying struct nacl_irt_memory in-place means we
bsy 2012/10/18 19:46:09 the pattern should be something like: struct nacl
94 }; 96 };
95 97
96 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1" 98 #define NACL_IRT_DYNCODE_v0_1 "nacl-irt-dyncode-0.1"
97 struct nacl_irt_dyncode { 99 struct nacl_irt_dyncode {
98 int (*dyncode_create)(void *dest, const void *src, size_t size); 100 int (*dyncode_create)(void *dest, const void *src, size_t size);
99 int (*dyncode_modify)(void *dest, const void *src, size_t size); 101 int (*dyncode_modify)(void *dest, const void *src, size_t size);
100 int (*dyncode_delete)(void *dest, size_t size); 102 int (*dyncode_delete)(void *dest, size_t size);
101 }; 103 };
102 104
103 #define NACL_IRT_THREAD_v0_1 "nacl-irt-thread-0.1" 105 #define NACL_IRT_THREAD_v0_1 "nacl-irt-thread-0.1"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 NaClExceptionHandler *old_handler); 193 NaClExceptionHandler *old_handler);
192 int (*exception_stack)(void *stack, size_t size); 194 int (*exception_stack)(void *stack, size_t size);
193 int (*exception_clear_flag)(void); 195 int (*exception_clear_flag)(void);
194 }; 196 };
195 197
196 #if defined(__cplusplus) 198 #if defined(__cplusplus)
197 } 199 }
198 #endif 200 #endif
199 201
200 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */ 202 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_H */
OLDNEW
« no previous file with comments | « no previous file | src/untrusted/irt/irt_interfaces.c » ('j') | src/untrusted/irt/irt_interfaces.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698