Re: How to enable Storage Protection Override?

2011-11-09 Thread Peter Relson
UserKey 9 can write into CICSKey 8? that cannot be correct 
as all DFH modules would be up for overwriting.  Where 
would integrity be?

FWIW, system integrity is not a factor since in the CICS case the key 9 
user has permission to get into key 8 and do whatever a key 8 user can do.
Reliability is the reason for this function. 

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Lindy Mayfield
I love following these discussions, though I don't use this stuff at all in my 
line of work.  

I have a list of all the subpools (tacked to my wall, of course), but where do 
I find the documentation that explains these keys and what they do?

Kind regards,
Lindy


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
Peter Relson
Sent: Wednesday, November 09, 2011 2:25 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: How to enable Storage Protection Override?

UserKey 9 can write into CICSKey 8? that cannot be correct as all DFH 
modules would be up for overwriting.  Where would integrity be?

FWIW, system integrity is not a factor since in the CICS case the key 9 user 
has permission to get into key 8 and do whatever a key 8 user can do.
Reliability is the reason for this function. 

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Rob Scott
Lindy 

My own reference list for key assignments :

0   Supervisor
1   JES
2   Reserved* (used to be VSPC)
3   Reserved*
4   Reserved*
5   Data management (eg DFP)
6   VTAM and TCAM
7   IMS, DB2 and MQ
8   Problem state programs
9   CICS user
10-15   n/a 

Note that (*) for reserved does not mean that you will find no users of 
storage in these keys.

In is very common for system software products (from IBM and ISVs) to run with 
a non-problem state storage protect key and it is better for the integrity of 
the system if they choose a key that is  *not* key0 if at all possible to avoid 
unintentional overlays of supervisor control blocks. I have not seen too much 
key3 usage in the past, but have often come across key2 and key4 being used by 
products.

You should be able to spot the main users of interesting keys by entries in 
the SCHEDxx member of PARMLIB. 



Rob Scott
Lead Developer
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.617.614.2305
Email: rsc...@rs.com
Web: www.rocketsoftware.com


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
Lindy Mayfield
Sent: 09 November 2011 12:47
To: IBM-MAIN@bama.ua.edu
Subject: Re: How to enable Storage Protection Override?

I love following these discussions, though I don't use this stuff at all in my 
line of work.  

I have a list of all the subpools (tacked to my wall, of course), but where do 
I find the documentation that explains these keys and what they do?

Kind regards,
Lindy


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
Peter Relson
Sent: Wednesday, November 09, 2011 2:25 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: How to enable Storage Protection Override?

UserKey 9 can write into CICSKey 8? that cannot be correct as all DFH 
modules would be up for overwriting.  Where would integrity be?

FWIW, system integrity is not a factor since in the CICS case the key 9 user 
has permission to get into key 8 and do whatever a key 8 user can do.
Reliability is the reason for this function. 

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Lindy Mayfield
 Sent: Wednesday, November 09, 2011 6:47 AM
 To: IBM-MAIN@bama.ua.edu
 Subject: Re: How to enable Storage Protection Override?
 
 I love following these discussions, though I don't use this 
 stuff at all in my line of work.  
 
 I have a list of all the subpools (tacked to my wall, of 
 course), but where do I find the documentation that explains 
 these keys and what they do?
 
 Kind regards,
 Lindy

what they do is somewhat of a misstatement of what you want. Perhaps better 
would be how does z/OS use them?
MVS Diagnosis Reference, in the Storage Management chapter, describes subpools 
and keys.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2V2C0/1.8

--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
john.mck...@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Shmuel Metz (Seymour J.)
In
295ed806ab479944b1217cc84a173de012a69...@nwt-s-mbx1.rocketsoftware.com,
on 11/09/2011
   at 01:30 PM, Rob Scott rsc...@rocketsoftware.com said:

   6   VTAM and TCAM

