Patch Name: PHKL_3790 Patch Description: s700 9.01 Interrupting GCDESCRIBE ioctl can panic sti_save The frame-buffer driver, part of the graphics display driver set, allows users to obtain information about the display through the GCDESCRIBE ioctl call. Since the frame-buffer can be in use by the Internal Terminal Emulator (ITE), the frame-buffer driver and ITE implement a semaphoring scheme to ensure the two can both safely access the graphics hardware without interacting. Unfortunately, it is possible for the GCDESCRIBE ioctl to exit prematurely, after it has grabbed the semaphore; this leaves the hardware locked, so that the ITE cannot gain access. After some time, the ITE times out waiting on the semaphore and panics, with the message "sti_save(): timeout on semaphore." Specifically, the GCDESCRIBE ioctl locks the semaphore, then tries to save the graphics display state; since it is possible for the display to be busy, the driver enters a retry loop, calling sleep() with a short (.04 second) timeout. The problem is that the sleep() is made at an interruptible priority (> PZERO), so that user signals cause the ioctl to return immediately; while this is appropriate design, since it avoids process delays, the sleep() does not take into account the semaphore lock. Thus, when any user signal interrupts the process, the sleep() performs a longjmp, returning directly to the user program -- leaving the semaphore locked. The fix was to modify the sleep() call to catch the signal, by setting PCATCH; in this way, the ioctl can release the semaphore before returning to the user. An equivalent patch for HP-UX Release 9.03 is PHKL_3791. Path Name: /hp-ux_patches/s700/9.X/PHKL_3790 Effective Date: 940214 OS Release: 9.01 Reboot Required: Yes Patch Files: /etc/conf/libhp-ux.a(framebuf.o) SR#: 5003179754 "what" string/timestamp: framebuf.c $Revision: 1.15.81.3 $ $Date: 94/02/14 15:51:56 $ PATCH_9.01 (PHKL_3790) "sum" output: 53909 28 framebuf.o Dependencies: None Supersedes: None H/W Dependencies: None Special Installation Instructions: None. Patch Installation Recommendation: Recommended for all systems, in particular those with customer-written programs that access the graphics display, and may perform GCDESCRIBE ioctls. Patch Package Size: 72 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. Note: Please back up your system before you patch. --------------------------------------------------------------------------- After getting the patch onto your machine, unshar the patch (sh PHKL_3790). To install this patch do the following: 1) Run /etc/update (Note: you must be logged in as root to update a system). 2) Once in the update "Main Menu" move the highlighted line to "Change Source or Destination ->" and press "Return" or "Select Item". 3) Make sure the highlighted item in the "Change Source or Destination" window is "From Tape Device to Local System ...", then press "Return" or "Select Item". 4) You should now be in the "From Tape Device to Local System" window. Change the "Source: /dev/rmt/0m" to "Source: /tmp/PHKL_3790.updt" (this assumes that you are in the /tmp directory where PHKL_3790.updt has been placed). Note: You must enter the complete path name. 5) Press "Done". 6) From here on follow the standard directions for update. The customized script that update runs will move the original software to /system/PHKL_3790/orig. HP recommends keeping this software there in order to recover from any potential problems. It is also recommended that you move the PHKL_3790.text file to /system/PHKL_3790 to be retained for future reference. If you wish to put this patch on a magnetic tape and update from the tape drive, dd a copy of the patch to the tape drive. As an example the following will create a copy of the patch that update can read: dd if=PHKL_3790.updt of=/dev/rmt/0m bs=2048