linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/panic: Do not append newline to the stack protector panic string
@ 2018-10-08 20:29 Borislav Petkov
  2018-10-08 21:57 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2018-10-08 20:29 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, Kees Cook, Masahiro Yamada, Steven Rostedt (VMware)

From: Borislav Petkov <bp@suse.de>

... 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]  ]---

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
---
 kernel/panic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.19.0.271.gfe8321ec057f


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-08 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 20:29 [PATCH] kernel/panic: Do not append newline to the stack protector panic string Borislav Petkov
2018-10-08 21:57 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).