Jump to content

ring0 structured exception handling in asm

- - - - -

  • Please log in to reply
1 reply to this topic

#1
innerLOL

innerLOL

    Newbie

  • Members
  • PipPip
  • 29 posts
i noticed that kernel does not use normal SEH.

it use _except_handler3 to do something.
can someone explain me what exactly it is?

how do i handle exceptions in kernel mode?

#2
Sysop_fb

Sysop_fb

    Programmer

  • Members
  • PipPipPipPip
  • 160 posts
  • Location:Missouri

innerLOL said:

i noticed that kernel does not use normal SEH.
SEH is only normal if you're in windows

innerLOL said:

it use _except_handler3 to do something.
That looks like a function/procedure handler you dug out from somewhere

innerLOL said:

can someone explain me what exactly it is?
Specifically to _except_handler3? Id have to dig around in the source.

innerLOL said:

how do i handle exceptions in kernel mode?
You don't unless you wrote the exception handler in the kernel in which case you are I guess.
As in linux exception handling in user space is generally accomplished through signals and system calls

Anyway, as of 2.6 since that's the last time I read through the source...

Most C functions dealing with exception handlers consist of a do_ followed by the handler name and most of them invoke the do_trap() function to store the hardware error code and the exception vector in the process descriptor and then send a signal to that process.
The process could take care of the signal through it's own signal handler in which case it's being handled in user mode. Or it will be handled in Kernel mode in which case the kernel will more then likely kill the process. As most signals sent from exception handlers are faults and general protection faults, SIGSEGV and such.


All in all what are you trying to do?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users