VMS Help
System Services, $SETPRT

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Allows a process to change the protection on a page or range of
    pages.

    Format

      SYS$SETPRT  inadr ,[retadr] ,[acmode] ,prot ,[prvprt]

    C Prototype

      int sys$setprt  (struct _va_range *inadr, struct _va_range

                      *retadr, unsigned int acmode, unsigned int

                      prot, unsigned char *prvprt);

    Arguments

 inadr

    OpenVMS usage:address_range
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Starting and ending virtual addresses of the range of pages whose
    protection is to be changed. The inadr argument is the address of
    a 2-longword array containing, in order, the starting and ending
    process virtual addresses.

    Addresses are adjusted up or down to fall on CPU-specific page
    boundaries. Only the virtual page number portion of each virtual
    address is used; the low-order byte-within-page bits are ignored.

    If the starting and ending virtual addresses are the same, the
    protection is changed for a single page.

 retadr

    OpenVMS usage:address_range
    type:         longword (unsigned)
    access:       write only
    mechanism:    by reference-array reference or descriptor
    Starting and ending virtual addresses of the range of pages whose
    protection was actually changed by $SETPRT. The retadr argument
    is the address of a 2-longword array containing, in order, the
    starting and ending process virtual addresses.

    If an error occurs while the protection is being changed, $SETPRT
    writes into retadr the range of pages that were successfully
    changed before the error occurred. If no pages were affected
    before the error occurred, $SETPRT writes the value -1 into each
    longword of the 2-longword array.

 acmode

    OpenVMS usage:access_mode
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    Access mode associated with the call to $SETPRT. The acmode
    argument is a longword containing the access mode. The $PSLDEF
    macro defines symbols for the access modes.

    The $SETPRT service uses whichever of the following two access
    modes is least privileged: (1)  the access mode specified by
    acmode or (2)  the access mode of the caller. To change the
    protection of any page in the specified range, the resultant
    access mode must be equal to or more privileged than the access
    mode of the owner of that page.

 prot

    OpenVMS usage:page_protection
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    Page protection to be assigned to the specified pages. The prot
    argument is a longword value containing the protection code. Only
    bits 0 to 3 are used; bits 4 to 31 are ignored.

    The $PRTDEF macro defines the following symbolic names for the
    protection codes:

    Symbol        Description

    PRT$C_NA      No access
    PRT$C_KR      Kernel read only
    PRT$C_KW      Kernel write
    PRT$C_ER      Executive read only
    PRT$C_EW      Executive write
    PRT$C_SR      Supervisor read only
    PRT$C_SW      Supervisor write
    PRT$C_UR      User read only
    PRT$C_UW      User write
    PRT$C_ERKW    Executive read; kernel write
    PRT$C_SRKW    Supervisor read; kernel write
    PRT$C_SREW    Supervisor read; executive write
    PRT$C_URKW    User read; kernel write
    PRT$C_UREW    User read; executive write
    PRT$C_URSW    User read; supervisor write

    OpenVMS Alpha systems convert PRT$C_NA to the next highest
    protection, kernel-read.

    If you specify the protection as the value 0, the protection
    defaults to kernel read only.

 prvprt

    OpenVMS usage:page_protection
    type:         byte (unsigned)
    access:       write only
    mechanism:    by reference
    Protection previously assigned to the last page in the range.
    The prvprt argument is the address of a byte into which $SETPRT
    writes the protection of this page. The prvprt argument is useful
    only when protection for a single page is being changed.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.