IBM-Main would have been a better home for the post. 

<snip>
I discovered this program 
</snip>

Curious: did you discover this program's loadmod installed on your system, 
or did you just discover the source for the program?
If the former, you should alert your support staff (and likely upper 
management) immediately.


To be completely fair, without seeing the ETDEF for this PC it is probably 
not knowable if this is or is not a "magic PC".
If the PC were defined to give control in problem state, this might not be 
an exposure, depending on the PKM that was established.

If entered in problem state, the SPKA would blow up unless the key of the 
SPKA was represented within the PKM. 
And if that PKM represented the caller's PKM, the caller already had the 
authority to do that SPKA.

Now, the odds of that being why someone created this are close to 0....

<snip>
Once this PC routine Branches back to the users code (BSM 0,1), 
the user code is running in supervisor state and would issue a PR
instruction to remove the entry from the linkage stack. I find this code 
very messy.
How would the user code return to an instruction following the BSM so the 
PC Service
Routine would issue the PR instruction ?
</snip>
We should not care that it's messy; it is unacceptable code regardless. As 
mentioned above, it is not true that the user code is necessarily running 
in supervisor state (although likely). The user code's PR would do what PR 
does when it corresponds to a PC - removing the entry from the linkage 
stack and giving control to the instruction after the PC, in the PC 
issuer's state and key (assuming that the key 0 routine did not change the 
linkage stack entry itself).

Peter Relson
z/OS Core Technology Design

Reply via email to