TIOC and VTIOC for TSO.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Tony Harminc
On 9 November 2011 08:30, Rob Scott rsc...@rocketsoftware.com wrote:

 My own reference list for key assignments :

        0       Supervisor
        1       JES
        2       Reserved* (used to be VSPC)
        3       Reserved*
        4       Reserved*
        5       Data management (eg DFP)
        6       VTAM and TCAM
        7       IMS, DB2 and MQ
        8       Problem state programs
        9       CICS user
        10-15   n/a

 Note that (*) for reserved does not mean that you will find no users of 
 storage in these keys.

 In is very common for system software products (from IBM and ISVs) to run 
 with a non-problem state storage protect key and it is better for the 
 integrity of the system if they choose a key that is  *not* key0 if at all 
 possible to avoid unintentional overlays of supervisor control blocks. I have 
 not seen too much key3 usage in the past, but have often come across key2 and 
 key4 being used by products.

 You should be able to spot the main users of interesting keys by entries in 
 the SCHEDxx member of PARMLIB.

On older hardware consoles it was easy to configure a display of CPU
activity by key. On really old hardware (370/168 and the like), one
could turn a knob to one of 17 positions, and see total usage, or that
for each PSW key, on an analogue meter. On some newer machines it is
possible to arrange various bar graphs to the same effect, though they
lack the instant gratification of the knob and jumping meter.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Lindy Mayfield
Could this be done somehow when z/OS is running as a z/VM guest?

-Original Message-


On older hardware consoles it was easy to configure a display of CPU activity 
by key. On really old hardware (370/168 and the like), one could turn a knob to 
one of 17 positions, and see total usage, or that for each PSW key, on an 
analogue meter. On some newer machines it is possible to arrange various bar 
graphs to the same effect, though they lack the instant gratification of the 
knob and jumping meter.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-09 Thread Ed Gould
 Tony,

This brings back old memories, it is also interesting, IMO. Way back just 
before MVS came out. We were looking into getting performance numbers. If you 
can remember back in MVT days each job ran in it#39;s own protect key (1-15 if 
memory serves me). we had purchased a hardware monitor that measured CPU usage 
for each key.  We brought up MVS and all of a sudden(grin) just about the only 
key besides zero was eight showed up. The $100K monitor was useless. 

Ed

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-08 Thread Pearce, Colin E
UserKey 9 can write into CICSKey 8? that cannot be correct as all DFH modules 
would be up for overwriting.  Where would integrity be?

Key 9 is the Open key, in that any transaction running in any other key can 
write into Key 9, but NOT the other way round.

S0C4 will be raised if attempted 



Colin Pearce


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
Phil Smith III
Sent: Saturday, November 05, 2011 4:53 AM
To: IBM-MAIN@bama.ua.edu
Subject: How to enable Storage Protection Override?

CICS uses a hardware facility called Storage Protection Override to allow key 9 
to store into key 8 (but not vice versa). This is enabled on CICS startup via a 
parm in the SIT.

 

How can an APF-authorized program enable this same facility for itself?
Can't seem to find a macro or equivalent.

 

TIA for any assistance.

 

.phsiii

 

 


--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited. 
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law. 
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses. 

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
Government Agency. Attachments that are part of this EC may have additional 
important disclosures and disclaimers, which you should read. This message is 
subject to terms available at the following link: 
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-08 Thread Phil Smith III
Pearce, Colin E wrote:

UserKey 9 can write into CICSKey 8? that cannot be correct as all DFH
modules would be up for overwriting.  Where would integrity be?

 

Key 9 is the Open key, in that any transaction running in any other key can
write into Key 9, but NOT the other way round.

 

S0C4 will be raised if attempted

 

Right.that was the problem. Did you see the rest of the thread?

 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-08 Thread Jim Mulder
IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu wrote on 11/05/2011 
11:13:29 PM:

 But apparently I should be able to freely switch between keys 8  9
 using the SPKA instruction. I'm still not sure that is documented as
 GUPI or not. Yes, I'm a PITA about some of these things. Once burned,
 twice shy.

  Since CICS is a separate product (not an element of z/OS), it
