VirtualBox

Changeset 50008 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Dec 27, 2013 2:20:34 PM (11 years ago)
Author:
vboxsync
Message:

supdrv,iprt: Added VBOX_WITH_TEXT_MODMEM_HACK for getting VMMR0.r0 address in the linux kernel stack crawl.

Location:
trunk/src/VBox/Runtime/r0drv/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r48935 r50008  
    3838
    3939
    40 #if defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)
     40#if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
    4141# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
    4242/**
     
    9696/** Spinlock protecting the heap. */
    9797static RTSPINLOCK   g_HeapExecSpinlock = NIL_RTSPINLOCK;
     98#endif
    9899
    99100
     
    104105DECLHIDDEN(void) rtR0MemExecCleanup(void)
    105106{
     107#ifdef RTMEMALLOC_EXEC_HEAP
    106108    RTSpinlockDestroy(g_HeapExecSpinlock);
    107109    g_HeapExecSpinlock = NIL_RTSPINLOCK;
     110#endif
    108111}
    109112
     
    121124 *
    122125 * @returns IPRT status code.
     126 * @retval  VERR_NOT_SUPPORTED if the code isn't enabled.
    123127 * @param   pvMemory    Pointer to the memory block.
    124128 * @param   cb          The size of the memory block.
     
    126130RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb)
    127131{
     132#ifdef RTMEMALLOC_EXEC_HEAP
    128133    int rc;
    129134    AssertReturn(g_HeapExec == NIL_RTHEAPSIMPLE, VERR_WRONG_ORDER);
     
    137142    }
    138143    return rc;
     144#else
     145    return VERR_NOT_SUPPORTED;
     146#endif
    139147}
    140148RT_EXPORT_SYMBOL(RTR0MemExecDonate);
    141149
    142 #endif /* RTMEMALLOC_EXEC_HEAP */
    143150
    144151
  • trunk/src/VBox/Runtime/r0drv/linux/initterm-r0drv-linux.c

    r48935 r50008  
    5050*   Internal Functions                                                         *
    5151*******************************************************************************/
    52 #if defined(RT_ARCH_AMD64) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
    5352/* in alloc-r0drv0-linux.c */
    5453DECLHIDDEN(void) rtR0MemExecCleanup(void);
    55 #endif
    5654
    5755
     
    115113#endif
    116114
    117 #if defined(RT_ARCH_AMD64) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
    118115    rtR0MemExecCleanup();
    119 #endif
    120116}
    121117
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette