Changeset 1479562 in mainline
- Timestamp:
- 2010-11-15T23:02:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74c57908
- Parents:
- dd567c6
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/mm/as.h
rdd567c6 r1479562 36 36 #define KERN_amd64_AS_H_ 37 37 38 #define ADDRESS_SPACE_HOLE_START 0x0000800000000000ULL 39 #define ADDRESS_SPACE_HOLE_END 0xffff7fffffffffffULL 40 38 41 #define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 39 42 40 #define KERNEL_ADDRESS_SPACE_START_ARCH (unsigned long) 0xffff80000000000041 #define KERNEL_ADDRESS_SPACE_END_ARCH (unsigned long) 0xffffffffffffffff43 #define KERNEL_ADDRESS_SPACE_START_ARCH 0xffff800000000000ULL 44 #define KERNEL_ADDRESS_SPACE_END_ARCH 0xffffffffffffffffULL 42 45 43 #define USER_ADDRESS_SPACE_START_ARCH (unsigned long) 0x000000000000000044 #define USER_ADDRESS_SPACE_END_ARCH (unsigned long) 0x00007fffffffffff46 #define USER_ADDRESS_SPACE_START_ARCH 0x0000000000000000ULL 47 #define USER_ADDRESS_SPACE_END_ARCH 0x00007fffffffffffULL 45 48 46 49 #define USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH - (PAGE_SIZE - 1)) -
kernel/generic/src/syscall/copy.c
rdd567c6 r1479562 68 68 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 69 69 if (overlaps((uintptr_t) uspace_src, size, 70 KERNEL_ADDRESS_SPACE_START, KERNEL_ADDRESS_SPACE_END-KERNEL_ADDRESS_SPACE_START)) { 70 KERNEL_ADDRESS_SPACE_START, 71 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { 71 72 /* 72 73 * The userspace source block conflicts with kernel address space. … … 75 76 } 76 77 } 78 79 #ifdef ADDRESS_SPACE_HOLE_START 80 /* 81 * Check whether the address is outside the address space hole. 82 */ 83 if (overlaps((uintptr_t) uspace_src, size, ADDRESS_SPACE_HOLE_START, 84 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 85 return EPERM; 86 #endif 77 87 78 88 ipl = interrupts_disable(); … … 109 119 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 110 120 if (overlaps((uintptr_t) uspace_dst, size, 111 KERNEL_ADDRESS_SPACE_START, KERNEL_ADDRESS_SPACE_END-KERNEL_ADDRESS_SPACE_START)) { 121 KERNEL_ADDRESS_SPACE_START, 122 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { 112 123 /* 113 124 * The userspace destination block conflicts with kernel address space. … … 116 127 } 117 128 } 129 130 #ifdef ADDRESS_SPACE_HOLE_START 131 /* 132 * Check whether the address is outside the address space hole. 133 */ 134 if (overlaps((uintptr_t) uspace_dst, size, ADDRESS_SPACE_HOLE_START, 135 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 136 return EPERM; 137 #endif 118 138 119 139 ipl = interrupts_disable();
Note:
See TracChangeset
for help on using the changeset viewer.