is restricted to using documented interfaces.  So even though the 
key 9 stuff was intended  for CICS, it is documented as a 
Programming Interface, and you can use it.  But why you would 
want to use it, I don't know. 
 
Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-07 Thread Bill Hecox
But apparently I should be able to freely switch between keys 8  9
using the SPKA instruction. I'm still not sure that is documented as
GUPI or not. Yes, I'm a PITA about some of these things. Once burned,
twice shy.


If you are going to use the SPKA instruction, read the fine print.

'SPKA 8' will actually put you in KEY0. This is because the key has to be in 
the left nibble.
Use 'SPKA 8*16'  for KEY8. This will shift the 8 to the left 4 bits. 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-07 Thread Bill Fairchild
Here's how I solved my tendency to want to code   SPKA  8:
SPKA  KEY0
SPKA  KEY8
SPKA  KEYwhatever
 ...
KEY0  EQU   0*16
KEY8  EQU   8*16
KEYwhatever  EQU  whatever*16

And the EQU statements, inter alia, are in a macro that I copy into all my 
assemblies so I don't have to remember to code all the EQU statemetns, inter 
alia.

Bill Fairchild

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
Bill Hecox
Sent: Monday, November 07, 2011 6:26 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: How to enable Storage Protection Override?

But apparently I should be able to freely switch between keys 8  9 
using the SPKA instruction. I'm still not sure that is documented as 
GUPI or not. Yes, I'm a PITA about some of these things. Once burned, 
twice shy.


If you are going to use the SPKA instruction, read the fine print.

'SPKA 8' will actually put you in KEY0. This is because the key has to be in 
the left nibble.
Use 'SPKA 8*16'  for KEY8. This will shift the 8 to the left 4 bits. 

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-07 Thread Phil Smith III
We solved this. Our calling sequence is somewhat complex: our processing is
going to block, so we need to get off the QR. So we have a two-level call:
the user transaction calls our first-level program, which does an EXEC CICS
LINK to the second-level program, which is defined OPENAPI and THREADSAFE to
get us off the QR.

 

It turns out that the CEDA definition of the second-level program was
EXECKEY(USER); changing it to EXECKEY(CICS) fixed our problem.

 

Here's what we believe happened, depending on the STGPROT setting:

 

With STGPROT=NO:

-  All storage was key 8. 

-  Our MODESET worked fine, we were able to access user storage from
the started task.

 

With STGPROT=YES:

-  User storage (in the transaction) was key 8 (running on the QR).

-  Transaction called our first-level program, which was also
running in key 8, also on the QR.

-  Our first-level program did an EXEC CICS LINK to the second-level
program to get off the QR. However, our second-level program was also
defined as EXECKEY(USER), and thus ran in key 9. When we got control in the
Started Task, our MODESET worked, putting us into key 9 - which was, of
course, A Bad Thing at that point.

-  Once our second-level program was changed to EXECKEY(CICS), it
also ran in key 8, and thus our MODESET puts us into key 8 and all is well.

 

Thanks to all for assistance and speculation - while (due to our vague
understanding!) it wasn't all on-target, it surrounded the problem well
enough that it helped us figure it out. Definitely pays for our IBM-MAIN
subscription for the year J

 

.phsiii


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-06 Thread Binyamin Dissen
On Sat, 5 Nov 2011 22:13:29 -0500 John McKown joa...@swbell.net wrote:

:On Sat, 2011-11-05 at 18:43 -0400, Jim Mulder wrote:
:snip
:   Let me reword that to say in the environments where problem state 
: application code would be running instead of in most cases.

:  The documentation is under the KEY and PKM parameter 
: descriptions on the ATTACHX macro in Authorized Assembler Services 
: Reference. 

:Ah. I was looking for the wrong thing. I was looking for a way to change
:my PKM in the currently executing environment. Like MODESET does for CPU
:keys.

