Patch Name: PHKL_27698 Patch Description: s700_800 11.00 diag0 cumulative patch Creation Date: 02/10/26 Post Date: 02/10/29 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_27698: PANIC MEMORY_LEAK CORRUPTION PHKL_21569: PANIC PHKL_19321: HANG PHKL_18490: CORRUPTION Category Tags: defect_repair hardware_enablement enhancement general_release critical panic halts_system corruption memory_leak Path Name: /hp-ux_patches/s700_800/11.X/PHKL_27698 Symptoms: PHKL_27698: ( SR:8606247744 CR:JAGae14144 ) When a 32-bit application running on a 64-bit operating system accesses the diag0 driver, the system may panic with a data page fault. The panic stack trace may be similar to the following: panic+0x14 report_trap_or_int_and_panic+0x80 trap+0xdb8 nokgdb+0x8 lbcopy_pcxu_method+0x8 privlbcopy+0x1c diag0_send_msg+0xac diag0_strategy+0xbc physio+0x178 diag0_write+0x188 spubind_cdev_write+0x84 spec_rdwr+0x18c vno_rw+0x1d4 write+0x104 syscall+0x480 $syscallrtn+0x0 PHKL_21569: (SR: 8606134469 CR: JAGad03604) Hardware monitors which are designed for SCSI peripherals connected to the system via HP-PB bus, may panic the system if any of the pages in the diag0 buffer is read access only. The panic is a data memory protection fault. System must be an architecture 2.0 system with cache coherency (CCIO). The stack trace when diag0 communicates through the scsi3 driver is as follows: panic+0x10 report_trap_or_int_and_panic+0xe8 interrupt+0x458 $ihndlr_rtn+0x0 lbcopy_gr_method+0xb0 privlbcopy+0x1c s3_dma_A_empty_buflets+0x2f0 s3_tr_status_exp+0xb8 s3_int_direct+0x400 scsi3+0x74 io_send+0x1d4 int_direct+0x68 mp_ext_interrupt+0x2a0 $RDB_int_patch+0x58 The diag0 driver will hang on systems without CCIO. PHKL_19321: telnet and rlogin into the system hang. May also see a system hang. The problem has been seen on T600 systems (although it could occur on other systems) running on-line diagnostic tool on NIO Fast/Wide SCSI Interface cards. PHKL_18490: The STM disk tools and AutoRAID Manager (or any other utilities using the diag0 driver) hang or fail to respond on K-Class systems running a 64-bit OS. User may also see kernel and/or user-space data corruption. PHKL_17594: STM disk/cd-rom on-line diagnostic tools on S800 systems with large number of disks/cd-rom will exit with incomplete status on some devices. Defect Description: PHKL_27698: ( SR:8606247744 CR:JAGae14144 ) The diag0 driver does not synchronize the write() system call. As a result, multiple threads could reference the same port and could allocate, deallocate or modify the same user data structure. Simultaneous allocation and deallocation by different threads can result in memory leaks, and simultaneous modification of the same user data structure can result in data corruption. This problem is only seen on 32-bit applications running on a 64-bit OS. Resolution: Code for allocating memory and setting up the user data structure has been moved from the driver's write routine to the strategy routine. PHKL_21569: (SR: 8606134469 CR: JAGad03604) diag0 does not do anything with the pages of the diag0 buffer from user space. The system panics when the I/O driver tries to write data to the diag0 buffer and the page only has read access. Resolution: The call to physio with diag0 was changed to pass in B_READ instead of B_WRITE, which will make sure all pages in the diag0 buffer have read and write access. PHKL_19321: Diag0 falls into a loop if the release of the port fails. Resolution: Modified code to handle the case when the release of the port fails. PHKL_18490: The diag0 patch PHKL_17594 allocated insufficient memory to hold a data structure. In writing the data structure, the kernel writes beyond the allocated space, causing corruption. This will occur on a 64-bit OS only. Resolution: Diag0 now allocates the correct amount of memory for the data structure. PHKL_17594: Diag0 diagnostic driver does not allow access to NIO devices with port numbers higher than 1536. Resolution: Redesigned diag0 internal structure to remove this limitation. Enhancement: No (superseded patches contained enhancements) PHKL_27698: Enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 4701419481 4701424689 4701431098 8606133469 8606247744 Patch Files: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(diag0.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(diag0.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(diag0.o): diag0.c $Date: 2002/08/19 23:05:54 $Revision: r11ros /8 PATCH_11.00 (PHKL_27698) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(diag0.o): diag0.c $Date: 2002/08/19 23:05:54 $Revision: r11ros /8 PATCH_11.00 (PHKL_27698) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 2014832851 18936 /usr/conf/lib/libhp-ux.a(diag0.o) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 3402203674 65352 /usr/conf/lib/libhp-ux.a(diag0.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_21569 PHKL_19321 PHKL_18490 PHKL_17594 Equivalent Patches: None Patch Package Size: 110 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_27698 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_27698.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_27698. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_27698.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_27698.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_27698.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None