VirtualBox

Changeset 52963 in vbox


Ignore:
Timestamp:
Oct 6, 2014 8:10:55 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96406
Message:

Runtime/memsafer-r3.cpp: Refine previous fix, don't ignore VERR_INVALID_PARAMETER but skip changing the protection of the guard pages on OS X

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/memsafer-r3.cpp

    r52960 r52963  
    286286
    287287        /*
     288         * On darwin we cannot allocate pages without an R0 mapping and
     289         * SUPR3PageAllocEx falls back to another method which is incompatible with
     290         * the way SUPR3PageProtect works. Ignore changing the protection of the guard
     291         * pages.
     292         */
     293#ifdef RT_OS_DARWIN
     294        return VINF_SUCCESS;
     295#else
     296        /*
    288297         * Configure the guard pages.
    289298         * SUPR3PageProtect isn't supported on all hosts, we ignore that.
    290          * Additionally on darwin we cannot allocate pages without a R0 mapping and
    291          * SUPR3PageAllocEx falls back to another method which is incompatible with
    292          * the way SUPR3PageProtect works, it returns VERR_INVALID_PARAMETER. Ignore that case too.
    293299         */
    294300        rc = SUPR3PageProtect(pvPages, NIL_RTR0PTR, 0, PAGE_SIZE, RTMEM_PROT_NONE);
     
    305311        /* failed. */
    306312        int rc2 = SUPR3PageFreeEx(pvPages, pThis->cPages); AssertRC(rc2);
     313#endif
    307314    }
    308315    return rc;
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