Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csync(2)

memctl(2)

mmap(2)

mprotect(2)

stkexec(2)



stkprotect(2)                  DG/UX R4.11MU05                 stkprotect(2)


NAME
       stkprotect - set access for future stack extensions

SYNOPSIS
       int stkprotect (prot)
       int     *prot;

DESCRIPTION
       The DG/UX system provides alternative calls for setting stack memory
       access: stkexec(2), defined by the 88open Binary Compatibility
       Standard (BCS), revision 1.1A; and stkprotect(2), defined by the
       System V Release 4 Application Binary Interface (ABI):Motorola 88000
       Processor Supplement.  If your program must be BCS-compliant, use
       stkexec(2). Otherwise, use stkprotect(2) as explained below.

       The stkprotect(2) call sets access for future extensions to the
       stack.  The prot parameter may be one of the following ORed
       combinations:

       PROT_READ | PROT_WRITE             sets read-write access.

       PROT_READ | PROT_WRITE | PROT_EXEC sets read-write-execute access.

       Programs that execute stack memory should do the following:

       ·    Using this call, set the prot for future stack extensions to
            read-write-execute.

       ·    Using mprotect(2), set the access for the current stack extent,
            reported by getcontext(2), to read-write-execute.

       ·    After the  modification and prior to execution, use csync(2) to
            notify the system and allow for synchronization of hardware
            cache and memory contents. (If several processes share a memory
            region, at least one of them should perform notification for the
            others, following any modifications and preceding execution by
            any of them.)

RETURN VALUE
       0 if successful, -1 otherwise.

DIAGNOSTICS
       If stkprotect(2) fails, it sets errno to:

       EINVAL  The prot value is invalid.

SEE ALSO
       csync(2), memctl(2), mmap(2) mprotect(2), stkexec(2).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026