From: Borislav Petkov Date: Tue, 30 Oct 2018 22:07:13 +0000 (-0700) Subject: kernel/panic.c: do not append newline to the stack protector panic string X-Git-Tag: v4.20-rc1~52^2~45 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=95c4fb78fb23081472465ca20d5d31c4b780ed82;p=linux.git kernel/panic.c: do not append newline to the stack protector panic string ... because panic() itself already does this. Otherwise you have line-broken trailer: [ 1.836965] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: pgd_alloc+0x29e/0x2a0 [ 1.836965] ]--- Link: http://lkml.kernel.org/r/20181008202901.7894-1-bp@alien8.de Signed-off-by: Borislav Petkov Acked-by: Kees Cook Cc: Masahiro Yamada Cc: "Steven Rostedt (VMware)" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/panic.c b/kernel/panic.c index 8b2e002d52eb..837a94b7024d 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -631,7 +631,7 @@ device_initcall(register_warn_debugfs); */ __visible void __stack_chk_fail(void) { - panic("stack-protector: Kernel stack is corrupted in: %pB\n", + panic("stack-protector: Kernel stack is corrupted in: %pB", __builtin_return_address(0)); } EXPORT_SYMBOL(__stack_chk_fail);