Browse Prior Art Database

Validating Access to OS/2 Memory

IP.com Disclosure Number: IPCOM000108599D
Original Publication Date: 1992-Jun-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 1 page(s) / 39K

Publishing Venue

IBM

Related People

Cox, D: AUTHOR [+3]

Abstract

This article describes a method for determining that an OS/2* Process has access to a memory location without causing the operating system to return a Protection Violation (a Trap) to the application.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 87% of the total text.

Validating Access to OS/2 Memory

       This article describes a method for determining that an
OS/2* Process has access to a memory location without causing the
operating system to return a Protection Violation (a Trap) to the
application.

      OS/2 does not provide a way to determine if a Process has
access to a memory location in OS/2 when writing applications in a
High Level language such as 'C'.  If a Process does not have access
to a memory location then the Process will take a Protection
Violation, which will terminate the Process.  OS/2 provides no API
mechanism for validating access to a memory location before
attempting to access that location.

      In order to overcome this problem, OfficeVision*/2 (OV/2)
Office built an API which applications may call to validate access to
a memory location before that memory location is actually accessed.
This API was written in Assembler language, which provides the
following instructions:
VERR (Verify Read Access),
VERW (Verify Write Access), and
LSL  (Load Segment Limit).
Using these instructions, the API is passed an address (Segment and
Offset combination), a length, and a flag indicating whether the
caller is requesting Read verification or Read/Write verification.
The API validates all memory within the range specified by the
address and length requested, and validates that memory based on the
type of verification requested.  If the memory is not addressable,
then a return code is passed back to the...