Technical data
Programming Release Notes
6.21 Privileged Interfaces and Data Structures (Alpha Only)
6.21.3 Per-Thread Security Impacts Privileged Code and Device Drivers
V7.2
The method used for attaching a security profile to the I/O Request Packet (IRP)
has changed.
In previous versions of OpenVMS, the address of the processwide Access Rights
Block (ARB) security structure was copied directly into the IRP. Beginning with
OpenVMS Alpha Version 7.2, the address of the new security profile structure
(Persona Security Block, or PSB) of the thread making the I/O request is moved
into the IRP.
The I/O subsystem maintains its access to the PSB through a reference counter.
The I/O subsystem increments this reference counter at IRP creation and
decrements the counter at I/O completion. When the counter reaches zero, the
PSB is deleted from the system.
Device drivers that created copies of IRPs to facilitate multiple I/O operations
per request, and subsequently pass the copied IRPs to the I/O subsystem for
postprocessing, must make code changes to account for the extra references to
the PSB that result. This is done by calling NSA_STD$REFERENCE_PSB and
passing the PSB address located in the copied IRP before I/O postprocessing of
the IRP copy. The include file and routine call for NSA_STD$REFERENCE_PSB
is as follows:
#include <security-macros.h>
/* Increment REFCNT of PSB that is now shared by both IRPs */
nsa_std$reference_psb( irp->irp$ar_psb );
Device drivers need to make this change under the following conditions:
• If a device driver creates a new IRP by duplicating an existing IRP and
submits both the original and the duplicate IRPs for I/O postprocessing by
calling IOC_STD$SIMREQCOM or IOC_STD$DIRPOST1 the device driver
must call NSA_STD$REFERENCE_PSB sometime after duplicating the IRP,
but before submitting it for I/O postprocessing.
• If a device driver creates a new IRP by duplicating an existing IRP and
does not put the address of some procedure descriptor into the IRP$L_PID
cell in either the copy or the original IRP, and the device driver submits
both the original and the duplicate IRPs for I/O postprocessing by calling
IOC_STD$REQCOM, COM_STD$POST, COM_STD$POST_NOCNT, or
IOC_STD$POST_IRP, the device driver must call NSA_STD$REFERENCE_
PSB sometime after duplicating the IRP but before submitting it for I/O
postprocessing.
Device drivers that perform these steps are also likely to put the address of
some procedure descriptor into IRP$L_PID. Therefore, most device drivers
that duplicate IRPs should be able to function correctly on OpenVMS 7.2
without making source changes, relinking, or recompiling.
Failure to call NSA_STD$REFERENCE_PSB in these circumstances will result
in corrupt tracking information within the PSB, which can result in system
crashes.
If you make code changes in a device driver to call NSA_STD$REFERENCE_PSB,
you must recompile and relink the driver to run on OpenVMS Version 7.3.
6–24 Programming Release Notes










