Overlaying of Storage key



Ask about System customization & performance, Workload management, I/O device configuration etc.

Overlaying of Storage key

Postby jaggz » Fri Nov 16, 2012 9:30 pm

Hello All,

Its just a general question for knowledge sake. Under what are the circumstance the storage keys are overlaid in the system i,e.. any Badly written program which does this problem ?

Any enlightment would be highly appreciated.

Jaggz
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm
Has thanked: 8 times
Been thanked: 5 times

Re: Overlaying of Storage key

Postby steve-myers » Fri Nov 16, 2012 10:08 pm

Certainly a badly written program can overlay storage keys, but it would be difficult. The last time I, personally, did anything with storage keys must have been more than 40 years ago when I keyed in (from the operator's console) a tiny program to investigate what appeared to be storage key problem with some brand X LCS memory connected to a 360/75. Since the primary drivers of S0C4 ABENDs these days are page faults or low storage protect issues rather than traditional storage key faults, people just don't think in terms of storage keys very often. I'm too lazy to bring up a POP, but aren't SSK/ISK real address driven rather than virtual address driven?
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Overlaying of Storage key

Postby enrico-sorichetti » Fri Nov 16, 2012 10:16 pm

You do not overlay storage keys, You overlay storage.
The storage keys are a way of protecting storage from being overwritten

see
ABCs of z/OS System Programming Volume 10 - IBM Redbooks
http://www.redbooks.ibm.com/abstracts/s ... .html?Open
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Overlaying of Storage key

Postby steve-myers » Fri Nov 16, 2012 10:55 pm

Mr. Sorichetti is correct in the sense that only SSK/SSKE type instructions can set storage keys; ordinary instructions cannot touch (or read) storage keys.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Overlaying of Storage key

Postby enrico-sorichetti » Fri Nov 16, 2012 11:35 pm

but aren't SSK/ISK real address driven rather than virtual address driven?


SSKE and ISKE both expect REAL addresses

there is a IVSK which expects a VIRTUAL address

my previous comment was about normal programs ...
I wonder how many application only programmers are <aware> of the storage keys mangling instructions :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Overlaying of Storage key

Postby steve-myers » Sat Nov 17, 2012 12:26 am

enrico-sorichetti wrote:... I wonder how many application only programmers are <aware> of the storage keys mangling instructions :mrgreen:
Probably not many.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Overlaying of Storage key

Postby dick scherrer » Sat Nov 17, 2012 1:07 am

Probably best that most do not - especially fearless newbies . . .

It might be considered a "feature" to try and exploit ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Overlaying of Storage key

Postby jaggz » Sat Nov 17, 2012 10:32 am

Hi,

As usual you guys have given a great knowledge. Thanks a lot again. Objective behind my question was some time back in our shop an application programmer ran a program which overlaid the key storages and we understood from the dump.


Jaggz
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm
Has thanked: 8 times
Been thanked: 5 times

Re: Overlaying of Storage key

Postby steve-myers » Sat Nov 17, 2012 12:10 pm

jaggz wrote:Hi, ... Objective behind my question was some time back in our shop an application programmer ran a program which overlaid the key storages and we understood from the dump. ..


This makes absolutely no sense. All programs have some sort of "key storage" - either the program text itself or data, or both - that the program must have to run properly. This has absolutely nothing to do with storage keys used for storage protection. Most programs alter in some fashion, this storage. It is quite common for programs to improperly alter this storage because of errors in the program; this may account for the "overlaid the key storages" statement

In MVS and z/OS, most user programs are run using program and data in storage protected using key 8. For the most part a program running in key 8 in address space A is protected from a program running in address space B, also in key 8, by the paging hardware, even though the two programs frequently use common virtual addresses. I have been using MVS and z/OS systems for nearly 40 years, and I cannot recall any incident in which a problem state key 8 through 15 program accessed data in another address space.

Some programs are run using storage keys 0 through 7. There are several ways these keys are assigned which I won't discuss here. Collectively these storage keys are considered "authorized." There is only one way, to the best of my knowledge, which I will not discuss here, that an otherwise unauthorized program can be run using storage keys 0 through 7. This method is very tightly controlled, for obvious reasons.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to System programming

 


  • Related topics
    Replies
    Views
    Last post