Re: Change how LE allocates storage (subpool,key)

2023-07-15 Thread Martin Trübner

I believe "Storage-protection override" is the hardware facility


it is!

and VSE as well as z/OS set the bit in CR0 to activate it (all the time without 
asking for any need). So Key 9 is the storage key everyone (regardless of key) 
can modify as opposed to PSW-key zero which allows to modify storage in any key.

 
Now my persoanl peeve: they designed the feature without talking to any of the VSE people, but only MVS. hence the choice of 9 (unused in MVS but used in VSE for F4) instead of key 14 or 15 (unused in either of the two legacy op-sys).


Martin

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-15 Thread Tony Harminc
On Fri, 14 Jul 2023 at 20:54, Steve Thompson  wrote:
[...]
> I wrote the SVC for PROLOG and was in the middle of testing when
> we were informed that CICS was going to use KEY9 and a system
> change (forgot the name of this) was being done for them. So I
> had to find another key.

I believe "Storage-protection override" is the hardware facility
you're thinking of. Part of the ESA/390 base in 1990.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Steve Thompson
I don't know if this ancient history will be of any use in your 
case Binyamin:


In the early 1990s, I was working on IBM Prolog for 370 (MVS). I 
was asked to help the VM group migrate their code to MVS and they 
explained their issues with Stack/Heap. We discussed storage keys 
and what they were using and why.


So it was decided to use KEY9 and I think we also used KEY15 
(long time ago, and I have forgotten some details).


I wrote the SVC for PROLOG and was in the middle of testing when 
we were informed that CICS was going to use KEY9 and a system 
change (forgot the name of this) was being done for them. So I 
had to find another key.


Just thought you might need to make sure you will not create or 
incur some problem in using Key9 with CICS (and since the changes 
to CSA, this may well be obsolete).


Regards,
Steve Thompson

On 7/14/2023 10:41 AM, Farley, Peter wrote:

Binyamin,

Is this desire perhaps for use in a CICS "threadsafe" or "open" TCB?  If so, 
doesn't CICS itself provide some CICS-unique storage facilities to LE programs, and are those not 
sufficient to your needs?

As many others have mentioned, the LE Vendor Interfaces manual has information 
on heap routine replacement.  I suspect you are SOL for redirecting STACK 
storage though.  The LE start and stop macro generated code doesn't look to me 
to be very amenable to replacing the stack allocation/free subroutines, unless 
maybe after setting up an enclave with CEEPIPI you change storage routine 
addresses in the CAA (and possibly elsewhere?), but that sounds like a heavy 
lift to test for RAS integrity.

Peter

From: IBM Mainframe Discussion List  On Behalf Of 
Binyamin Dissen
Sent: Thursday, July 13, 2023 6:11 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Change how LE allocates storage (subpool,key)



I would like to have LE use SP=132 KEY=9 for its STACK and HEAP.



I obviously could screw with CEEINT, but I don't know if that will affect

other storage requests.



Is there some explicit getmain routine that I can play with?



--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

--
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: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Farley, Peter
Binyamin,

Is this desire perhaps for use in a CICS "threadsafe" or "open" TCB?  If so, 
doesn't CICS itself provide some CICS-unique storage facilities to LE programs, 
and are those not sufficient to your needs?

As many others have mentioned, the LE Vendor Interfaces manual has information 
on heap routine replacement.  I suspect you are SOL for redirecting STACK 
storage though.  The LE start and stop macro generated code doesn't look to me 
to be very amenable to replacing the stack allocation/free subroutines, unless 
maybe after setting up an enclave with CEEPIPI you change storage routine 
addresses in the CAA (and possibly elsewhere?), but that sounds like a heavy 
lift to test for RAS integrity.

Peter

From: IBM Mainframe Discussion List  On Behalf Of 
Binyamin Dissen
Sent: Thursday, July 13, 2023 6:11 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Change how LE allocates storage (subpool,key)



I would like to have LE use SP=132 KEY=9 for its STACK and HEAP.



I obviously could screw with CEEINT, but I don't know if that will affect

other storage requests.



Is there some explicit getmain routine that I can play with?



--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Binyamin Dissen
I did RTFM before asking. I was surprised that it wasn't an obvious thing in
the vendors guide.

On Fri, 14 Jul 2023 15:11:07 +0200 Tony Harminc  wrote:

:>On Fri, 14 Jul 2023 at 14:33, Binyamin Dissen
:> wrote:
:>>
:>> I also want STACK storage.
:>
:>OK - I'm not an expert in LE interfaces. I just saw that there's a
:>documented heap manager interface that you can supply services to.
:>Maybe there's something similar for stacks. Maybe stacks are allocated
:>from heap storage. I'm just suggesting that "there is no replaceable
:>routine" seems a bit premature wihout having RTFM in detail.
:>
:>Tony H.
:>
:>> On Fri, 14 Jul 2023 13:15:10 +0200 Tony Harminc  wrote:
:>>
:>> :>On Fri, 14 Jul 2023 at 12:57, Binyamin Dissen
:>> :> wrote:
:>> :>>
:>> :>> No replaceable routine.
:>> :>>
:>> :>> Got it.
:>> :>
:>> :>I'm a bit surprised... The LE Vendor Interfaces book has all kinds of
:>> :>talk about providing your own heap storage manager. Maybe this
:>> :>interface isn't available in your environment, or has too many
:>> :>restrictions or something, but it certainly exists.
:>> :>
:>> :>Jump in at 
https://www.ibm.com/docs/en/zos/2.2.0?topic=management-vendor-heap-manager-interface
:>> :>
:>> :>Tony H.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Tony Harminc
On Fri, 14 Jul 2023 at 14:33, Binyamin Dissen
 wrote:
>
> I also want STACK storage.

OK - I'm not an expert in LE interfaces. I just saw that there's a
documented heap manager interface that you can supply services to.
Maybe there's something similar for stacks. Maybe stacks are allocated
from heap storage. I'm just suggesting that "there is no replaceable
routine" seems a bit premature wihout having RTFM in detail.

Tony H.

> On Fri, 14 Jul 2023 13:15:10 +0200 Tony Harminc  wrote:
>
> :>On Fri, 14 Jul 2023 at 12:57, Binyamin Dissen
> :> wrote:
> :>>
> :>> No replaceable routine.
> :>>
> :>> Got it.
> :>
> :>I'm a bit surprised... The LE Vendor Interfaces book has all kinds of
> :>talk about providing your own heap storage manager. Maybe this
> :>interface isn't available in your environment, or has too many
> :>restrictions or something, but it certainly exists.
> :>
> :>Jump in at 
> https://www.ibm.com/docs/en/zos/2.2.0?topic=management-vendor-heap-manager-interface
> :>
> :>Tony H.
>
> --
> Binyamin Dissen 
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
> --
> 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: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Binyamin Dissen
I also want STACK storage.

On Fri, 14 Jul 2023 13:15:10 +0200 Tony Harminc  wrote:

:>On Fri, 14 Jul 2023 at 12:57, Binyamin Dissen
:> wrote:
:>>
:>> No replaceable routine.
:>>
:>> Got it.
:>
:>I'm a bit surprised... The LE Vendor Interfaces book has all kinds of
:>talk about providing your own heap storage manager. Maybe this
:>interface isn't available in your environment, or has too many
:>restrictions or something, but it certainly exists.
:>
:>Jump in at 
https://www.ibm.com/docs/en/zos/2.2.0?topic=management-vendor-heap-manager-interface
:>
:>Tony H.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Tony Harminc
On Fri, 14 Jul 2023 at 12:57, Binyamin Dissen
 wrote:
>
> No replaceable routine.
>
> Got it.

I'm a bit surprised... The LE Vendor Interfaces book has all kinds of
talk about providing your own heap storage manager. Maybe this
interface isn't available in your environment, or has too many
restrictions or something, but it certainly exists.

Jump in at 
https://www.ibm.com/docs/en/zos/2.2.0?topic=management-vendor-heap-manager-interface

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-14 Thread Binyamin Dissen
No replaceable routine.

Got it.

On Fri, 14 Jul 2023 01:55:39 +0200 Bernd Oppolzer 
wrote:

