[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] GlueSTiK and mem protection
On Mon, 7 Jun 1999, Frank Naumann wrote:
> I analyzed the existing gluestik and the design is completly wrong.
That's a judgment call, surely.
> First, on all places you break memory protection because private kernel
> memory is allocated.
Okay, this much I'll concede. In my defense, I assumed that since it
was writing directly into user memory anyway, there was pretty much no
hope of getting it to run under memory protection.
> Then the complete xdd is loaded in global(!) memory.
Only part of it really needed to be in global memory, of course, namely
the functions in the STiK-esque function table; but AFAIK it's not
possible to do a split-mem thing like that with the program text.
I mean, sure, I could have had the STiK-table functions in a TSR and
called the device driver from there, but that would have been just one
more separate thing to install. The separate resolver was bad enough.
> The data flow looks horrible:
>
> user program -> STiK cookie -> get direct entry points to kernel code ->
> jump to these functions in user mode content (the function looks like a
> normal function call)
This much is exactly like the STiK data flow, yes?
> -> these functions made system calls to the kernel
> -> the gluestik.xdd only redirect all calls directly to the Sockets
> (through internal kernel calls).
...er, well, yes, that was the whole point of the exercise, wasn't it?
> DNS resolving is much more complicated.
(shrug) I never said I liked having to do it that way.
> And at least there is an enourmous calling overhead.
No more so than other device drivers, AFAICT.
> I see no reason for a device driver.
The original reason for switching to a device driver IIRC was to try to
fix instability problems in the earlier TSR versions.
> The only thing that the device driver do is to redirect all calls to
> the sockets.
? The only thing the TSR did was redirect calls to the sockets. Why
does it matter what the thing doing the redirecting is called?
> That's why I rewritten GlueSTiK completly at the weekend.
Eek!
> GlueSTiK is now a normal TSR that is placed in global memory (but in
> user space!).
Hmm. How does your code compare to pre-3.1 versions?
> Scott, what are the copyright conditions of GlueSTiK? I doesn't found
> anything in the readme about this. GNU? Public Domain?
Actually, I'm quite prepared to let you take over the project if you
want. I haven't really been in a position to be able to do anything
with it for a while now. As for copyright... (checks documentation)
Hmm. Apparently I never settled on anything. I'd say GPL.
-sbigham