Documented approach would be via creating a PC entry with a different PKM.
Then you issue the PC and viola. But,as you are stating that the program is
supervisor state, the PKM does not provide any additional privileges - PKM is
only checked for problem state callers.

:But apparently I should be able to freely switch between keys 8  9
:using the SPKA instruction. I'm still not sure that is documented as
:GUPI or not. Yes, I'm a PITA about some of these things. Once burned,
:twice shy.

--
Binyamin Dissen bdis...@dissensoftware.com
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.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-06 Thread Peter Relson
I believe it has been answered you do not need to enable it, it is always 
enabled by z/OS on all machines that support it (which is all machines on 
which z/OS runs).

As with many queries, it would help to understand what you are trying to 
accomplish, because perhaps use of key 9 is not something that will be of 
enough benefit to make it worth your while..

One caveat, if you do not attach your task using the KEY=NINE parameter of 
ATTACHX, then be aware of the rules governing the subpool in which your 
module is placed. If it lands in subpool 251 which is fetch-protected TCB 
key. So if your program is in subpool 251 key=8, you cannot successfully 
SPKA to key 9 within that program as then you will not be able to access 
your program's instructions. If your program lands in subpool 252 (key 0, 
not fetch-protected) that will not be a problem.

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread John McKown
Perhaps the question should be: How do I get my program to run in PSW
key 9? Other than the normal, privileged, SKPA instruction. Is the
appropriate bit in CR3 (PKM portion) set to allow SPKA to set to key 9
by a problem state program? Doesn't appear to be. And I don't see a way
to set the PKM in a normal, problem state, APF program. I thought
MODESET might, but it doesn't. I guess that CICS does it via their magic
SVC.

On Fri, 2011-11-04 at 18:40 -0400, Jim Mulder wrote:
  CICS uses a hardware facility called Storage Protection Override to 
 allow
  key 9 to store into key 8 (but not vice versa). This is enabled on CICS
  startup via a parm in the SIT.
  
  How can an APF-authorized program enable this same facility for itself?
  Can't seem to find a macro or equivalent.
 
   z/OS always turns on the CR0.39 bit to enable this facility.
 You don't need to do anything to enable it.  However, it does does 
 the opposite of what you think.  The facility allows key 9 storage
 to be fetched and stored using any PSW key.
 
 Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html
-- 
John McKown
Maranatha! 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Bill Hecox
You can use MODSET KEY=ZERO to put yourself in KEY0.  Then you can modify any 
storage you have access to 
which includes the operating system. This can be dangerous. If you modify the 
wrong area of memory you can cause other programs to fail and they will have a 
difficult time figuring out what happened. The general practice is to go into 
KEY0 for only the specfic instructions that you need. Then go back to your 
normal KEY. MODESET KEY=NZERO .

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread John McKown
Get thee behind me, Satan! grin

I'm willing to write APF code, if absolutely necessary. But I never
fiddled with control blocks other than via an IBM supplied API type
interface. I know that vendors sometimes must do such things. But I find
it very scary. 

On Sat, 2011-11-05 at 09:18 -0500, Bill Hecox wrote:
 You can use MODSET KEY=ZERO to put yourself in KEY0.  Then you can
 modify any storage you have access to 
 which includes the operating system. This can be dangerous. If you modify the 
 wrong area of memory you can cause other programs to fail and they will have 
 a difficult time figuring out what happened. The general practice is to go 
 into KEY0 for only the specfic instructions that you need. Then go back to 
 your normal KEY. MODESET KEY=NZERO .
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html
-- 
John McKown
Maranatha! 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Binyamin Dissen
On Sat, 5 Nov 2011 09:18:33 -0500 Bill Hecox bill.he...@mail.com wrote:

