Patch Name: PHKL_6762 Patch Description: s700 10.00 NFS and O_SYNC cumulative patch Creation Date: 96/02/23 Post Date: 96/02/28 Hardware Platforms - OS Releases: s700: 10.00 Products: N/A Filesets: OS-Core.CORE-KRN Automatic Reboot?: Yes Status: General Release Critical: No (superseded patches were critical) PHKL_5593: PANIC Path Name: /hp-ux_patches/s700/10.X/PHKL_6762 Symptoms: PHKL_6762: Several types of symptoms may occur: - logins on NFS clients may receive incorrect access on NFS servers - files from NFS servers may appear to be owned by the wrong logins on NFS clients - setuid and setgid binaries available on NFS servers may allow client logins to run with incorrect access PHKL_5957: This new and improved version of the patch provides the 9.0X O_SYNC behavior on 10.0 NFS server systems. The previous version of the patch only worked for UFS and VxFS. In 9.0X releases, the NFS server code will perform synchronous writes for data, but asynchronous writes for mod times. In 10.0X releases, the NFS server code will perform synchronous writes for data, but also synchronous writes for mod times. This causes a significant performance degradation when compared with the 9.0X releases. This patch provides a workaround for this situation. This new patch should be installed on both the client and server systems. Setting the global switch 'o_sync_is_o_dsync' on the server will force the NFS server code to do asynchronous writes for mod times which should improve performance significantly. Setting the global switch on the client will not affect the behavior of NFS writes, but will affect the behavior of UFS and VxFS writes (as it did with the previous version of the patch). Please, see the information below to learn how to set the on how to set the global switch. PHKL_5702: In 9.X releases, the performance and semantics of O_SYNC were the same as the 10.0X O_DSYNC. Unfortunately, this was a violation of the POSIX standard which was fixed for the 10.0X releases. The consequence of the change was to make O_SYNC more robust but also slower than in the 9.0X releases. You could argue that it is now behaving as per POSIX and you could also argue that HP broke binary compatibility. So... if you have applications that use O_SYNC and you want them to behave is in 9.0X, then you should install this patch. IN ADDITION, you should manually modify the global variable o_sync_is_o_dsync using adb as follows: echo "o_sync_is_o_dsync?W 1" | \ adb -k -w /stand/vmunix /dev/mem echo "o_sync_is_o_dsync/W 1" | \ adb -k -w /stand/vmunix /dev/mem You can do this after the system is up and running without any problems. You can also go back to the 10.0X behavior by re-executing the command lines using a 0 instead of a 1 If you rebuild the kernel, you'll have to re-execute the commands using a 1, since the default value is 0. PHKL_5593: Trap 18 unaliged data access panic can occur when PC NFS client running version 5.1 uses "dir" on an NFS file system Defect Description: PHKL_6762: A future HP-UX release will increase the value of MAXUID, providing for a greater range of valid UIDs and GIDs. It will also introduce problems in mixed-mode NFS environments. Let "LUID" specify a machine running a version of HP-UX with large-UID capability. Let "SUID" specify a machine with current small-UID capability. The following problems may occur: LUID client, SUID server - A previous patch (PHKL_5079) makes client logins with UIDs outside the server's range appear as the anonymous user. However, the anonymous user UID is configurable, and is sometimes configured as the root user (in order to "trust" all client root logins without large-scale modifications to the /etc/exports file). Thus, all logins with large UIDs on the client could be mapped to root on the server. - If this previous patch has not been applied, files created by logins with large UIDs on the client will have the wrong UID on the server. This could be exploited by particular UIDs to gain root access on the server. - Files owned by the nobody user on the server will appear to be owned by the wrong user on the client. SUID client, LUID server - Files owned by large-UID logins on the server will appear to be owned by the wrong user on the client. - Executables with the setuid or setgid mode turned on will allow logins on the client to run as the wrong users. PHKL_5957: This new and improved version of the patch provides the 9.0X O_SYNC behavior on 10.0 NFS server systems. The previous version of the patch only worked for UFS and VxFS. This patch is intended for customers experiencing NFS performance problems and who do not care about the integrity of mod times on the server. It is also intended for those customers running 9.0X apps on their 10.0 system. PHKL_5702: This patch provides the 9.0X O_SYNC behavior on a 10.0X system. On a 10.0X system, this is called O_DSYNC. The patch is primarily intended for customers that are running 9.0X applications on their 10.0X systems. PHKL_5593: Defect in kernel routine generic_readdir2(), which allocates a temp buffer of twice the number of bytes requested by the caller and indexes halfway into the buffer. If the caller requests number of bytes not divisible by 4, index into halfway into temp buffer will trap 18. SR: 1653134924 4701293142 4701314302 5003279927 Patch Files: /usr/conf/lib/libhp-ux.a(kern_dscrp.o) /usr/conf/lib/libhp-ux.a(kern_exec.o) /usr/conf/lib/libhp-ux.a(vfs_scalls.o) /usr/conf/lib/libnfs.a(nfs_server.o) /usr/conf/lib/libnfs.a(nfs_subr.o) /usr/conf/lib/libufs.a(ufs_dir.o) what(1) Output: /usr/conf/lib/libhp-ux.a(kern_dscrp.o): kern_dscrp.c $Date: 95/08/21 14:51:29 $ $Revision: 1.61.91.3 $ PATCH_10.0 (PHKL_5957) /usr/conf/lib/libhp-ux.a(kern_exec.o): kern_exec.c $Date: 96/02/22 14:01:57 $ $Revision: 1 .90.91.2 $ PATCH_10.0 (PHKL_6762) /usr/conf/lib/libhp-ux.a(vfs_scalls.o): vfs_scalls.c $Date: 95/08/21 14:53:41 $ $Revision: 1.15.91.4 $ PATCH_10.0 (PHKL_5957) /usr/conf/lib/libnfs.a(nfs_server.o): nfs_server.c $Date: 96/02/22 14:02:27 $ $Revision: 1.20.91.4 $ PATCH_10.0 (PHKL_6762) /usr/conf/lib/libnfs.a(nfs_subr.o): nfs_subr.c $Date: 96/02/22 14:02:53 $ $Revision: 1. 17.91.2 $ PATCH_10.0 (PHKL_6762) /usr/conf/lib/libufs.a(ufs_dir.o): ufs_dir.c $Date: 96/02/22 14:00:32 $ $Revision: 1.1 8.91.5 $ PATCH_10.0 (PHKL_6762) cksum(1) Output: 119263965 10972 /usr/conf/lib/libhp-ux.a(kern_dscrp.o) 4249611381 15168 /usr/conf/lib/libhp-ux.a(kern_exec.o) 1807663641 22248 /usr/conf/lib/libhp-ux.a(vfs_scalls.o) 3266545148 26572 /usr/conf/lib/libnfs.a(nfs_server.o) 1536835837 20844 /usr/conf/lib/libnfs.a(nfs_subr.o) 916698416 18196 /usr/conf/lib/libufs.a(ufs_dir.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_5593 PHKL_5702 PHKL_5957 Equivalent Patches: PHKL_6758: s800: 9.00 PHKL_6759: s700: 9.01 PHKL_6760: s700: 9.03 9.05 9.07 PHKL_6761: s800: 9.04 PHKL_6868: s800: 10.00 Patch Package Size: 170 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_6762 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHKL_6762.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_6762.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_6762. 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_6762.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_6762.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None