Changeset 106261 in vbox
- Timestamp:
- Oct 9, 2024 6:55:55 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r106061 r106261 651 651 * Use vmap - 2.4.22 and later. 652 652 */ 653 #if RTLNX_VER_MIN(2,4,22) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) )653 #if RTLNX_VER_MIN(2,4,22) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(RT_ARCH_ARM64)) 654 654 pgprot_t fPg; 655 # if defined(RT_ARCH_ARM64) 656 /* ARM64 architecture has no _PAGE_NX, _PAGE_PRESENT and _PAGE_RW flags. 657 * Closest alternatives would be PTE_PXN, PTE_UXN, PROT_DEFAULT and PTE_WRITE. */ 658 pgprot_val(fPg) = _PAGE_KERNEL; /* (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL). */ 659 # else /* !RT_ARCH_ARM64 */ 655 660 pgprot_val(fPg) = _PAGE_PRESENT | _PAGE_RW; 656 # ifdef _PAGE_NX661 # ifdef _PAGE_NX 657 662 if (!fExecutable) 658 663 pgprot_val(fPg) |= _PAGE_NX; 659 # endif 664 # endif 665 # endif /* RT_ARCH_ARM64 */ 660 666 661 667 # ifdef IPRT_USE_ALLOC_VM_AREA_FOR_EXEC … … 675 681 Assert(pMemLnx->pArea->size >= pMemLnx->Core.cb); /* Note! includes guard page. */ 676 682 Assert(pMemLnx->pArea->addr); 677 # if def _PAGE_NX683 # if !defined(RT_ARCH_ARM64) && defined(_PAGE_NX) 678 684 pgprot_val(fPg) |= _PAGE_NX; /* Uses RTR0MemObjProtect to clear NX when memory ready, W^X fashion. */ 679 685 # endif … … 696 702 # endif 697 703 { 698 # if defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC)704 # if !defined(RT_ARCH_ARM64) && defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC) 699 705 if (fExecutable) 700 706 pgprot_val(fPg) |= _PAGE_NX; /* Uses RTR0MemObjProtect to clear NX when memory ready, W^X fashion. */
Note:
See TracChangeset
for help on using the changeset viewer.