:You can use MODSET KEY=ZERO to put yourself in KEY0.  Then you can modify any 
storage you have access to 
:which includes the operating system. This can be dangerous. If you modify the 
wrong area of memory you can cause other programs to fail and they will have a 
difficult time figuring out what happened. The general practice is to go into 
KEY0 for only the specfic instructions that you need. Then go back to your 
normal KEY. MODESET KEY=NZERO .

Of course Key0 does not bypass page, segment or low storage protection. You
need to monkey with CR's or use real storage addresses.

--
Binyamin Dissen bdis...@dissensoftware.com
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.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Binyamin Dissen
On Fri, 4 Nov 2011 16:53:09 -0400 Phil Smith III li...@akphs.com wrote:

:CICS uses a hardware facility called Storage Protection Override to allow
:key 9 to store into key 8 (but not vice versa). 

The opposite. All PSW keys match key 9.

:This is enabled on CICS
:startup via a parm in the SIT.

CICS will place USER storage in key 9 storage (and invoke USER transactions
with PSW key 9) if transaction protection is requested.

:How can an APF-authorized program enable this same facility for itself?
:Can't seem to find a macro or equivalent.

What do you want to do? 

Update key 9 storage from some other key? You have that.

Allocate Key 9? Ditto.

--
Binyamin Dissen bdis...@dissensoftware.com
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.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Jim Mulder
 Perhaps the question should be: How do I get my program to run in PSW
 key 9? Other than the normal, privileged, SKPA instruction. Is the
 appropriate bit in CR3 (PKM portion) set to allow SPKA to set to key 9
 by a problem state program? Doesn't appear to be. And I don't see a way
 to set the PKM in a normal, problem state, APF program. I thought
 MODESET might, but it doesn't. I guess that CICS does it via their magic
 SVC.

  What were you looking at to determine that Doesn't appear to be?

  In most cases, when a task is attached, the PKM in CR3
has the bits set to allow a problem-state program to do an SPKA
to the task's key (the key in TCBPKF), and key 9. 

Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread John McKown
On Sat, 2011-11-05 at 14:11 -0400, Jim Mulder wrote:
  Perhaps the question should be: How do I get my program to run in PSW
  key 9? Other than the normal, privileged, SKPA instruction. Is the
  appropriate bit in CR3 (PKM portion) set to allow SPKA to set to key 9
  by a problem state program? Doesn't appear to be. And I don't see a way
  to set the PKM in a normal, problem state, APF program. I thought
  MODESET might, but it doesn't. I guess that CICS does it via their magic
  SVC.
 
   What were you looking at to determine that Doesn't appear to be?

I'm at home and not handy to do a test on z/OS at work right now. I
tried to find this out by perusing the manuals, doing searches on PKM.
But didn't find anything that said was the default PKM in z/OS was. I
don't know if it is not documented, or I just did a poor scan. My usual
philosophy on z/OS is if it isn't documented, then it is unknown and
liable to change without notice. Well, maybe an APAR's doc would
mention such a change. But I rarely depend on test and see if it works
or not because I've done that in the past and then it went and changed
on me.

 
   In most cases, when a task is attached, the PKM in CR3
 has the bits set to allow a problem-state program to do an SPKA
 to the task's key (the key in TCBPKF), and key 9. 

Thanks. But in most cases leaves open the possibility that some times
the PKM isn't set. Again, I don't know where the doc for this is. I may
just not have found it. I tried reading a number of the manuals on z/OS
1.13 in areas that I thought were appropriate. 

Reading IBM manuals for too long causes brain damage grin. Not as
quickly as reading MS stuff. That's why GNU doesn't __do__
documentation. big grin.

 
 Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY
 

-- 
John McKown
Maranatha! 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Jim Mulder
 IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu
 
 On Sat, 2011-11-05 at 14:11 -0400, Jim Mulder wrote:
   Perhaps the question should be: How do I get my program to run in 
PSW
   key 9? Other than the normal, privileged, SKPA instruction. Is the
   appropriate bit in CR3 (PKM portion) set to allow SPKA to set to key 
