I wonder what the OP is really wanting to do. Long ago the SYNCH function was invented to help authorized code run "exit" code in non-authorized state. Due to my becoming corrupted by using Linux, if I need to run some non-authorized utility (say ASMA90 or IEBCOPY or ???) from authorized code, I actually use the UNIX fork() & execmvs() functions (or do a LOAD or LINK in the child, as the case may be). Of course, this requires some "fancy footwork" in the child to set up all the required DDs dynamically. But I would consider it to be very secure. Much more so that running "something" in my authorized address space. Sharing private memory is also a bit of a bother, but can be done using the UNIX shm...() functions or, more directly, using IARVSERV.
Note: most of the previous is theoritical knowledge on my part. I haven't coded much more than the fork()/execmvs() scenario to run a utility (IDCAMS to be exact), not the "shared memory" scenario. On Wed, Dec 16, 2015 at 7:16 AM, Peter Relson <[email protected]> wrote: > It is quite likely case that you do not want to use BSA. BSA was created > to help solve a problem whose nature I no longer specifically remember, > but I don't think it is anything like yours. I suggest that you look > elsewhere. > > You are authorized so you have a lot of choices with respect to using > different keys. Are you trying to avoid running in supervisor state? > If you're just trying to switch (back and forth) between TCB key and key 9 > you don't need any authorization. z/OS has set up the jobstep task's PKM > with the TCB key plus key 9 represented. SPKA is semi-privileged, so this > setup means that SPKA will work fine to switch back and forth between TCB > key and key 9. > > >The only reason listed for a Special Operation exception for BSA is if > >R6 is non-zero when returning to base authority. > > That is not what is documented. What is documented is: > R2 must be zero; otherwise, a special-operation exception is recognized. > > The PoOp is very precise. It needs to be followed with similar precision. > R2 refers to the specification in the instruction, not the contents of the > register identified by that specification. > PoOp goes on to say > > The initial contents of general registers R1 and R2 are ignored. > > Thus you would want BSA R5,0 (or BSA anyreg,0) > > Peter Relson > z/OS Core Technology Design > -- Schrodinger's backup: The condition of any backup is unknown until a restore is attempted. Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown
