aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-14 03:02:13 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-05-26 10:15:31 -0400
commit517a92c4e19fcea815332d3155e9fb7723251274 (patch)
tree75e57ff7749b37c3f78c23175b87e5908a0a3bc0
parent7e09b2a02dae4616a5a26000169964b32f86cd35 (diff)
panic: print more informative messages on stackprotect failure
pointed out by pageexec@freemail.hu: we just simply panic() when there's a stackprotector attack - giving the attacked person no information about what kernel code the attack went against. print out the attacked function. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/panic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 425567f45b9f..f236001cc4db 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -327,7 +327,8 @@ EXPORT_SYMBOL(warn_on_slowpath);
327 */ 327 */
328void __stack_chk_fail(void) 328void __stack_chk_fail(void)
329{ 329{
330 panic("stack-protector: Kernel stack is corrupted"); 330 panic("stack-protector: Kernel stack is corrupted in: %p\n",
331 __builtin_return_address(0));
331} 332}
332EXPORT_SYMBOL(__stack_chk_fail); 333EXPORT_SYMBOL(__stack_chk_fail);
333#endif 334#endif