projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4704dea
)
bug: use %pB in BUG and stack protector failure
author
Kees Cook
<
[email protected]
>
Fri, 9 Mar 2018 23:50:59 +0000
(15:50 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 10 Mar 2018 00:40:01 +0000
(16:40 -0800)
The BUG and stack protector reports were still using a raw %p. This
changes it to %pB for more meaningful output.
Link:
http://lkml.kernel.org/r/20180301225704.GA34198@beast
Fixes: ad67b74d2469 ("printk: hash addresses printed with %p")
Signed-off-by: Kees Cook <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Borislav Petkov <
[email protected]
>
Cc: Richard Weinberger <
[email protected]
>,
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/panic.c
patch
|
blob
|
history
lib/bug.c
patch
|
blob
|
history
diff --git
a/kernel/panic.c
b/kernel/panic.c
index 2cfef408fec931ac0ef3f3c95b31269ed1d3ea29..4b794f1d85613578bd10bc07d78a3d746a8f0db9 100644
(file)
--- a/
kernel/panic.c
+++ b/
kernel/panic.c
@@
-640,7
+640,7
@@
device_initcall(register_warn_debugfs);
*/
__visible void __stack_chk_fail(void)
{
- panic("stack-protector: Kernel stack is corrupted in: %p\n",
+ panic("stack-protector: Kernel stack is corrupted in: %p
B
\n",
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
diff --git
a/lib/bug.c
b/lib/bug.c
index c1b0fad31b109157427d1ec1e30e7e93e303465d..44f432cb064d8faba319f8ed876b533904b2954d 100644
(file)
--- a/
lib/bug.c
+++ b/
lib/bug.c
@@
-191,7
+191,7
@@
enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
if (file)
pr_crit("kernel BUG at %s:%u!\n", file, line);
else
- pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
+ pr_crit("Kernel BUG at %p
B
[verbose debug info unavailable]\n",
(void *)bugaddr);
return BUG_TRAP_TYPE_BUG;