PJ41488: ISSUE WITH KEYCC OVERRIDE=YES
Closed as program error.
See Problem Sumary
APAR NUMBER: PJ41488 PRODUCT: z/TPF FUNCTIONAL AREA: SYSTEM TASK DISPATCHER (CPU LOOP) SHIPPED IN PUT: 10 ABSTRACT: A CTL-3 may happen following a C function call to tpf_stpoc() that uses the TPF_STPOC_RESTORE option. PACKAGE CONTENTS: Source Segments: (C) base/cp/cicr.cpy (C) base/rt/csnapc.asm Object Only Binaries: None. Configuration Independent Binaries: None. Support Files: None. OTHER BINARIES TO BUILD: YES (C) <sys>/load/CPS0.so (C) <sys>/obj/ccnucl.o (C) <sys>/obj/csnapc.o (C) <sys>/stdlib/libCTAL.so (C) <sys>/stdload/CTAL.so COMMENTS: C function tpf_stpoc() is used to turn on and turn off storage protect override. If tpf_stpoc() is called using the TPF_STPOC_ON option, storage protect override is turned on and the current PSW key value is saved in the second parameter: stpoc_value. Subsequently, if tpf_stpoc() is called using the TPF_STPOC_RESTORE option, the PSW key is reset based on the value that was saved on the tpf_sptoc(TPF_STPOC_ON, stpoc_value) call. The service routine for C function tpf_stpoc(TPF_STPOC_ON, stpoc_value) calls macro KEYCC OVERRIDE=YES to turn on storage protect override. The KEYCC service routine saves the current PSW key and previous storage protect override settings in ECB page 2 field CE2CSTPOC. The tpf_stpoc() service routine copies the value in CE2CSTPOC into the second parameter, stpoc_value. When the KEYCC OVERRIDE=YES service routine sets CE2CSTPOC, the logic obtains the current PSW key from prefix page field PFX2SVPS1. PFX2SVPS1 is part of field PFX2SVPSW. For KEYCC OVERRIDE=YES, PFX2SVPSW is initialized when KEYCC returns to the caller. As a result, when KEYCC OVERRIDE=YES is executed, PFX2SVPSW does not contain the SVC OLD PSW for KEYCC, rather it contains the value for the previous SVC call. If the KEYCC OVERRIDE=YES is the first SVC for this ECB after it gained control, PFX2SVPSW will have the SVC information for another ECB. The PSW key may be different. Because KEYCC OVERRIDE=YES may save the wrong key in CE2CSTPOC, tpf_stpoc(TPF_STPOC_ON, stpoc_value) may also save the wrong key in stpoc_value and tpf_stpoc(TPF_STPOC_RESTORE, stpoc_value) may restore the wrong key. If the PSW key is 0 before the tpf_stpoc(TPF_STPOC_ON, stpoc_value) but key 1 is saved in stpoc_value, the tpf_sptoc(TPF_STPOC_RESTORE, stpoc_value) will set the PSW key to 1. Subsequent logic may take a CTL-3 if it expects that the PSW key to be 0. In another issue, if storage protect override is active when C function snapc() is called, storage protect override will be off when snapc() returns. This can be an issue if a snapc dump is inserted in code where storage protect override is active.
SOLUTION: The KEYCC OVERRIDE=YES service routine in CCNUCL cicr.cpy is changed. The current PSW key is obtained from prefix page field PFX2SVCOPSW, which is SVC OLD. In addition, KEYRC also saves the previous key in ECB page 2 field CE2CSTPOC and it had the same issue as KEYCC. The KEYRC service routine in cicr.cpy is changed to get the current PSW key from PFX2SVCOPSW. The service routine for C function snapc() in csnapc.asm is changed. At the start of snapc(), the current storage protect override setting is saved. When snapc() is complete, storage protect override is turned on based on the saved value. COREQS: NO None. MIGRATION CONSIDERATIONS: NO None. BUILD COMMANDS AND INSTRUCTIONS: YES #maketpf commands for linux maketpf -f CTAL csnapc.o maketpf -f CPS0 ccnucl.o maketpf CTAL link TPF_VERIFY_LINK_REFS=NO maketpf CPS0 link maketpf CTAL link UPDATED INFORMATION UNITS: NO None. See your IBM representative if you need additional information. DOWNLOAD INSTRUCTIONS: http://www.ibm.com/software/htp/tpf/maint/maintztpf.html APAR URL: http://www.ibm.com/software/htp/tpf/ztpfmaint/put10/PJ41488.htm
Reported component name
Reported component ID
NoSpecatt / Xsystem
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
Fixed component ID
Applicable component levels
Translate this page: