From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbdJLMIW (ORCPT ); Thu, 12 Oct 2017 08:08:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418AbdJLMIV (ORCPT ); Thu, 12 Oct 2017 08:08:21 -0400 Date: Thu, 12 Oct 2017 14:08:28 +0200 From: Greg Kroah-Hartman To: Joe Perches , Peter Zijlstra Cc: Petr Mladek , sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mingo@kernel.org, tglx@linutronix.de, Jason Wessel Subject: Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement Message-ID: <20171012120828.GA10932@kroah.com> References: <20170928121823.430053219@infradead.org> <20170928122513.328354788@infradead.org> <20171012094537.GF15129@pathway.suse.cz> <20171012100304.GD2882@pathway.suse.cz> <20171012113439.3temezwthmrz3pbu@hirez.programming.kicks-ass.net> <20171012115229.GB21916@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171012115229.GB21916@kroah.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > > > Hi, > > > > > > > > I thought about this a lot from several angles. And I would prefer > > > > sligly different placement, see the patch below. > > > > > > > > On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote: > > > > > Some people figured vprintk_emit() makes for a nice API and exported > > > > > it, bypassing the kdb trap. > > > > > > > > Sigh, printk() API is pretty complicated and this export > > > > made it much worse. Well, there are two things: > > > > > > > > First, kdb_trap_printk name is a bit misleading. It is not a > > > > generic trap of any printk message. Instead it seems to be > > > > used to redirect only particular messages from some existing > > > > functions, e.g. show_regs() called from kdb_dumpregs(). > > > > > > > > Second, it seems that the only user of the exported vprintk_emit() > > > > is dev_vprintk_emit(). I believe that code using this wrapper > > > > is not called in the sections where kdb_trap_printk is incremented. > > > > > > Well, I wonder if we should go even further and stop exporting > > > vprintk_emit(). IMHO, the only reason was dev_print_emit() and > > > the ability to pass the extra "dict" parameter. > > > > You have my blessing there, but the device folks might have an opinion > > on that; Cc'ed Gregkh. > > Hm, we "need" that dict option, otherwise the whole dev_printk() family > of messages will not work properly, right? > > Or am I missing something? If you can figure out a way to still support > the same thing (we need a prefix at the beginning of the message that > shows the device/driver/binding/etc that emitted the message), that's > fine with me, I'm not wed to vprintk_emit() :) Nope, this doesn't seem to deal with the prefix, except in some odd way that is tied to the dynamic debugging logic. I really don't know what this does anymore. Joe wrote it in 2012 as part of the dynamic debug code. Joe, any thoughts? thanks, greg k-h