> I must admit that
> ORG *-32
> DC X'00000008'
> puzzles me since ...
It's VSE code, so the offsets are different. I assembled the code. (I
removed a bunch of blanks to make it fit the email better):
007A 0A6B 0000006B 46+ SVC 107
47 MODESET MODE=PROB Return to Problem State
48+* MODESET VSE-ESA 2.1.0
007C 49+ CNOP 0,4
007C 4510 F084 00000084 50+ BAL 1,*+8
0080 00000004 51+ DC B'00000000000000000000000000000100'
0084 5810 1000 00000000 52+ L 1,0(0,1)
53+* SUPERVISOR - SIMSVC - 5686-032
0088 58F0 0010 00000010 54+ L 15,16(0,0) GET CVT ADDRESS
008C 91A8 F074 000000A8 55+ TM X'74'(15),X'A8' EXECUTING ON VSE?
0090 47E0 F09A 0000009A 56+ BNO *+10 NO, SKIP SIMULATION
0094 47000000 57+ DC X'47000000' RESTORE REGISTER
0098 0A83 00000083 58+ SVC 131 ENTER MVS SVC
SIMULATION
009A 47000000 59+ DC X'47000000' RESTORE REGISTER
009E 0A6B 0000006B 60+ SVC 107
00A0 000000A0 00000080 61 ORG *-32
0080 00000008 62 DC X'00000008'
0084 00000084 000000A0 63 ORG
Tony Thigpen
-----Original Message -----
From: Peter Relson
Sent: 08/07/2014 07:45 AM
A supervisor state program's updating of CR3 is surely not supported but
is impossible to prevent. As with many things it will work in some cases.
There could be points at which the system chooses to reset the PKM to what
it should be. Even for this case it should be noted that keys 10-15 are
really not appropriate for V=V programs; they are reserved for V=R
programs.
The particular STCTL / OC / LCTL sequence (which should have used
OI WORK+1,X'03' rather than OC anyway) changes bits 14 and 15 of the PKM
(PSW Key Mask). The PKM is architecturally used to validate authorization
to things like SPKA (i.e., what keys may a problem state program switch
to) and PC's (in what keys may a problem state program issue the PC). It
is also used within the code target routines to validate access. One of
the effects of the update is thus that, after leaving supervisor state,
the program could still issue SPKA to get to key 14 or 15.
I must admit that
ORG *-32
DC X'00000008'
puzzles me since it appears to overlay the 2nd halfword of the LCTL
instruction and the first two bytes of the first instruction of the
MODESET that follows the LCTL (which, depending on the location counter,
could be a NOPR instruction or a BAL instruction. Am I misreading?
Peter Relson
z/OS Core Technology Design