[Info-vax] DECnet Phase IV broken after VSI update

Arne Vajhøj arne at vajhoej.dk
Thu Nov 4 09:23:29 EDT 2021


On 11/4/2021 12:54 AM, David Jones wrote:
> On Wednesday, November 3, 2021 at 11:51:05 PM UTC-4, Lawrence D’Oliveiro wrote:
>> On Thursday, November 4, 2021 at 1:19:18 PM UTC+13, Arne Vajhøj wrote:
>>>> ...  So there is some kind of extra layer on top
>>>> of the kernel driver, and you are not supposed to access the latter
>>>> directly.
>>>>
>>> Yes.
>>>
>>> PTD$ user mode library ---> some VMS kernel code ---> driver code
>> And note the implication that bad things could happen if you
>> $DASSGN the channel without calling PTD$DELETE. Or if you tried to $QIO yourself
>> without using PTD$READ/WRITE.
>>
>> I wonder why it was necessary to do it this way?
> 
> Most of PTD$ code runs in kernel mode with some at elevated IPL.

Very interesting.

So it is not a traditional call stack:

user exe       application   user mode
P0 space
----------     ----------
VMS shrexe     PTD$ API
P0 space       some logic
----------     ----------
VMS            SYS$ API
S0 space       CHMK           ----------
                more logic     kernel mode
                ----------
                EXE$ and other
                ----------
                Driver

But:

user exe       application   user mode
P0 space
----------     ----------
VMS shrexe     PTD$ API
P0 space       some logic
                SYS$CMKRNL     ----------
                more logic     kernel mode
----------     ----------
VMS            EXE$ and other
S0 space       ----------
                Driver

Sounds like somebody did not like SYS$QIO(W).

:-)

>                                                             The PTD$CREATE call
> creates a buffer object for the buffer you supply so that the buffer (and its S0 address)
> stays locked in memory.

There is nothing unusual in the fact that when doing an "open" at some
level then one need to do a "close" at the same level.

>                         PTD$READ/WRITE queue request packets directly to FTDRIVER,
> skipping some of the overhead of $QIO processing.

Arne



More information about the Info-vax mailing list