Changeset 7531 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Mar 25, 2008 11:02:24 AM (17 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/linux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
r7042 r7531 258 258 SetPageReserved(&paPages[iPage]); 259 259 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ 260 if (pgprot_val(MY_PAGE_KERNEL_EXEC) != pgprot_val(PAGE_KERNEL)) 261 MY_CHANGE_PAGE_ATTR(&paPages[iPage], 1, MY_PAGE_KERNEL_EXEC); 260 MY_SET_PAGES_EXEC(&paPages[iPage], 1); 262 261 #endif 263 262 } … … 302 301 ClearPageReserved(&paPages[iPage]); 303 302 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ 304 if (pgprot_val(MY_PAGE_KERNEL_EXEC) != pgprot_val(PAGE_KERNEL)) 305 MY_CHANGE_PAGE_ATTR(&paPages[iPage], 1, PAGE_KERNEL); 303 MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); 306 304 #endif 307 305 } -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r6477 r7531 220 220 { 221 221 pMemLnx->apPages[iPage] = &paPages[iPage]; 222 if (pgprot_val(MY_PAGE_KERNEL_EXEC) != pgprot_val(PAGE_KERNEL)) 223 MY_CHANGE_PAGE_ATTR(pMemLnx->apPages[iPage], 1, MY_PAGE_KERNEL_EXEC); 222 MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1); 224 223 if (PageHighMem(pMemLnx->apPages[iPage])) 225 224 BUG(); … … 261 260 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) 262 261 #else 263 if (pgprot_val(MY_PAGE_KERNEL_EXEC) != pgprot_val(PAGE_KERNEL)) 264 MY_CHANGE_PAGE_ATTR(pMemLnx->apPages[iPage], 1, PAGE_KERNEL); 262 MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage]); 265 263 #endif 266 264 } -
trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
r7032 r7531 208 208 #endif /* !NO_REDHAT_HACKS */ 209 209 210 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) 211 # define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) 212 # define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) 213 #else 214 # define MY_SET_PAGES_EXEC(pPages, cPages) MY_CHANGE_PAGE_ATTR(pPages, cPages, MY_PAGE_KERNEL_EXEC) 215 # define MY_SET_PAGES_NOEXEC(pPages, cPages) MY_CHANGE_PAGE_ATTR(pPages, cPages, PAGE_KERNEL) 216 #endif 210 217 211 218 #ifndef MY_DO_MUNMAP
Note:
See TracChangeset
for help on using the changeset viewer.