All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arch/x86: get rid of KERN_CONT in show_fault_oops()
@ 2018-06-25 12:38 Dmitry Vyukov
  2018-06-25 15:03 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dmitry Vyukov @ 2018-06-25 12:38 UTC (permalink / raw)
  To: tglx, mingo, x86, linux-kernel, sergey.senozhatsky.work; +Cc: Dmitry Vyukov

From: Dmitry Vyukov <dvyukov@google.com>

KERN_CONT leads to split lines in kernel output
and complicates useful changes to printk like
printing context before each line.

Only acceptable use of continuations is basically
boot-time testing.

Get rid of it.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>

---

Changes since v1:
 - use pr_alert() instead of printk(KERN_ALERT)
---
 arch/x86/mm/fault.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 9a84a0d08727..b9ceeaadde48 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -671,13 +671,9 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
 			printk(smep_warning, from_kuid(&init_user_ns, current_uid()));
 	}
 
-	printk(KERN_ALERT "BUG: unable to handle kernel ");
-	if (address < PAGE_SIZE)
-		printk(KERN_CONT "NULL pointer dereference");
-	else
-		printk(KERN_CONT "paging request");
-
-	printk(KERN_CONT " at %px\n", (void *) address);
+	pr_alert("BUG: unable to handle kernel %s at %px\n",
+		(address < PAGE_SIZE ? "NULL pointer dereference" :
+		"paging request"), (void *) address);
 
 	dump_pagetable(address);
 }
-- 
2.18.0.rc2.346.g013aa6912e-goog


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

end of thread, other threads:[~2018-06-26 10:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 12:38 [PATCH v2] arch/x86: get rid of KERN_CONT in show_fault_oops() Dmitry Vyukov
2018-06-25 15:03 ` Joe Perches
2018-06-26  7:29   ` Dmitry Vyukov
2018-06-26  1:29 ` Sergey Senozhatsky
2018-06-26 10:25 ` [tip:x86/urgent] x86/mm: Get " tip-bot for Dmitry Vyukov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.