:>If there is no explicit LE option to override the standard subpools 
:>(which are 1 and 2, AFAIK),
:>then I would try to use the LE option which allows to have an alternate 
:>heap handler
:>and use a modified version of the standard LE handler. I don't recall 
:>the names of the runtime options,
:>but I used them in the past to have LE heap checks enables; that's an 
:>alternate LE heap handler
:>which writes messages about allocated and not freed storage areas ... I 
:>used that when looking
:>for memory leaks with certain C++ applications.
:>
:>If you don't know what I'm talking about, I can search my archives and 
:>maybe find the names
:>of these options and some sort of presentation (IBM's or my own) on the 
:>topic.
:>
:>But: that's only for heap storage, not for stack. Why do you want to 
:>have the STACK allocated
:>in another subpool? Normally stack allocation is not a problem; heap is 
:>where the problems are.
:>
:>Look here: http://bernd-oppolzer.de/stackheap.pdf
:>
:>HTH, kind regards
:>
:>Bernd
:>
:>
:>Am 14.07.2023 um 00:11 schrieb Binyamin Dissen:
:>> I would like to have LE use SP=132 KEY=9 for its STACK and HEAP.
:>>
:>> I obviously could screw with CEEINT, but I don't know if that will affect
:>> other storage requests.
:>>
:>> Is there some explicit getmain routine that I can play with?
:>>
:>> --
:>> Binyamin Dissen 
:>> http://www.dissensoftware.com
:>>
:>> Director, Dissen Software, Bar & Grill - Israel
:>>
:>> --
:>> 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

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Change how LE allocates storage (subpool,key)

2023-07-13 Thread Bernd Oppolzer
This is an example for the options for the alternate LE heap manager for 
memory checks (CEL4MCHK):


//CEEOPTS  DD *
ALL31(ON),
STACK(3M,1M,ANY,KEEP),
HEAP(4K,4K,ANY,KEEP),
STORAGE(NONE,NONE,NONE,0),
RPTSTG(ON),RPTOPTS(ON),
ENVAR("_CEE_HEAP_MANAGER=CEL4MCHK",
"_CEE_MEMCHECK_TRACE=ON",
"_CEE_MEMTRACE_DEPTH=32",
"_CEE_MEMCHECK_DEPTH=32",
"_CEE_MEMCHECK_OVERLAY=OFF",
"_CEE_MEMCHECK_OVERLAYLEN=80")

Maybe it is possible (don't know) to write a heap manager of your own 
and to specify its name here,
or: to specify the name of a modified version of the Standard LE heap 
manager (with other subpools)

or: a modified version of CEL4MCHK with traces disabled
or ???

In any case, I personally would not change the behaviour of standard LE 
in the first place.


HTH, kind regards

Bernd


Am 14.07.2023 um 01:55 schrieb Bernd Oppolzer:
If there is no explicit LE option to override the standard subpools 
(which are 1 and 2, AFAIK),
then I would try to use the LE option which allows to have an 
alternate heap handler
and use a modified version of the standard LE handler. I don't recall 
the names of the runtime options,
but I used them in the past to have LE heap checks enables; that's an 
alternate LE heap handler
which writes messages about allocated and not freed storage areas ... 
I used that when looking

for memory leaks with certain C++ applications.

If you don't know what I'm talking about, I can search my archives and 
maybe find the names
of these options and some sort of presentation (IBM's or my own) on 
the topic.


But: that's only for heap storage, not for stack. Why do you want to 
have the STACK allocated
in another subpool? Normally stack allocation is not a problem; heap 
is where the problems are.


Look here: http://bernd-oppolzer.de/stackheap.pdf

HTH, kind regards

Bernd


Am 14.07.2023 um 00:11 schrieb Binyamin Dissen:

I would like to have LE use SP=132 KEY=9 for its STACK and HEAP.

I obviously could screw with CEEINT, but I don't know if that will 
affect

other storage requests.

Is there some explicit getmain routine that I can play with?

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
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: Change how LE allocates storage (subpool,key)

2023-07-13 Thread Bernd Oppolzer
If there is no explicit LE option to override the standard subpools 
(which are 1 and 2, AFAIK),
then I would try to use the LE option which allows to have an alternate 
heap handler
and use a modified version of the standard LE handler. I don't recall 
the names of the runtime options,
but I used them in the past to have LE heap checks enables; that's an 
alternate LE heap handler
which writes messages about allocated and not freed storage areas ... I 
used that when looking

for memory leaks with certain C++ applications.

If you don't know what I'm talking about, I can search my archives and 
maybe find the names
of these options and some sort of presentation (IBM's or my own) on the 
topic.


But: that's only for heap storage, not for stack. Why do you want to 
have the STACK allocated
in another subpool? Normally stack allocation is not a problem; heap is 
where the problems are.


Look here: http://bernd-oppolzer.de/stackheap.pdf

HTH, kind regards

Bernd


Am 14.07.2023 um 00:11 schrieb Binyamin Dissen:

I would like to have LE use SP=132 KEY=9 for its STACK and HEAP.

I obviously could screw with CEEINT, but I don't know if that will affect
other storage requests.

Is there some explicit getmain routine that I can play with?

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
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