| OLD | NEW |
| 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 /* | 7 /* |
| 8 * NaCl service run-time, non-platform specific system call helper routines. | 8 * NaCl service run-time, non-platform specific system call helper routines. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 void NaClAddSyscall(int num, int32_t (*fn)(struct NaClAppThread *)); | 30 void NaClAddSyscall(int num, int32_t (*fn)(struct NaClAppThread *)); |
| 31 | 31 |
| 32 int32_t NaClSysNull(struct NaClAppThread *natp); | 32 int32_t NaClSysNull(struct NaClAppThread *natp); |
| 33 | 33 |
| 34 int32_t NaClSysBrk(struct NaClAppThread *natp, | 34 int32_t NaClSysBrk(struct NaClAppThread *natp, |
| 35 uintptr_t new_break); | 35 uintptr_t new_break); |
| 36 | 36 |
| 37 int NaClHighResolutionTimerEnabled(void); | 37 int NaClHighResolutionTimerEnabled(void); |
| 38 | 38 |
| 39 int32_t NaClOpenAclCheck(struct NaClApp *nap, | |
| 40 char const *path, | |
| 41 int flags, | |
| 42 int mode); | |
| 43 | |
| 44 int32_t NaClStatAclCheck(struct NaClApp *nap, | |
| 45 char const *path); | |
| 46 | |
| 47 int32_t NaClSysGetpid(struct NaClAppThread *natp); | 39 int32_t NaClSysGetpid(struct NaClAppThread *natp); |
| 48 | 40 |
| 49 int32_t NaClSysExit(struct NaClAppThread *natp, | 41 int32_t NaClSysExit(struct NaClAppThread *natp, |
| 50 int status); | 42 int status); |
| 51 | 43 |
| 52 int32_t NaClSysThreadExit(struct NaClAppThread *natp, | 44 int32_t NaClSysThreadExit(struct NaClAppThread *natp, |
| 53 int32_t *stack_flag); | 45 int32_t *stack_flag); |
| 54 | 46 |
| 55 extern int NaClAclBypassChecks; | 47 extern int NaClAclBypassChecks; |
| 56 | 48 |
| 57 void NaClInsecurelyBypassAllAclChecks(void); | 49 void NaClInsecurelyBypassAllAclChecks(void); |
| 58 | 50 |
| 59 int32_t NaClSysNameService(struct NaClAppThread *natp, | 51 int32_t NaClSysNameService(struct NaClAppThread *natp, |
| 60 int32_t *desc_addr); | 52 int32_t *desc_addr); |
| 61 | 53 |
| 62 int32_t NaClSysDup(struct NaClAppThread *natp, | 54 int32_t NaClSysDup(struct NaClAppThread *natp, |
| 63 int oldfd); | 55 int oldfd); |
| 64 | 56 |
| 65 int32_t NaClSysDup2(struct NaClAppThread *natp, | 57 int32_t NaClSysDup2(struct NaClAppThread *natp, |
| 66 int oldfd, | 58 int oldfd, |
| 67 int newfd); | 59 int newfd); |
| 68 | 60 |
| 69 int32_t NaClSysOpen(struct NaClAppThread *natp, | |
| 70 char *pathname, | |
| 71 int flags, | |
| 72 int mode); | |
| 73 | |
| 74 int32_t NaClSysClose(struct NaClAppThread *natp, | 61 int32_t NaClSysClose(struct NaClAppThread *natp, |
| 75 int d); | 62 int d); |
| 76 | 63 |
| 77 int32_t NaClSysRead(struct NaClAppThread *natp, | 64 int32_t NaClSysRead(struct NaClAppThread *natp, |
| 78 int d, | 65 int d, |
| 79 void *buf, | 66 void *buf, |
| 80 size_t count); | 67 size_t count); |
| 81 | 68 |
| 82 int32_t NaClSysWrite(struct NaClAppThread *natp, | 69 int32_t NaClSysWrite(struct NaClAppThread *natp, |
| 83 int d, | 70 int d, |
| 84 void *buf, | 71 void *buf, |
| 85 size_t count); | 72 size_t count); |
| 86 | 73 |
| 87 int32_t NaClSysLseek(struct NaClAppThread *natp, | 74 int32_t NaClSysLseek(struct NaClAppThread *natp, |
| 88 int d, | 75 int d, |
| 89 nacl_abi_off_t *offp, | 76 nacl_abi_off_t *offp, |
| 90 int whence); | 77 int whence); |
| 91 | 78 |
| 92 int32_t NaClSysIoctl(struct NaClAppThread *natp, | 79 int32_t NaClSysIoctl(struct NaClAppThread *natp, |
| 93 int d, | 80 int d, |
| 94 int request, | 81 int request, |
| 95 void *arg); | 82 void *arg); |
| 96 | 83 |
| 97 int32_t NaClSysFstat(struct NaClAppThread *natp, | 84 int32_t NaClSysFstat(struct NaClAppThread *natp, |
| 98 int d, | 85 int d, |
| 99 struct nacl_abi_stat *nasp); | 86 struct nacl_abi_stat *nasp); |
| 100 | 87 |
| 101 int32_t NaClSysStat(struct NaClAppThread *natp, | |
| 102 const char *path, | |
| 103 struct nacl_abi_stat *nasp); | |
| 104 | |
| 105 int32_t NaClSysMkdir(struct NaClAppThread *natp, | |
| 106 uint32_t path, | |
| 107 int mode); | |
| 108 | |
| 109 int32_t NaClSysRmdir(struct NaClAppThread *natp, | |
| 110 uint32_t path); | |
| 111 | |
| 112 int32_t NaClSysChdir(struct NaClAppThread *natp, | |
| 113 uint32_t path); | |
| 114 | |
| 115 int32_t NaClSysGetcwd(struct NaClAppThread *natp, | |
| 116 uint32_t buffer, | |
| 117 int len); | |
| 118 | |
| 119 int32_t NaClSysUnlink(struct NaClAppThread *natp, | |
| 120 uint32_t path); | |
| 121 | |
| 122 /* bool */ | 88 /* bool */ |
| 123 int NaClSysCommonAddrRangeContainsExecutablePages(struct NaClApp *nap, | 89 int NaClSysCommonAddrRangeContainsExecutablePages(struct NaClApp *nap, |
| 124 uintptr_t usraddr, | 90 uintptr_t usraddr, |
| 125 size_t length); | 91 size_t length); |
| 126 | 92 |
| 127 /* bool */ | 93 /* bool */ |
| 128 int NaClSysCommonAddrRangeInAllowedDynamicCodeSpace(struct NaClApp *nap, | 94 int NaClSysCommonAddrRangeInAllowedDynamicCodeSpace(struct NaClApp *nap, |
| 129 uintptr_t usraddr, | 95 uintptr_t usraddr, |
| 130 size_t length); | 96 size_t length); |
| 131 | 97 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 int32_t name, | 229 int32_t name, |
| 264 int32_t *result); | 230 int32_t *result); |
| 265 | 231 |
| 266 int32_t NaClSysTestInfoLeak(struct NaClAppThread *natp); | 232 int32_t NaClSysTestInfoLeak(struct NaClAppThread *natp); |
| 267 | 233 |
| 268 int32_t NaClSysTestCrash(struct NaClAppThread *natp, int crash_type); | 234 int32_t NaClSysTestCrash(struct NaClAppThread *natp, int crash_type); |
| 269 | 235 |
| 270 EXTERN_C_END | 236 EXTERN_C_END |
| 271 | 237 |
| 272 #endif /* NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYSCALL_COMMON_H__ */ | 238 #endif /* NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYSCALL_COMMON_H__ */ |
| OLD | NEW |