Re: faults in a kext
Re: faults in a kext
- Subject: Re: faults in a kext
- From: Kim-Thomas Moeller <email@hidden>
- Date: Wed, 01 Mar 2006 17:31:40 +0100
There is support for GP exceptions from within the kernel (see
xnu-792.6.2/osfmk/i386/trap.c, line 371). The recovery table maps fault
addresses to recovery addresses. Entries for the recovery table are
allocated statically by the macro RECOVER (in
xnu-792.6.2/osfmk/i386/locore.s).
In addition to the recovery table mechanism, each thread can specify its
own recovery address, which is called when there is no recovery table
entry. If neither the kernel nor the kernel debugger handle the GP, a
panic will occur.
Thanks,
Kim
Joshua LeVasseur wrote:
I'm experimenting with kext development on x86, and I'd like to know
how Darwin handles faults that occur due to instructions executed by my
kext, particularly the general protection fault. I don't have an x86
Apple machine, and am using a friend's machine, which I'd like to avoid
crashing.
Does Darwin halt the kernel if a kext raises a GP?
Does Darwin survive, but terminate a kext if the kext raises a GP?
Is it possible to tell Darwin that a particular instruction may raise a
GP, and if it does raise a GP, then Darwin should call my dedicated
error handler that cleans up and returns the system to a nominal state?
-Josh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden