Patch Name: PHKL_21569

Patch Description: s700_800 11.00 more devices, data corrupt, hang, and panic

Creation Date: 00/04/17

Post Date: 00/04/25

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_21569: PANIC
	PHKL_19321: HANG
	PHKL_18490: CORRUPTION

Category Tags:
	defect_repair hardware_enablement enhancement
	general_release critical panic halts_system corruption

Path Name: /hp-ux_patches/s700_800/11.X/PHKL_21569

Symptoms:
	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_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.

SR:
	4701419481 4701424689 4701431098 8606133469

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: 2000/04/17 15:55:21 $Revision: r11ros
			/7 PATCH_11.00 (PHKL_21569)

	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: 2000/04/17 15:55:21 $Revision: r11ros
			/7 PATCH_11.00 (PHKL_21569)

cksum(1) Output:
	
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP:
	1327670901 18752 /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:
	3402024733 64936 /usr/conf/lib/libhp-ux.a(diag0.o)

Patch Conflicts: None

Patch Dependencies: None

Hardware Dependencies: None

Other Dependencies: None

Supersedes:
	PHKL_19321 PHKL_18490 PHKL_17594

Equivalent Patches:
	PHKL_21568:
	s800: 10.20

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_21569

	5. Run swinstall to install the patch:

		swinstall -x autoreboot=true -x patch_match_target=true \
			  -s /tmp/PHKL_21569.depot

	By default swinstall will archive the original software in 
	/var/adm/sw/save/PHKL_21569.  If you do not wish to retain a
	copy of the original software, use the patch_save_files option:

		swinstall -x autoreboot=true -x patch_match_target=true \
			  -x patch_save_files=false -s /tmp/PHKL_21569.depot

	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_21569.text file is 
	available in the product readme:

		swlist -l product -a readme -d @ /tmp/PHKL_21569.depot

	To put this patch on a magnetic tape and install from the
	tape drive, use the command:

		dd if=/tmp/PHKL_21569.depot of=/dev/rmt/0m bs=2k

Special Installation Instructions: None

