Changeset 85514 in vbox for trunk/src/VBox/Runtime/r0drv/linux
- Timestamp:
- Jul 29, 2020 10:44:46 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r85504 r85514 51 51 #ifndef PAGE_READONLY_EXEC 52 52 # define PAGE_READONLY_EXEC PAGE_READONLY 53 #endif 54 55 /** @def IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 56 * Whether we use alloc_vm_area (3.2+) for executable memory. 57 * This is a must for 5.8+, but we'll enable it for earlier kernels later. */ 58 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(DOXYGEN_RUNNING) 59 # define IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 53 60 #endif 54 61 … … 106 113 /** Set if we've vmap'ed the memory into ring-0. */ 107 114 bool fMappedToRing0; 108 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)115 #ifdef IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 109 116 /** Return from alloc_vm_area() that we now need to use for executable 110 117 * memory. */ … … 545 552 # endif 546 553 547 # if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)554 # ifdef IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 548 555 if (fExecutable) 549 556 { … … 613 620 { 614 621 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) 615 # if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)622 # ifdef IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 616 623 if (pMemLnx->pArea) 617 624 { … … 1829 1836 DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt) 1830 1837 { 1831 # if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)1838 # ifdef IPRT_USE_ALLOC_VM_AREA_FOR_EXEC 1832 1839 /* 1833 1840 * Currently only supported when we've got addresses PTEs from the kernel.
Note:
See TracChangeset
for help on using the changeset viewer.