Patch Name: PHKL_23226

Patch Description: s700_800 11.00 syscall, msem_lock, umask cumulative patch

Creation Date: 01/01/31

Post Date: 01/01/31

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:
	No (superseded patches were critical)
	PHKL_22796: PANIC

Category Tags:
	defect_repair enhancement general_release critical panic

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

Symptoms:
	PHKL_23226:
	( SR: 8606175710 CR: JAGad44950 )
	umask(1) may incorrectly set file permission bits.

	PHKL_22796:
	(SR:8606170084 CR:JAGad39348)
	The following lightweight system calls will cause
	the system to crash if a badly written user level
	program tries to branch beyond the allowed address
	space.
	lw_lwp_setprivate, lw_lwp_getprivate, lw_get_thread_times,
	lw_lf_send, lw_lf_next_scn, cnx_lw_pmon_read, lw_mcas_util,
	and lw_nosys.

	PHKL_20245:
	( SR: 8606102049  CR: JAGab67439 )
	Desc: msem_lock() call occasionally fails w/EINVAL
	One customer finds that msem_lock() occasionally fails and
	errno is set to EFAULT. If the exactly same msem_lock()
	call is executed again, it works.

	PHKL_20236:
	( SR: 4701409169 DTS: JAGaa12229 )
	__lw_get_thread_times reports incorrect times on V-Class
	systems.  Most of the time it reports correctly but on
	occasion it will return an erroneous system time value.

Defect Description:
	PHKL_23226:
	( SR: 8606175710 CR: JAGad44950 )
	The lightweight version of the umask(2) system call was
	incorrectly manipulating 12 of the file permission bits
	instead of the correct number of 9.

	Resolution:
	Modify the lightweight version of the umask(2) system call
	to manipulate only 9 file permission bits instead of 12.

	PHKL_22796:
	(SR:8606170084 CR:JAGad39348)
	Add a check just after entering the system call to check
	if we are allowed to come into the specified address
	space.

	Resolution:
	Add an additional check.

	PHKL_20245:
	( SR: 8606102049  CR: JAGab67439 )
	Desc: msem_lock() call occasionally fails w/EINVAL
	In one customer instance, the protections in the TLB entry
	lose 'write' access and so a msem_lock() call to _mcas()
	will occasionally fail.  This results in errno 14 EINVAL
	rather than a re-try.  However, an immediate second call
	to msem_lock() does not fail.

	Resolution:
	Two lines of code, added to the lw_mcas_pageok() function,
	pre-read the page. A pre-read page fault will trap and
	cause a re-try instead of returning a fault.

	PHKL_20236:
	( SR: 4701409169 DTS: JAGaa12229 )
	__lw_get_thread_times sometimes resets the W-bit when
	returning to user-space.  This causes incorrect calculation
	of system time.  This does not happen frequently, but if
	__lw_get_thread_times() is called repeatedly, sometimes it
	will return an incorrect system time.

	Resolution:
	The __lw_get_thread_times() routine was corrected to not
	reset the wide-mode bit in the PSW when returning to the
	user.

SR:
	4701409169 8606102049 8606170084 8606175710

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(lw_scall.o)
	/usr/conf/lib/libhp-ux.a(qmml.o)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	/usr/conf/lib/libhp-ux.a(lw_scall.o)
	/usr/conf/lib/libhp-ux.a(qmml.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(lw_scall.o):
		lw_scall.s $Date: 2001/01/25 12:43:44 $Revision: r11
			ros/12 PATCH_11.00 (PHKL_23226)
	/usr/conf/lib/libhp-ux.a(qmml.o):
		qmml.s $Date: 2000/11/21 12:30:35 $Revision: r11ros/
			1 PATCH_11.00 (PHKL_22796)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	/usr/conf/lib/libhp-ux.a(lw_scall.o):
		lw_scall.s $Date: 2001/01/25 12:43:44 $Revision: r11
			ros/12 PATCH_11.00 (PHKL_23226)
	/usr/conf/lib/libhp-ux.a(qmml.o):
		qmml.s $Date: 2000/11/21 12:30:35 $Revision: r11ros/
			1 PATCH_11.00 (PHKL_22796)

cksum(1) Output:
	
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP:
	1049670679 9564 /usr/conf/lib/libhp-ux.a(lw_scall.o)
	101219021 4096 /usr/conf/lib/libhp-ux.a(qmml.o)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	3567640727 14592 /usr/conf/lib/libhp-ux.a(lw_scall.o)
	3832579934 5880 /usr/conf/lib/libhp-ux.a(qmml.o)

Patch Conflicts: None

Patch Dependencies:
	s700: 11.00: PHKL_18543
	s800: 11.00: PHKL_18543

Hardware Dependencies: None

Other Dependencies: None

Supersedes:
	PHKL_22796 PHKL_20245 PHKL_20236

Equivalent Patches: None

Patch Package Size: 70 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_23226

	5. Run swinstall to install the patch:

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

	By default swinstall will archive the original software in 
	/var/adm/sw/save/PHKL_23226.  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_23226.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_23226.text file is 
	available in the product readme:

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

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

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

Special Installation Instructions:
	This patch depends on base patch PHKL_18543.
	For successful installation please insure that PHKL_18543
	is already installed, or that PHKL_18543 is included
	in the same depot with this patch and PHKL_18543
	is selected for installation.

