Re: When does a general protection fault occur?

From: Randy.Dunlap
Date: Wed Sep 17 2003 - 10:19:03 EST


On Wed, 17 Sep 2003 15:54:20 +0900 "Kim, Hyunchul" <kimhc@xxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/