Patch Name: PHKL_6783 Patch Description: s700 10.01 Fix for bmap() panic and data corruption Creation Date: 96/02/07 Post Date: 96/04/01 Hardware Platforms - OS Releases: s700: 10.01 Products: N/A Filesets: OS-Core.CORE-KRN Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_6783: PANIC CORRUPTION Path Name: /hp-ux_patches/s700/10.X/PHKL_6783 Symptoms: PHKL_6783: The possible symptoms are: 1. panics with data segmentation fault: trap type 15, pcsq.pcoq = 0.790d0, isr.ior = 0.8034b544 panic: Data segmentation fault panic+0x001c trap+0x0aac $thndlr_rtn+0x0000 bmap+0x08b8 rwip+0x0518 ufs_rdwr+0x02c4 vno_rw+0x009c rwuio+0x0154 write+0x006c 2. Buffer cache corruption resulting in file-system panics or in user data corruption. The corruption would appear as being cache line aligned. Defect Description: PHKL_6783: Due to a defect in bmap(), there was a window for a race condition where bmap() could reference a buffer after it had been handed back to the buffer cache. If the buffer was already reallocated to hold less pages, bmap() could then access an invalid page causing a panic data segmentation fault. Another insidious symptom could be data corruption in the buffer cache if the released buffer was re-used and an I/O was in progress (DMA transfer): accessing the buffer data would validate data cache lines for which we would have done a data cache flush prior to starting the I/O. Looking at the buffer data after the I/O completion would then show stale data and not the data just DMA'ed into the buffer. A buffer cache rule is "access buffer data only when owning the buffer" and bmap() was breaking this rule. The race condition is more likely to occur when doing synchronous writes as with O_SYNC. SR: 5000713354 Patch Files: /usr/conf/lib/libufs.a(ufs_bmap.o) what(1) Output: /usr/conf/lib/libufs.a(ufs_bmap.o): ufs_bmap.c $Date: 96/02/06 11:55:33 $ $Revision: 1.2 2.72.20 $ PATCH_10.01 (PHKL_6783) cksum(1) Output: 4196168200 4984 /usr/conf/lib/libufs.a(ufs_bmap.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: PHKL_6784: s800: 10.01 PHKL_6092: s800: 9.00 PHKL_6093: s800: 9.04 Patch Package Size: 60 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. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_6783 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHKL_6783.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHKL_6783.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. The cluster clients must be shut down as described in step 5b. By default swinstall will archive the original software in /var/adm/sw/patch/PHKL_6783. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. Warning: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHKL_6783.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_6783.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None