[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Kernel modules idea
Hello
After a discussion with Draco, I have an idea about kernel modules.
At this moment if module uses a kernel function in a wrong way (like
kfree on a memory that never been kmalloced) we shoot the messenger, ie.
kernel, we have kernel fatal error.
The idea is so modules should have a special verion of each function
that atm harms kernel, so the would not. At the beggining, module should
register() to get a module id (mid). Then is should use this mid when
calling every kernel function (as a first parameter). Then if module
misbehaves we can shoot the module not the kernel, as kernel can track
all resource allocation made by module (resurce = memory, fd, trap, etc.).
We would also need modules to mark other modules and the processes that
depend on them, so we could kill them all (I always wanted to say that ;) ).
--
Semper Fidelis
Adam Klobukowski
atari@gabo.pl