exception handling in kernel code

Stanislav Sedov ssedov at mbsd.msk.ru
Mon Aug 14 08:47:52 UTC 2006


Hi!

I'm trying to write kernel code where exceptions are unavoidable.
To clarify , I need to recover after GP (general protection) exception
on i386 cpu and return an error in that case.
Unfortunately, looking in trap.c kernel code I can't find any exception
handling mechanism except inserting hooks into trap.c.

So, the question is: how can one recover after exception in kernel
code? AFAIK, linux build special exception table from various __ex_table
sections to allow placing recover code into .fixup section. Does any such
mechanism exists in freebsd?

Thanks!

-- 
Stanislav Sedov         MBSD labs, Inc.         <ssedov at mbsd.msk.ru>
Россия, Москва         http://mbsd.msk.ru

--------------------------------------------------------------------
If the facts don't fit the theory, change the facts.  -- A. Einstein
--------------------------------------------------------------------
PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060814/67893d49/signature.pgp


More information about the freebsd-hackers mailing list