VirtualBox

Ignore:
Timestamp:
Oct 7, 2009 9:22:10 PM (15 years ago)
Author:
vboxsync
Message:

IPRT,VMM,SUPDrv,VBGLR0: Added a parameter to RTR0MemObjLockUser/Kernel that indicates read/write intent so we can correctly lock readonly memory on Windows and OS/2. (Guest property strings, see #4238.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r22069 r23610  
    655655 * @return IPRT status code.
    656656 *
    657  * @param ppMem     Where to store the memory object pointer.
    658  * @param pv        First page.
    659  * @param cb        Number of bytes.
    660  * @param Task      The task \a pv and \a cb refers to.
     657 * @param   ppMem           Where to store the memory object pointer.
     658 * @param   pv              First page.
     659 * @param   cb              Number of bytes.
     660 * @param   fAccess         The desired access, a combination of RTMEM_PROT_READ
     661 *                          and RTMEM_PROT_WRITE.
     662 * @param   Task            The task \a pv and \a cb refers to.
    661663 */
    662 static int rtR0MemObjNativeLock(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, task_t Task)
    663 {
     664static int rtR0MemObjNativeLock(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess, task_t Task)
     665{
     666    NOREF(fAccess);
    664667#ifdef USE_VM_MAP_WIRE
    665668    vm_map_t Map = get_task_map(Task);
     
    729732
    730733
    731 int rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, RTR0PROCESS R0Process)
    732 {
    733     return rtR0MemObjNativeLock(ppMem, (void *)R3Ptr, cb, (task_t)R0Process);
    734 }
    735 
    736 
    737 int rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb)
    738 {
    739     return rtR0MemObjNativeLock(ppMem, pv, cb, kernel_task);
     734int rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process)
     735{
     736    return rtR0MemObjNativeLock(ppMem, (void *)R3Ptr, cb, fAccess, (task_t)R0Process);
     737}
     738
     739
     740int rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess)
     741{
     742    return rtR0MemObjNativeLock(ppMem, pv, cb, fAccess, kernel_task);
    740743}
    741744
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