mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix stack protector problems with newer GCC versions
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@490 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
19
libc/misc.c
19
libc/misc.c
@@ -86,13 +86,24 @@ long __guard[8] = {
|
||||
0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
void __stack_smash_handler(const char *func, int damaged)
|
||||
static void freeze(void)
|
||||
{
|
||||
printk("Propolice detected a stack smashing attack %x at function %s,"
|
||||
" freezing\n", damaged, func);
|
||||
|
||||
// Freeze
|
||||
// XXX: Disable interrupts?
|
||||
for(;;)
|
||||
;
|
||||
}
|
||||
|
||||
void __stack_smash_handler(const char *func, int damaged)
|
||||
{
|
||||
printk("Propolice detected a stack smashing attack %x at function %s,"
|
||||
" freezing\n", damaged, func);
|
||||
freeze();
|
||||
}
|
||||
|
||||
void __stack_chk_fail(void)
|
||||
{
|
||||
printk("Propolice detected a stack smashing attack, freezing\n");
|
||||
|
||||
freeze();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user