On Sat, 26 Jun 2010 00:34:30 -0500 Chris Craddock <[email protected]>
wrote:

:>I can't believe how often the old chestnut about running in key zero versus 
user ket comes up. There is nothing inherently risky running in key zero - 
presuming of course that you're not a cowboy coder who fails to validate input 
and output areas. Store instructions only go where you point them. The overlay 
bogey is shorthand for sloppy coding.

Yes, I will admit it. I have had bugs in my code.

I also, within supervisor state code, check counters for reasonable values -
for example, if reducing a use count, make sure the count isn't zero before
reducing it. That catches bugs, which, as I have already admitted, have
existed in code of mine. And even after testing finds bugs and they are
corrected I still leave these checks in code going into the field - since it
is better to detect the error early rather than try to debug the overlay
later.

:>As for running in key 8 in an SRB, it is certainly NOT necessary (there are 
mixed key instructions for safely moving data to/from caller storage) and 
furthermore it is actually a bad idea for a number of reasons. First, it is a 
fairly unusual condition for an SRB to run in - potentially causing serious 
astonishment (I.e. Generally a bad idea) in called code, but here's my personal 
favorite dingbat reason... Running an SRB in a user key is a probable integrity 
violation if the SRB uses user key storage for work areas, save areas etc. So 
the ostensible "ooh it is safer in user key" is just a crock.

So your suggestion is to store and MVCK?

What parts of code (or the operating system) would be "astonished" to find
that an SRB is running in a non-system key? Would you expect that a resolvable
page fault would cause MVS to abend the SRB because it isn't in key 0?

If the callers areas are in Key8 it need not follow that the SRB work areas
are in key8.

:>For the record, I have never once run an SRB in anything but a system PSW 
key, and wouldn't. There's just no reason to

I guess that you are a better man than me.

:>> Date: Thu, 24 Jun 2010 20:37:29 +0300
:>> From: [email protected]
:>> Subject: Re: Data exception in SRB routine
:>> To: [email protected]
:>>
:>> On Thu, 24 Jun 2010 11:53:40 -0500 Chris Craddock <[email protected]>
:>> wrote:
:>>
:>> :>>
:>> :>> Got a data exception with reason code 7  for an STD instruction in an
:>> :>> SRB routine :
:>> :>> 00000000 *PGM    007 078C2000 D43615B6  00040007 00000000
:>> :>> The instruction STD FR10,...
:>> :>> As far as I see , the control reg 0 , bit 45 (AFP control) is on .
:>> :>> (It is a z9 S07)

:>> :>An SRB routine running in PSW key 8?!? WTF?

:>> Nothing at all wrong with that. It knows that the areas that it needs to
:>> modify are in key8.

:>> It is a quite bad practice to run in key0 when it is not needed. All sorts 
of
:>> bad overlays can happen.

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

Reply via email to