Re: Testing for key 8

2013-12-29 Thread Shmuel Metz (Seymour J.)
In , on 12/27/2013 at 06:31 PM, zMan said: >Is there a simpler way to see whether we were called in key 8 (not >that this is that complicated): > EPSW R14,R0Extract PSW > SLL R14,8 Get key bits in left-most nibble > SRL R14,28Now isolate in

Re: Testing for key 8

2013-12-28 Thread zMan
Right, I meant the *client* needs to make some decisions based on the environment. I know the STC can't trust the client. On Sat, Dec 28, 2013 at 4:09 PM, Binyamin Dissen wrote: > I don't know why you are checking the key on the client side, but your PC > routine cannot really count on the filt

Re: Testing for key 8

2013-12-28 Thread Binyamin Dissen
I don't know why you are checking the key on the client side, but your PC routine cannot really count on the filtering by the client side - if it will be setting a client passed protected storage location or accessing something that the client could not directly access it will need to validate the

Re: Testing for key 8

2013-12-28 Thread zMan
This is the client side of an API which is going to do a PC to a started task. It can be called from "plain" code, or on occasion from a DB2 user exit. I want to know if it's a user exit, hence I'm testing the key. If "non-system key" is the real answer, then yeah, the IPK approach looks a bit bett

Re: Testing for key 8

2013-12-28 Thread Binyamin Dissen
On Fri, 27 Dec 2013 18:31:17 -0500 zMan wrote: :>Is there a simpler way to see whether we were called in key 8 (not that :>this is that complicated): :> EPSW R14,R0Extract PSW :> SLL R14,8 Get key bits in left-most nibble :> SRL R14,28Now isol

Re: Testing for key 8

2013-12-28 Thread Chip Grantham
Simple but more CPU is the testauth macro with keys keyword. Sent from my iPhone On Dec 28, 2013, at 9:12 AM, "Peter Relson" wrote: >> Is there a simpler way to see whether we >> were called in key 8 > > I think that the odds are high that you should not be testin

Re: Testing for key 8

2013-12-28 Thread Peter Relson
>Is there a simpler way to see whether we >were called in key 8 I think that the odds are high that you should not be testing for "key 8". Rather you should be testing for "non-system key" i.e., key 8-15. Note also that if you were entered by PC that might have cha

Re: Testing for key 8

2013-12-27 Thread Ed Jaffe
On 12/27/2013 3:31 PM, zMan wrote: Is there a simpler way to see whether we were called in key 8 (not that this is that complicated): EPSW R14,R0Extract PSW SLL R14,8 Get key bits in left-most nibble SRL R14,28Now isolate in bottom nibbl

Re: Testing for key 8

2013-12-27 Thread Scott Ford
ZMan, You not the only one, I had to look up EPSW, hadn't used it before Scott ford www.identityforge.com from my IPAD 'Infinite wisdom through infinite means' > On Dec 27, 2013, at 11:13 PM, zMan wrote: > > Yeah, true. I guess having grown up worried more about memory than CPU, I'd > never

Re: Testing for key 8

2013-12-27 Thread zMan
Yeah, true. I guess having grown up worried more about memory than CPU, I'd never have chosen that route, but it's clearly equally valid. Or maybe N R14,=X'00F0' and then CLM R14,B'0100',=X'80'... whee, I saved 3 bytes! (Also not sure whether two RS instructions are faster than two shifts and a

Re: Testing for key 8

2013-12-27 Thread John Gilmore
You can avoid shifts and save one instruction by ANDing the PSW value with x'00F0' and testing the result for equality with x'0080', but there is not much fat to be squeezed out of what you are doing now. John Gilmore, Ashland, MA 01721 - USA -

Testing for key 8

2013-12-27 Thread zMan
Is there a simpler way to see whether we were called in key 8 (not that this is that complicated): EPSW R14,R0Extract PSW SLL R14,8 Get key bits in left-most nibble SRL R14,28Now isolate in bottom nibble CFI R14,8 Are we in