VirtualBox

Changeset 20528 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jun 13, 2009 8:21:48 PM (16 years ago)
Author:
vboxsync
Message:

SUP: SUPR0PageProtect & SUPR0PageProtect - for creating guard (hyper) heap/stack pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r20374 r20528  
    742742 * Maps a portion of a ring-3 only allocation into kernel space.
    743743 *
    744  * @return VBox status code.
    745  *
    746  * @param  pvR3             The address SUPR3PageAllocEx return.
    747  * @param  off              Offset to start mapping at. Must be page aligned.
    748  * @param  cb               Number of bytes to map. Must be page aligned.
    749  * @param  fFlags           Flags, must be zero.
    750  * @param  pR0Ptr           Where to store the address on success.
     744 * @returns VBox status code.
     745 *
     746 * @param   pvR3            The address SUPR3PageAllocEx return.
     747 * @param   off             Offset to start mapping at. Must be page aligned.
     748 * @param   cb              Number of bytes to map. Must be page aligned.
     749 * @param   fFlags          Flags, must be zero.
     750 * @param   pR0Ptr          Where to store the address on success.
    751751 *
    752752 */
    753753SUPR3DECL(int) SUPR3PageMapKernel(void *pvR3, uint32_t off, uint32_t cb, uint32_t fFlags, PRTR0PTR pR0Ptr);
     754
     755/**
     756 * Changes the protection of
     757 *
     758 * @returns VBox status code.
     759 * @retval  VERR_NOT_SUPPORTED if the OS doesn't allow us to change page level
     760 *          protection. See also RTR0MemObjProtect.
     761 *
     762 * @param   pvR3            The ring-3 address SUPR3PageAllocEx returned.
     763 * @param   R0Ptr           The ring-0 address SUPR3PageAllocEx returned if it
     764 *                          is desired that the corresponding ring-0 page
     765 *                          mappings should change protection as well. Pass
     766 *                          NIL_RTR0PTR if the ring-0 pages should remain
     767 *                          unaffected.
     768 * @param   off             Offset to start at which to start chagning the page
     769 *                          level protection. Must be page aligned.
     770 * @param   cb              Number of bytes to change. Must be page aligned.
     771 * @param   fProt           The new page level protection, either a combination
     772 *                          of RTMEM_PROT_READ, RTMEM_PROT_WRITE and
     773 *                          RTMEM_PROT_EXEC, or just RTMEM_PROT_NONE.
     774 */
     775SUPR3DECL(int) SUPR3PageProtect(void *pvR3, RTR0PTR R0Ptr, uint32_t off, uint32_t cb, uint32_t fProt);
    754776
    755777/**
     
    10301052SUPR0DECL(int) SUPR0PageAllocEx(PSUPDRVSESSION pSession, uint32_t cPages, uint32_t fFlags, PRTR3PTR ppvR3, PRTR0PTR ppvR0, PRTHCPHYS paPages);
    10311053SUPR0DECL(int) SUPR0PageMapKernel(PSUPDRVSESSION pSession, RTR3PTR pvR3, uint32_t offSub, uint32_t cbSub, uint32_t fFlags, PRTR0PTR ppvR0);
     1054SUPR0DECL(int) SUPR0PageProtect(PSUPDRVSESSION pSession, RTR3PTR pvR3, RTR0PTR pvR0, uint32_t offSub, uint32_t cbSub, uint32_t fProt);
    10321055SUPR0DECL(int) SUPR0PageFree(PSUPDRVSESSION pSession, RTR3PTR pvR3);
    10331056SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PRTR3PTR ppGipR3, PRTHCPHYS pHCPhysGip);
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