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

Re: [MiNT] mint & mmu



Hello!

The only way I can think of, which would save the Super() call and made it
safe, is somehow emulate all the code, or some other way catch every
instruction, that is executed between two Super() calls or inside Supexec(),
and heavily check that these instructions do "legal" things, and kill the
program otherwise.

You can do it simpler. If a program do Super() just set a flag that the program wanted to switch to Super(), don't do anything other and let the program run in usermode. On the next illegal instruction or memory violation look if the flag is set. If yes analyze the reason, if the application wanted to get the cookie jar the faulted address will be the cookie jar address for example. If this is an allowed operation copy over the cookie jar pointer and let the application normally run. If it's an illegal operation do normal signal handling (e.g. terminating app most probably).

I am sure that demo coders will love this idea :>

:-)


Ciao
   ...Frank

--
ATARI FALCON 040 // MILAN 060
-----------------------------------------
http://www.cs.uni-magdeburg.de/~fnaumann/
e-Mail: fnaumann@freemint.de