When does a general protection fault occur?
Hi all,
I'm studying non-executable stack patch.
It modified do_general_protection(), the general protection fault handler(?).
I wanna know when the handler is called, or where could I find it.
Thanks in advance.
On Wed, 17 Sep 2003 15:54:20 +0900 "Kim, Hyunchul" <[email protected]> wrote:
| | Hi all, | | I'm studying non-executable stack patch. | It modified do_general_protection(), the general protection fault | handler(?). | I wanna know when the handler is called, or where could I find it.
See Intel or AMD developer manuals for GP faults/exceptions.
You can use something like this to find do_general_protection:
$ find . -name \*\.[hcS] | xargs grep -n do_general_protection
and learn that it is in (this is from 2.6.0-test4):
./arch/i386/kernel/traps.c:420:asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) and
./arch/x86_64/kernel/traps.c:456:asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
--
~Randy