HP (Hewlett-Packard) Version 8.4 Server User Manual


 
Programming Release Notes
5.10 Privileged Data Structures Updates
Device drivers that create or clone copies of IRPs to facilitate multiple I/O
operations per request, and subsequently pass the copies to the I/O subsystem for
postprocessing, must make code changes to account for the extra references to the
PSB in these additional IRPs. This is done by passing the PSB address located in
the copied IRP to the NSA_STD$REFERENCE_PSB routine. The include le 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 Version
7.2 or higher 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
failures.
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.2 or
higher.
Several routines are used by privileged code to create OpenVMS fork execution
threads. These routines run in system context independent of any process. There
are four variations of these routines, depending on whether an immediate or
queued fork is required and on which language interface is being used:
EXE$QUEUE_FORK
EXE_STD$QUEUE_FORK
EXE$PRIMITIVE_FORK
EXE_STD$PRIMITIVE_FORK
These routines must be called at or above IPL$_RESCHED, to prevent accidental
rescheduling to a different CPU during their execution. Such a reschedule could
cause the system to hang.
In OpenVMS V7.3-1, if SYSTEM_CHECK is set to 1, these routines check the
system IPL at entry. If the IPL is below IPL$_RESCHED, the system will fail
with an SPLINVIPL bugcheck.
Programming Release Notes 5–9