OSDN Git Service

[PATCH] x86_64: Disable exception stack for stack faults
authorAndi Kleen <ak@suse.de>
Thu, 30 Jun 2005 13:46:32 +0000 (15:46 +0200)
committerMarcelo Tosatti <marcelo.tosatti@cyclades.com>
Thu, 30 Jun 2005 23:02:14 +0000 (20:02 -0300)
commit51e31546a2fc46cb978da2ee0330a6a68f07541e
treed0ce9dbf6615dc17e2423d5967a940a2f667abb6
parent3a36ef7ace64c507f6b087071429dbfed7d2a96d
[PATCH] x86_64: Disable exception stack for stack faults

Stack segment faults were executed on a exception stack. But they
use the normal return path and can schedule there, but scheduling
is not allowed on a exception stack.

Just drop the exception stack for stack segment faults. This
will make some oops triple fault now, but that's better than
allowing user triggerable oops.

Double faults still have this problem,  but if they happen you
have enough other problems already that this one doesn't matter
anymore.

2.6 has a more complicated fix here that actually handles
this properly, but for 2.4 the simple version is better.

Found from RedHat QA using crashme

Signed-off-by: Andi Kleen <ak@suse.de>
arch/x86_64/kernel/traps.c
include/asm-x86_64/processor.h