Re: Any way to set the PKM in "open code".
Right. A wild branch could do anything, but I think the damage from key 0 is more likely than that you happen to hit some privileged instruction. I think you misunderstood my two bullets. The first was the potential damage from supervisor state. The second was potential damage from key 0. Much more potential for damage from the second case. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Binyamin Dissen Sent: Tuesday, June 11, 2019 12:39 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Any way to set the PKM in "open code". On Mon, 10 Jun 2019 13:57:12 -0700 Charles Mills wrote: :>> Key0 is much much more dangerous than supervisor state (IMHO) :>Interesting. I never thought of that, but I agree. Which is the more likely :>error? :>- You accidentally code some privileged instruction that you did not intend? Perhaps with a wild branch. Or you branch to user code. :>- You code the wrong register number in an instruction, or destroy or forget :>to initialize the contents of a register (at least on some code paths), or a :>register gets incremented too far? Supervisor state does not you to accidentally overwrite storage in a system key. You need to set the PSW key or use one of the explicit keyed instructions. :>Charles :> :> :>-Original Message- :>From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On :>Behalf Of Binyamin Dissen :>Sent: Sunday, June 9, 2019 11:48 PM :>To: IBM-MAIN@LISTSERV.UA.EDU :>Subject: Re: Any way to set the PKM in "open code". :> :>On Sun, 9 Jun 2019 20:15:40 -0400 Rob Schramm wrote: :> :>:>I suspect John's answer will be :>:>1) because it's cool to try new things :> :>Well, to do that he could encapsulate this code in a PC-CP with an altered :>AKM. :> :>:>2) because I want to limit the destruction if it goes wrong. :> :>Key0 is much much more dangerous than supervisor state (IMHO) :> :>:>Waiting for the real answer, :>:>Rob :>:> :>:>On Sun, Jun 9, 2019, 6:22 PM Binyamin Dissen :>:>wrote: :>:> :>:>> On Fri, 7 Jun 2019 08:57:38 -0500 John McKown < :>:>> john.archie.mck...@gmail.com> :>:>> wrote: :>:>> :>:>> :>I am not finding this. I want to change the PKM for my running, APF :>:>> :>authorized, program to include key 0. Why? So that I can switch in and :>:>> out :>:>> :>of key 0 using an SPKA instruction rather than MODESET. But mainly so :>:>> that :>:>> :>I can use the MVCSK and MVCDK instructions to read & update key 0, :>fetch :>:>> :>protected, storage without going into key 0. :>:>> :>:>> :>Or am I just being silly (again)? :>:>> :>:>> Why not simply run supervisor state which allows access to all keys? :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Fri, Jun 07, 2019 at 08:57:38AM -0500, John McKown wrote: > I am not finding this. I want to change the PKM for my running, APF > authorized, program to include key 0. Why? So that I can switch in and out > of key 0 using an SPKA instruction rather than MODESET. But mainly so that > I can use the MVCSK and MVCDK instructions to read & update key 0, fetch > protected, storage without going into key 0. > > Or am I just being silly (again)? Yes. You are already APF authorized, supervisor mode isn't that different a level of authorization. Some system routines will bypass parameter validity checking for JSCBAUTH callers. Of course, more will for supervisor or system key callers (0-7). x> Key0 is much much more dangerous than supervisor state (IMHO) Yes, much. I would recommend the use of supervisor mode, SPKA and running with a non-zero system key. I don't know IBM's position on this, however it worked really well whem I was developing IPC which allows problem mode communication between address spaces (and is a part of UCLA/Mail with source available at the cbttape site). I made the choice to run this way as at the time I was developing IPC I didn't have a VM system to test on. This was a long time ago on MVS/SP 1.1.3. I had MVS test time but most of that test time was with the understanding that while something might happen it was very low probability and others were using the system. Thus it was important to be mostly nondisruptive to other on the system. As a result, IPC code runs supervisor and an execution time parameter selected non-zero system key. This include the IPC type 1 SVC, IPC SRB routines, and IPC subsystem exit routines (EOT & EOM). Running with a non-zero protect key means it takes thought to reference a user parameter. Most areas are not just store protect but fetch protected as well. So just fetching from user storage (or a wild branch into his code) will result in a fetch exception. I did crash the system during IPC development when modifying IPC initialization code where I hadn't been as careful to avoid key zero code. Initialization only runs once, right? I had one bad base register and low storage was hit. This was above the low address protection and as I remember it, turned off some bits which told the MVS program check handler to simulate some cross memory instructions (3033 CPU). The system didn't live long after that. I quickly change the code to both fix the base register as well as switch keys so that there was much less key zero code during IPC initialization. That's the only system crash I remember from IPC development. IPC did take SDUMPs during development but these had minimal impact on the rest of the system. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Mon, 10 Jun 2019 13:57:12 -0700 Charles Mills wrote: :>> Key0 is much much more dangerous than supervisor state (IMHO) :>Interesting. I never thought of that, but I agree. Which is the more likely :>error? :>- You accidentally code some privileged instruction that you did not intend? Perhaps with a wild branch. Or you branch to user code. :>- You code the wrong register number in an instruction, or destroy or forget :>to initialize the contents of a register (at least on some code paths), or a :>register gets incremented too far? Supervisor state does not you to accidentally overwrite storage in a system key. You need to set the PSW key or use one of the explicit keyed instructions. :>Charles :> :> :>-Original Message- :>From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On :>Behalf Of Binyamin Dissen :>Sent: Sunday, June 9, 2019 11:48 PM :>To: IBM-MAIN@LISTSERV.UA.EDU :>Subject: Re: Any way to set the PKM in "open code". :> :>On Sun, 9 Jun 2019 20:15:40 -0400 Rob Schramm wrote: :> :>:>I suspect John's answer will be :>:>1) because it's cool to try new things :> :>Well, to do that he could encapsulate this code in a PC-CP with an altered :>AKM. :> :>:>2) because I want to limit the destruction if it goes wrong. :> :>Key0 is much much more dangerous than supervisor state (IMHO) :> :>:>Waiting for the real answer, :>:>Rob :>:> :>:>On Sun, Jun 9, 2019, 6:22 PM Binyamin Dissen :>:>wrote: :>:> :>:>> On Fri, 7 Jun 2019 08:57:38 -0500 John McKown < :>:>> john.archie.mck...@gmail.com> :>:>> wrote: :>:>> :>:>> :>I am not finding this. I want to change the PKM for my running, APF :>:>> :>authorized, program to include key 0. Why? So that I can switch in and :>:>> out :>:>> :>of key 0 using an SPKA instruction rather than MODESET. But mainly so :>:>> that :>:>> :>I can use the MVCSK and MVCDK instructions to read & update key 0, :>fetch :>:>> :>protected, storage without going into key 0. :>:>> :>:>> :>Or am I just being silly (again)? :>:>> :>:>> Why not simply run supervisor state which allows access to all keys? :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
> Key0 is much much more dangerous than supervisor state (IMHO) Interesting. I never thought of that, but I agree. Which is the more likely error? - You accidentally code some privileged instruction that you did not intend? - You code the wrong register number in an instruction, or destroy or forget to initialize the contents of a register (at least on some code paths), or a register gets incremented too far? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Binyamin Dissen Sent: Sunday, June 9, 2019 11:48 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Any way to set the PKM in "open code". On Sun, 9 Jun 2019 20:15:40 -0400 Rob Schramm wrote: :>I suspect John's answer will be :>1) because it's cool to try new things Well, to do that he could encapsulate this code in a PC-CP with an altered AKM. :>2) because I want to limit the destruction if it goes wrong. Key0 is much much more dangerous than supervisor state (IMHO) :>Waiting for the real answer, :>Rob :> :>On Sun, Jun 9, 2019, 6:22 PM Binyamin Dissen :>wrote: :> :>> On Fri, 7 Jun 2019 08:57:38 -0500 John McKown < :>> john.archie.mck...@gmail.com> :>> wrote: :>> :>> :>I am not finding this. I want to change the PKM for my running, APF :>> :>authorized, program to include key 0. Why? So that I can switch in and :>> out :>> :>of key 0 using an SPKA instruction rather than MODESET. But mainly so :>> that :>> :>I can use the MVCSK and MVCDK instructions to read & update key 0, fetch :>> :>protected, storage without going into key 0. :>> :>> :>Or am I just being silly (again)? :>> :>> Why not simply run supervisor state which allows access to all keys? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Mon, Jun 10, 2019 at 10:48 AM Ed Jaffe wrote: > On 6/10/2019 8:37 AM, Binyamin Dissen wrote: > > On Mon, 10 Jun 2019 08:13:23 -0700 Ed Jaffe > > > wrote: > > > > :>On 6/9/2019 11:47 PM, Binyamin Dissen wrote: > > :>> Well, to do that he could encapsulate this code in a PC-CP with an > altered > > :>> AKM. > > > > :>Altered in what way? > > > > ETDEF EKM= > > Haha! That part is obvious! :-D > > I'm asking what mask you would provide and how you believe it will help > John with his situation? > Messing around by creating a PC routine for a single application is going way outside anything that I would ever consider. I am simply going to abandon the technique I was going to use which required switching into a different key. Just way too much trouble. > > > -- > Phoenix Software International > Edward E. Jaffe > 831 Parkview Drive North > El Segundo, CA 90245 > https://www.phoenixsoftware.com/ > > > > > This e-mail message, including any attachments, appended messages and the > information contained therein, is for the sole use of the intended > recipient(s). If you are not an intended recipient or have otherwise > received this email message in error, any use, dissemination, distribution, > review, storage or copying of this e-mail message and the information > contained therein is strictly prohibited. If you are not an intended > recipient, please contact the sender by reply e-mail and destroy all copies > of this email message and do not otherwise utilize or retain this email > message or any or all of the information contained therein. Although this > email message and any attachments or appended messages are believed to be > free of any virus or other defect that might affect any computer system > into > which it is received and opened, it is the responsibility of the recipient > to ensure that it is virus free and no responsibility is accepted by the > sender for any loss or damage arising in any way from its opening or use. > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On 6/10/2019 8:37 AM, Binyamin Dissen wrote: On Mon, 10 Jun 2019 08:13:23 -0700 Ed Jaffe wrote: :>On 6/9/2019 11:47 PM, Binyamin Dissen wrote: :>> Well, to do that he could encapsulate this code in a PC-CP with an altered :>> AKM. :>Altered in what way? ETDEF EKM= Haha! That part is obvious! :-D I'm asking what mask you would provide and how you believe it will help John with his situation? -- Phoenix Software International Edward E. Jaffe 831 Parkview Drive North El Segundo, CA 90245 https://www.phoenixsoftware.com/ This e-mail message, including any attachments, appended messages and the information contained therein, is for the sole use of the intended recipient(s). If you are not an intended recipient or have otherwise received this email message in error, any use, dissemination, distribution, review, storage or copying of this e-mail message and the information contained therein is strictly prohibited. If you are not an intended recipient, please contact the sender by reply e-mail and destroy all copies of this email message and do not otherwise utilize or retain this email message or any or all of the information contained therein. Although this email message and any attachments or appended messages are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the sender for any loss or damage arising in any way from its opening or use. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Mon, 10 Jun 2019 08:13:23 -0700 Ed Jaffe wrote: :>On 6/9/2019 11:47 PM, Binyamin Dissen wrote: :>> Well, to do that he could encapsulate this code in a PC-CP with an altered :>> AKM. :>Altered in what way? ETDEF EKM= -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On 6/9/2019 11:47 PM, Binyamin Dissen wrote: Well, to do that he could encapsulate this code in a PC-CP with an altered AKM. Altered in what way? -- Phoenix Software International Edward E. Jaffe 831 Parkview Drive North El Segundo, CA 90245 https://www.phoenixsoftware.com/ This e-mail message, including any attachments, appended messages and the information contained therein, is for the sole use of the intended recipient(s). If you are not an intended recipient or have otherwise received this email message in error, any use, dissemination, distribution, review, storage or copying of this e-mail message and the information contained therein is strictly prohibited. If you are not an intended recipient, please contact the sender by reply e-mail and destroy all copies of this email message and do not otherwise utilize or retain this email message or any or all of the information contained therein. Although this email message and any attachments or appended messages are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the sender for any loss or damage arising in any way from its opening or use. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Mon, 10 Jun 2019 08:23:46 -0400 Peter Relson wrote: :>Yes there's a way -- creating a PC routine that accomplishes doing so. :>Nothing else is acceptable, although the literal answer would be "LCTL". Will be reset after an interrupt. (At least that was an issue in the past) -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Mon, Jun 10, 2019 at 7:24 AM Peter Relson wrote: > Yes there's a way -- creating a PC routine that accomplishes doing so. > Nothing else is acceptable, although the literal answer would be "LCTL". > Thanks. I was hoping for a z/OS API. The closest I could find to subvert is SYNCHX to set the PKM by using the KEYMASK= operand. There is nothing in the documentation that the new PKM must be a subset of the current PKM. But, in any case, I have decided to recode my program to not need this ability. ,KEYMASK=addrSpecifies the address of a halfword, which along with the protect key of the currently active TCB, will be an operand in an OR instruction. The results of that instruction produce the PKM of the routine to which your program will take a synchronous exit. If you specify KEYMASK, do not specify XMENV. > > Peter Relson > z/OS Core Technology Design > > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
Yes there's a way -- creating a PC routine that accomplishes doing so. Nothing else is acceptable, although the literal answer would be "LCTL". Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Sun, 9 Jun 2019 20:15:40 -0400 Rob Schramm wrote: :>I suspect John's answer will be :>1) because it's cool to try new things Well, to do that he could encapsulate this code in a PC-CP with an altered AKM. :>2) because I want to limit the destruction if it goes wrong. Key0 is much much more dangerous than supervisor state (IMHO) :>Waiting for the real answer, :>Rob :> :>On Sun, Jun 9, 2019, 6:22 PM Binyamin Dissen :>wrote: :> :>> On Fri, 7 Jun 2019 08:57:38 -0500 John McKown < :>> john.archie.mck...@gmail.com> :>> wrote: :>> :>> :>I am not finding this. I want to change the PKM for my running, APF :>> :>authorized, program to include key 0. Why? So that I can switch in and :>> out :>> :>of key 0 using an SPKA instruction rather than MODESET. But mainly so :>> that :>> :>I can use the MVCSK and MVCDK instructions to read & update key 0, fetch :>> :>protected, storage without going into key 0. :>> :>> :>Or am I just being silly (again)? :>> :>> Why not simply run supervisor state which allows access to all keys? :>> :>> -- :>> Binyamin Dissen :>> 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...@listserv.ua.edu with the message: INFO IBM-MAIN :>> :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
I suspect John's answer will be 1) because it's cool to try new things 2) because I want to limit the destruction if it goes wrong. Waiting for the real answer, Rob On Sun, Jun 9, 2019, 6:22 PM Binyamin Dissen wrote: > On Fri, 7 Jun 2019 08:57:38 -0500 John McKown < > john.archie.mck...@gmail.com> > wrote: > > :>I am not finding this. I want to change the PKM for my running, APF > :>authorized, program to include key 0. Why? So that I can switch in and > out > :>of key 0 using an SPKA instruction rather than MODESET. But mainly so > that > :>I can use the MVCSK and MVCDK instructions to read & update key 0, fetch > :>protected, storage without going into key 0. > > :>Or am I just being silly (again)? > > Why not simply run supervisor state which allows access to all keys? > > -- > Binyamin Dissen > 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...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Any way to set the PKM in "open code".
On Fri, 7 Jun 2019 08:57:38 -0500 John McKown wrote: :>I am not finding this. I want to change the PKM for my running, APF :>authorized, program to include key 0. Why? So that I can switch in and out :>of key 0 using an SPKA instruction rather than MODESET. But mainly so that :>I can use the MVCSK and MVCDK instructions to read & update key 0, fetch :>protected, storage without going into key 0. :>Or am I just being silly (again)? Why not simply run supervisor state which allows access to all keys? -- Binyamin Dissen 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...@listserv.ua.edu with the message: INFO IBM-MAIN
Any way to set the PKM in "open code".
I am not finding this. I want to change the PKM for my running, APF authorized, program to include key 0. Why? So that I can switch in and out of key 0 using an SPKA instruction rather than MODESET. But mainly so that I can use the MVCSK and MVCDK instructions to read & update key 0, fetch protected, storage without going into key 0. Or am I just being silly (again)? -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN