Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ makeshm(1M) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

shmget(2)

shmbind(2)

shmctl(2)

ftok(3C)

memory(7)

makeshm(1M)  —  (GCX and M88K only)

NAME

makeshm − configure shared memory regions for system addresses

SYNOPSIS

/usr/etc/makeshm [−u user] [−g group] [−m mode] [−n name] [−x] key_name

DESCRIPTION

makeshm is used to create shared memory regions with known keys bound to particular system addresses.  These shared memory regions are global resources used by some system applications and libraries.  The regions created by makeshm are created for the purposes of mapping a particular system address into an application. 

The system administrator using the makeshm command should assign a user, group, and nine-bit mode value to the specified device key to limit user access to the shared memory region. 

Key names supported by makeshm include /dev/interval_timer, /dev/spl and /dev/posix4.  The shared memory regions bound to the interval timer, SPL register and POSIX 1003.4 information page are used by applications and libraries that require efficient interfaces to access the requested system address.  By default, makeshm will create the shared memory regions with owner, group, and read/write permissions listed below:

key_name owner group access
/dev/spl root kmem rw-------
/dev/interval_timer root kmem r--------
/dev/posix4 root kmem rw-r--r--

makeshm will create a shared memory region bound to the physical page frame containing the requested system address.  The shared memory regions created by makeshm are given IPC key names generated by the ftok() system call.  For example, the shared memory key for the interval timer is generated by the call:

key = ftok ( "/dev/interval_timer", 0 );

In order to access a specific system address, an application must know the address’s offset from the start of the page frame the created shared memory region is bound.  The system address can be accessed adding the offset of the system address from the beginning of the page frame to the address returned from shmat().  This offset can be determined by calculating the physical address of the register modulus the system’s number of bytes per page.  Consult the system’s architecture manual for physical addresses of the system registers.  A user or programmer should not need to know the specifics of the shared memory regions and system address offsets because access to these system addreses is controlled by other Harris supported libraries and products. 

Because makeshm uses the shmbind(2) system service to bind a shared memory region to a system address, the user invoking makeshm must have superuser privilege or have the ACC_SHMBIND bit set in the user’s access vector. 

OPTIONS

−uuser
The shared memory region created by makeshm will have the shm_perm.uid field of its associated data structure set to the numerical uid value that corresponds to user.

−ggroup
The shared memory region created by makeshm will have the shm_perm.gid field of its associated data structure set to the numerical gid value that corresponds group.

−mmode
The shared memory region created by makeshm will have the lower nine bits of shm_perm.mode field of its associated data structure set to the value mode.

−nname
Alternative system name in place of /unix. 

−x
The shared memory region associated with the specified key name and previously created by makeshm is to be removed. 

The key_name parameter must be specified as one of the keys supported by makeshm. 

NOTES

The shared memory regions for /dev/interval_timer and /dev/posix4 must be configured using makeshm prior to executing any programs that use POSIX 1003.4 timers and clocks library routines.  These programs will not execute properly unless these shared memory regions are configured. 

SECURITY

makeshm is designed to create shared memory regions bound to system registers, so nonprivileged users may attach them within their applications.  The purpose for this utility is to allow system administrators to provide access to specific system registers without giving permission for a user to access any system address using the shmbind(2) system service.  System administrators should be aware that misuse of system registers made available to users via makeshm may jeopardize system integrity.  Only users requiring access to a particular system register should be granted permission to attach the specific register. 

DIAGNOSTICS

If makeshm encounters an error, it will output a message indicating which system call failed and the reason for the failure. 

FILES

/dev/interval_timer
/dev/spl
/dev/posix4

SEE ALSO

intro(2), shmget(2), shmbind(2), shmctl(2), ftok(3C), memory(7). 

CX/UX Administrator’s Reference

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