Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136361
b: refs/heads/master
c: aa92db1
h: refs/heads/master
i:
  136359: c9efd47
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Jul 11, 2008
1 parent d3d004f commit c87e2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ce001b0e56638c726270d4f9e05d46d4250dfbb
refs/heads/master: aa92db14270b79f0f91a9060b547a46f9e2639da
13 changes: 5 additions & 8 deletions trunk/kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,22 +347,18 @@ static noinline void __stack_chk_test_func(void)
if ((unsigned long)__builtin_return_address(0) ==
*(((unsigned long *)&foo)+1)) {
printk(KERN_ERR "No -fstack-protector-stack-frame!\n");
return;
}
#ifdef CONFIG_FRAME_POINTER
/* We also don't want to clobber the frame pointer */
if ((unsigned long)__builtin_return_address(0) ==
*(((unsigned long *)&foo)+2)) {
printk(KERN_ERR "No -fstack-protector-stack-frame!\n");
return;
}
#endif
barrier();
if (current->stack_canary == *(((unsigned long *)&foo)+1))
*(((unsigned long *)&foo)+1) = 0;
else
if (current->stack_canary != *(((unsigned long *)&foo)+1))
printk(KERN_ERR "No -fstack-protector canary found\n");
barrier();

current->stack_canary = ~current->stack_canary;
}

static int __stack_chk_test(void)
Expand All @@ -373,7 +369,8 @@ static int __stack_chk_test(void)
if (__stack_check_testing) {
printk(KERN_ERR "-fstack-protector-all test failed\n");
WARN_ON(1);
}
};
current->stack_canary = ~current->stack_canary;
return 0;
}
/*
Expand Down

0 comments on commit c87e2a5

Please sign in to comment.