@Peter, thanks.

Please note that *I* never called it a bug. I asked for help figuring out
what was going on -- which I received. Thank you all.

> why not simply be in supervisor state so that you can use SPKA without
concern about the PKM?

I think I mentioned that I believe in "least privilege." I don't want to run
an entire LE/C++ started task in supervisor state. 

> MODESET MODE=PROB (maybe with KEY=NZERO)

My only interest in using SPKA was to avoid having to use an SVC just to
effectively reduce my privileges (key 0 to key 8). The program does this
switch from key 8 to key 0 and back over a million times per hour per LPAR
at several locations. Using an SVC to get from SUP to PROB is not any
(much?) better.

With regard to the documentation, I intend to submit an RFC this morning
suggesting that the statement about the PKM -- which applies to every
invocation of SVC MODESET, whether it specifies MODE= or not -- be moved
from the MODE= parameter to the main text.

Thanks again.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Peter Relson
Sent: Wednesday, December 14, 2016 5:39 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Question on SPKA and Control Register 3

>Yep, it is a bug.

>The PSW key mask has key 0 and key9  after the combination. Not key 8. 
>I
would
>not expect MODESET to alter the key mask.

No it is not a bug. The "expectation" is incorrect. The updating of the PKM
is fully documented and is what we wanted it to be.

If you want to be switching keys, then why not simply be in supervisor state
so that you can use SPKA without concern about the PKM?

MODESET MODE=SUP (maybe with KEY=ZERO)
... use SPKA as you will
MODESET MODE=PROB (maybe with KEY=NZERO)

I certainly have no objection to changing the documentation that currently
has this:

The MODE parameter specifies whether bit 15 of the PSW is to be set to one
or zero. When PSW bit 15 is one, the processor is in the problem state. 
For problem state, ...
 
to this:

The MODE parameter specifies whether bit 15 of the PSW is to be set to one
or zero. 

When PSW bit 15 is one, the processor is in the problem state. For problem
state, ...

This is the same wording, just not placing the "When" sentence in the same
paragraph, since regardless of the MODE parameter, every PSW has a "bit 15".

FWIW: MODESET long pre-dated the change of SPKA to be semi-privileged. 
Thus it was written "knowing" that SPKA would be done while in supervisor
state (hence the MODE=SUP...MODE=PROB pairing). The introduction of
semi-privileged SPKA coupled with the use of key=9 led to the desire to
continue allowing the switching between the "current key" and "key=9" 
while in problem state. Other key switching could/should be done in
supervisor state or, since you used the MODESET SVC to "switch from" then
using the MODESET SVC to switch back. Could additional functionality have
been provided to allow you to ask for a different set of rules when building
the PKM? Sure. But changing the rules will never happen for compatibility
reasons. And implementing additional rules will not happen unless there is
sufficient business justifiation to cover the cost (and I am skeptical that
such justification exists).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to