Changeset e39d7b8 in mainline for kernel/generic/src/syscall/copy.c
- Timestamp:
- 2019-06-17T15:12:44Z (5 years ago)
- Children:
- 64b7854
- Parents:
- ef705e14
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-16 17:59:34)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-17 15:12:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/syscall/copy.c
ref705e14 re39d7b8 59 59 * @return EOK on success or an error code from @ref errno.h. 60 60 */ 61 errno_t copy_from_uspace(void *dst, const void *uspace_src, size_t size)61 errno_t copy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size) 62 62 { 63 63 ipl_t ipl; … … 68 68 69 69 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 70 if (overlaps( (uintptr_t)uspace_src, size,70 if (overlaps(uspace_src, size, 71 71 KERNEL_ADDRESS_SPACE_START, 72 72 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { … … 82 82 * Check whether the address is outside the address space hole. 83 83 */ 84 if (overlaps( (uintptr_t)uspace_src, size, ADDRESS_SPACE_HOLE_START,84 if (overlaps(uspace_src, size, ADDRESS_SPACE_HOLE_START, 85 85 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 86 86 return EPERM; … … 110 110 * @return 0 on success or an error code from @ref errno.h. 111 111 */ 112 errno_t copy_to_uspace( void *uspace_dst, const void *src, size_t size)112 errno_t copy_to_uspace(uspace_addr_t uspace_dst, const void *src, size_t size) 113 113 { 114 114 ipl_t ipl; … … 119 119 120 120 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 121 if (overlaps( (uintptr_t)uspace_dst, size,121 if (overlaps(uspace_dst, size, 122 122 KERNEL_ADDRESS_SPACE_START, 123 123 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { … … 133 133 * Check whether the address is outside the address space hole. 134 134 */ 135 if (overlaps( (uintptr_t)uspace_dst, size, ADDRESS_SPACE_HOLE_START,135 if (overlaps(uspace_dst, size, ADDRESS_SPACE_HOLE_START, 136 136 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 137 137 return EPERM;
Note:
See TracChangeset
for help on using the changeset viewer.