From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752809AbbJFQQf (ORCPT ); Tue, 6 Oct 2015 12:16:35 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:32860 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312AbbJFQQd (ORCPT ); Tue, 6 Oct 2015 12:16:33 -0400 Subject: Re: [PATCH 1/2] x86: dumpstack, use pr_cont To: Rasmus Villemoes References: <1444134578-3790-1-git-send-email-jslaby@suse.cz> <874mi4m1gs.fsf@rasmusvillemoes.dk> Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org From: Jiri Slaby Message-ID: <5613F3DE.4010406@suse.cz> Date: Tue, 6 Oct 2015 18:16:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <874mi4m1gs.fsf@rasmusvillemoes.dk> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/06/2015, 06:00 PM, Rasmus Villemoes wrote: >> --- a/arch/x86/kernel/dumpstack.c >> +++ b/arch/x86/kernel/dumpstack.c >> @@ -260,18 +260,18 @@ int __die(const char *str, struct pt_regs *regs, long err) >> printk(KERN_DEFAULT >> "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter); >> #ifdef CONFIG_PREEMPT >> - printk("PREEMPT "); >> + pr_cont("PREEMPT "); >> #endif >> #ifdef CONFIG_SMP >> - printk("SMP "); >> + pr_cont("SMP "); >> #endif >> #ifdef CONFIG_DEBUG_PAGEALLOC >> - printk("DEBUG_PAGEALLOC "); >> + pr_cont("DEBUG_PAGEALLOC"); > > cosmetic: this lost a space. Oh, good catch. This was left from the times when DEBUG_PAGEALLOC was last. Now KASAN is, but I added a space to both of them locally for the time being. Anyway: > May I suggest > > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > index 9c30acfadae2..b473a47d1851 100644 > --- a/arch/x86/kernel/dumpstack.c > +++ b/arch/x86/kernel/dumpstack.c > @@ -257,21 +257,23 @@ int __die(const char *str, struct pt_regs *regs, long err) > unsigned short ss; > unsigned long sp; > #endif > - printk(KERN_DEFAULT > - "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter); > + static const char build_flags[] = "" > #ifdef CONFIG_PREEMPT > - printk("PREEMPT "); > + " PREEMPT" > #endif > #ifdef CONFIG_SMP > - printk("SMP "); > + " SMP" > #endif > #ifdef CONFIG_DEBUG_PAGEALLOC > - printk("DEBUG_PAGEALLOC "); > + " DEBUG_PAGEALLOC" > #endif > #ifdef CONFIG_KASAN > - printk("KASAN"); > + " KASAN" > #endif > - printk("\n"); > + ; > + printk(KERN_DEFAULT > + "%s: %04lx [#%d]%s\n", str, err & 0xffff, ++die_counter, > + build_flags); > if (notify_die(DIE_OOPS, str, regs, err, > current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP) > return 1; > > instead, so that there's only one printk call and the pr_cont issue goes > away? I like this. So if you resend as a proper patch, I will definitely ack it. But it's up to the maintainers which one they prefer. thanks, -- js suse labs