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>
This commit is contained in:
Ingo Molnar 2008-02-14 09:02:13 +01:00 коммит произвёл Thomas Gleixner
Родитель 7e09b2a02d
Коммит 517a92c4e1
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -327,7 +327,8 @@ EXPORT_SYMBOL(warn_on_slowpath);
*/
void __stack_chk_fail(void)
{
panic("stack-protector: Kernel stack is corrupted");
panic("stack-protector: Kernel stack is corrupted in: %p\n",
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
#endif