Patch Name: PHNE_7709 Patch Description: s700 9.X cumulative STREAMS patch with timeout PANIC fix Creation Date: 96/06/13 Post Date: 96/06/20 Hardware Platforms - OS Releases: s700: 9.01 9.03 9.05 9.07 Products: N/A Filesets: STREAMS Automatic Reboot?: Yes Status: General Release Critical: Yes PHNE_7709: PANIC PHNE_7117: OTHER A fix for the terror in libnsl_s.a PHNE_6561: PANIC PHNE_6277: PANIC PHNE_5304: HANG PHNE_4702: PANIC PHNE_4407: PANIC PHNE_3022: PANIC Path Name: /hp-ux_patches/s700/9.X/PHNE_7709 Symptoms: PHNE_7709: The Callback function for timeout() and bucall() run unprotected and thereby might corrupt driver and module data structures. PHNE_7117: If setlocale() is used while printing the errno, errno might get overwritten and so the original errno is lost. User will see unexpected errno. PHNE_6561: o System panic. Stream head's service routine or lower mux's put routine is called after unlinking. PHNE_6277: o System panic due to memory corruption by pullupmsg. PHNE_5304: o Attempt to create multiple ranges of minor numbers by autopush fails. o If the close routine of a STREAMS kernel module is coded in such a way that it will sleep and wait until its service routine wakes it up, the close routine may indefinitely sleeps. PHNE_4702: o Panic in weld daemon. PHNE_4407: o Panic in timod for trap 15 when memory shortage occurs. PHNE_3976: o DART 15 cpp emitts warnings, "Parameter holes filled with a null string," for str_stream.h and stream.h during update or uxgen. PHNE_3022: o SO_NDELON functionality now supported. Was not provided in 9.0 original release because only needed by tty. o pullupmsg: if pullupmsg called with "len" parameter less than number of active bytes in the first mblk of the message to be pulled up, random and asynchronous panics may occur due to memory corruption. o I_PEEK ioctl returns 1 when a hangup condition exist on stream head, should return 0. o drvgetparm(PPID) returns process's parent's process id (ppid), should return process's own process id (pid). o I_LINK ioctl hangs if MUX sends message to driver being linked underneath it and the driver must process this message before the M_IOCACK for the I_LINK is sent. o TLI t_open and t_sync returned -1 and t_errno = 0 when transport provider sends an illegal state value in the T_INFO_ACK message. Fix to set t_errno to TSYSERR. o Method of device cloning described in SVR4PG which uses minor number encoding was not supported in 9.0. Add LIMITED, PARTIAL SUPPORT FOR SBE CUSTOMERS ONLY. o t_getstate() fixed to return a new state, TLI_TSTATECHNG, instead of the error TSTATECHNG when a connection is in the midst of changing state. o When a hangup condition exists on a stream head, 9.0 poll() returns revents POLLHUP|POLLIN even if no data is present at the stream head. Fixed poll() to return revents POLLHUP if no data is present and hangup condition exists. o In 9.0, a stream must be opened O_RDWR in order to use the I_PUSH and I_POP ioctls. This is more restrictive than SVR4PG, and breaks code ported from SVR4 systems. Fixed to allow I_PUSH and I_POP on streams opened O_RDONLY or O_WRONLY. o In 9.0, the following ioctls were more restrictive in requirements for whether a stream was opened for read only, write only, or both, than SVR4PG. Fixed to remove these restrictions: I_FDINSERT, I_FLUSH, I_FLUSHBAND, I_PEEK, I_RECVFD, I_SENDFD, I_LINK, I_PLINK, I_UNLINK, I_PUNLINK. Defect Description: PHNE_7709: The Callback function for timeout() and bucall() are run by the softclock() and should be protected.Since these could be called by driver and modules to schedule user defined functions theycould be pre-empting the caller code like put() or srv() functions.So we should protect the callback functions by SPLSTR PHNE_7117: If setlocale() is used while printing the errno, errno might get overwritten with the error no 2 PHNE_6561: o Stream head's service routine or lower mux's put routine is called after unlinking. PHNE_6277: o System panic due to memory corruption by pullupmsg. PHNE_5304: o Multiple-range autopush. o A close routine of a STREAMS module may indefinitely sleep if it waits for its service routine to wake it up. PHNE_4702: o Panic in weld daemon. PHNE_4407: o Panic in timod for trap 15 when memory shortage occurs. PHNE_3976: o DART 15 cpp emitts warnings, "Parameter holes filled with a null string," for str_stream.h and stream.h during update or uxgen. PHNE_3022: o SO_NDELON functionality now supported. Was not provided in 9.0 original release because only needed by tty. o pullupmsg: if pullupmsg called with "len" parameter less than number of active bytes in the first mblk of the message to be pulled up, random and asynchronous panics may occur due to memory corruption. o I_PEEK ioctl returns 1 when a hangup condition exist on stream head, should return 0. o drvgetparm(PPID) returns process's parent's process id (ppid), should return process's own process id (pid). o I_LINK ioctl hangs if MUX sends message to driver being linked underneath it and the driver must process this message before the M_IOCACK for the I_LINK is sent. o TLI t_open and t_sync returned -1 and t_errno = 0 when transport provider sends an illegal state value in the T_INFO_ACK message. Fix to set t_errno to TSYSERR. o Method of device cloning described in SVR4PG which uses minor number encoding was not supported in 9.0. Add LIMITED, PARTIAL SUPPORT FOR SBE CUSTOMERS ONLY. o t_getstate() fixed to return a new state, TLI_TSTATECHNG, instead of the error TSTATECHNG when a connection is in the midst of changing state. o When a hangup condition exists on a stream head, 9.0 poll() returns revents POLLHUP|POLLIN even if no data is present at the stream head. Fixed poll() to return revents POLLHUP if no data is present and hangup condition exists. o In 9.0, a stream must be opened O_RDWR in order to use the I_PUSH and I_POP ioctls. This is more restrictive than SVR4PG, and breaks code ported from SVR4 systems. Fixed to allow I_PUSH and I_POP on streams opened O_RDONLY or O_WRONLY. o In 9.0, the following ioctls were more restrictive in requirements for whether a stream was opened for read only, write only, or both, than SVR4PG. Fixed to remove these restrictions: I_FDINSERT, I_FLUSH, I_FLUSHBAND, I_PEEK, I_RECVFD, I_SENDFD, I_LINK, I_PLINK, I_UNLINK, I_PUNLINK. SR: 1653172841 4701317065 4701306365 4701245480 4701169680 4701184382 4701191353 4701197285 4701201244 4701201251 4701201269 4701203182 4701203190 5003296889 Patch Files: /usr/lib/libnsl_s.a /etc/conf/libstream.a /etc/conf/streams/str_stream.h what(1) Output: /usr/lib/libnsl_s.a: $RCSfile: iostate.c,v $ $Revision: 1.1.509.9 $ Patch PHNE_7116 (800)/PHNE_7117 (700) $ /etc/conf/libstream.a: STREAMS: Revision: A.09.00Patch PHNE_7708 (800)/PHNE_7709 (700) 96/06/13 /etc/conf/streams/str_stream.h: str_stream.h: $Revision: 1.28 $ $Date: 94/03/22 0 6:56:15 $ sum(1) Output: 65172 166 /usr/lib/libnsl_s.a 18549 751 /etc/conf/libstream.a 6291 47 /etc/conf/streams/str_stream.h Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHNE_3022 PHNE_3976 PHNE_4407 PHNE_4702 PHNE_5304 PHNE_6277 PHNE_6561 PHNE_7117 Equivalent Patches: PHNE_7708: s800: 9.00 9.04 Patch Package Size: 540 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. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Copy the patch to your /tmp directory and unshar it: cd /tmp cp patch_source/PHNE_7709 . sh PHNE_7709 3. Become root and run update: /etc/update [-r [kernel_gen_file]] -s \ /tmp/PHNE_7709.updt PHNE_7709 Update moves the original software to /system/PHNE_7709/orig. Keep this file to recover from any potential problems. You should move the .text file to /system/PHNE_7709 for future reference. To put this patch on a magnetic tape and update from the tape drive, use dd: dd if=PHNE_7709.updt of=/dev/rmt/0m bs=2048 Special Installation Instructions: None