9
   by a problem state program? Doesn't appear to be. And I don't see a 
way
   to set the PKM in a normal, problem state, APF program. I thought
   MODESET might, but it doesn't. I guess that CICS does it via their 
magic
   SVC.
  
What were you looking at to determine that Doesn't appear to be?
 
 I'm at home and not handy to do a test on z/OS at work right now. I
 tried to find this out by perusing the manuals, doing searches on PKM.
 But didn't find anything that said was the default PKM in z/OS was. I
 don't know if it is not documented, or I just did a poor scan. My usual
 philosophy on z/OS is if it isn't documented, then it is unknown and
 liable to change without notice. Well, maybe an APAR's doc would
 mention such a change. But I rarely depend on test and see if it works
 or not because I've done that in the past and then it went and changed
 on me.
 
  
In most cases, when a task is attached, the PKM in CR3
  has the bits set to allow a problem-state program to do an SPKA
  to the task's key (the key in TCBPKF), and key 9. 
 
 Thanks. But in most cases leaves open the possibility that some times
 the PKM isn't set. Again, I don't know where the doc for this is. I may
 just not have found it. I tried reading a number of the manuals on z/OS
 1.13 in areas that I thought were appropriate. 
 
 Reading IBM manuals for too long causes brain damage grin. Not as
 quickly as reading MS stuff. That's why GNU doesn't __do__
 documentation. big grin.

  Let me reword that to say in the environments where problem state 
application code would be running instead of in most cases.

 The documentation is under the KEY and PKM parameter 
descriptions on the ATTACHX macro in Authorized Assembler Services 
Reference. 


Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread Edward Jaffe

On 11/5/2011 4:38 AM, John McKown wrote:

Perhaps the question should be: How do I get my program to run in PSW
key 9? Other than the normal, privileged, SKPA instruction. Is the
appropriate bit in CR3 (PKM portion) set to allow SPKA to set to key 9
by a problem state program? Doesn't appear to be.


Your PKM should be 00C0.

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-05 Thread John McKown
On Sat, 2011-11-05 at 18:43 -0400, Jim Mulder wrote:
snip
   Let me reword that to say in the environments where problem state 
 application code would be running instead of in most cases.
 
  The documentation is under the KEY and PKM parameter 
 descriptions on the ATTACHX macro in Authorized Assembler Services 
 Reference. 

Ah. I was looking for the wrong thing. I was looking for a way to change
my PKM in the currently executing environment. Like MODESET does for CPU
keys.

But apparently I should be able to freely switch between keys 8  9
using the SPKA instruction. I'm still not sure that is documented as
GUPI or not. Yes, I'm a PITA about some of these things. Once burned,
twice shy.

 
 
 Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY
 

-- 
John McKown
Maranatha! 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-04 Thread Phil Smith III
I wrote:

CICS uses a hardware facility called Storage Protection Override to allow
key 9 to store into key 8 (but not vice versa). This is enabled on CICS
startup via a parm in the SIT.

How can an APF-authorized program enable this same facility for itself?
Can't seem to find a macro or equivalent.

 

I should add that TPF has a macro call STPOC that does this, BTW. I assume
that we can just change the bit in CR0 (we're APF authorized) but I'd rather
use something documented.

--

.phsiii


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to enable Storage Protection Override?

2011-11-04 Thread Jim Mulder
 CICS uses a hardware facility called Storage Protection Override to 
allow
 key 9 to store into key 8 (but not vice versa). This is enabled on CICS
 startup via a parm in the SIT.
 
 How can an APF-authorized program enable this same facility for itself?
 Can't seem to find a macro or equivalent.

  z/OS always turns on the CR0.39 bit to enable this facility.
You don't need to do anything to enable it.  However, it does does 
the opposite of what you think.  The facility allows key 9 storage
to be fetched and stored using any PSW key.

Jim Mulder   z/OS System Test   IBM Corp.  Poughkeepsie,  NY

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html