[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in Mint



On Sat, 18 Feb 1995, Thierry Bousch wrote:

> There's absolutely no way for the kernel to guess the length of the region
> pointed to by Setexc(). If you really want to install an interrupt handler,
> why would you want to use another protection mode than "global" anyway ?

I think that Setexc should determine if it has to switch the protection
mode by looking at the memory region the handler is in. If it is in the
text segment of the running process, all of the regions belonging to it
should get global protection (i.e. no protection). But if it is in a
region allocated by the process after its start and if it has less
protection than 'private', it should do nothing. So the rest of the 
program is safe, and it can't be accessed by the interrupt handler, too.
A program that wants to set interrupt handlers then has to allocate some 
memory, copy over the routine and all data it needs and install it.
So it must neither be PC relative nor base relative (but the last a 
interrupt handler may never be). Is this a problem? 


> A more serious concern would be: should MiNT reinstall the old exception
> vectors if a program using Setexc() crashes inadvertantly? Or should the
> programmer be responsible for unlinking them, using the old and well-known
> trick of using the etv_term vector?  Same problem for keyboard tables,
> user-provided iorec buffers, Dosound(), Setscreen(), and probably many,
> many other Xbios functions...

I think MiNT should do... because if such a program gets a SIGKILL, it has
no chance to unlink any vector. Even etv_term is _not_ called. The only
problem is that MiNT has to remember every change of any vector in the
system. Maybe MiNT should get own interrupt handlers for the most
important interrupts which calls user-set routines the way the vbl handler
does with the vbl queue? 


Ciao,
Stephan


+------------------------------+-----------------------------+
|      Stephan Haslbeck	       |    Fachschaft Informatik    |
|       Agricolastr. 61	       |   Technische Universitaet   |
|      D-80686 Muenchen	       |      Muenchen, Bayern	     |
+------------------------------+-----------------------------+
|          Es gibt keine Probleme, nur Loesungen.	     |
+------------------------------------------------------------+