[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Current beta problems - solved
On Thu, Aug 26, 1999 at 11:32:33PM +0200, Thomas Binder wrote:
>
> 2. The problem with e.g. Mines is caused by the new syscall handler,
> which doesn't preserve registers a0-a2 like the old one did. This
> causes buggy software to crash which relies on the (ucodumented!)
> behaviour of old GEMDOS versions that a0-a2 are preserved, too. The
> docs only say a3-a6 and d3-d7 are preserved, so this is clearly a bug
> in these programs.
Right. I would not take too much care about that -saving A2 may be OK, but
saving all registers may be difficult or impossible, depending on the design
of the trap handler (the scheme used in current TOS woule require quite some
overhead when saving any registers in that range).
However, when introducing that new handler, I produced a debug version which
clears those spilled registers to known values before returning from the
trap. Setting A0-A2 to some address which is guaranteed to cause a bus error
(even when used with a moderate offset), will catch these programs quite
fast and protect the kernel.
BTW: unintended passing back intermediate kernel variables in those
registers can be a security problem.
cu
Michael
--
Michael Schwingen, Ahornstrasse 36, 52074 Aachen