From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932441AbcHXTQz (ORCPT ); Wed, 24 Aug 2016 15:16:55 -0400 Received: from smtprelay0160.hostedemail.com ([216.40.44.160]:57750 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755589AbcHXTQw (ORCPT ); Wed, 24 Aug 2016 15:16:52 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::,RULES_HIT:41:355:379:421:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2691:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3874:4250:4321:5007:6121:6742:7875:7903:10004:10400:10848:11026:11232:11658:11783:11914:12114:12438:12663:12740:13069:13255:13311:13357:13439:13894:14659:14721:21080:21433:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: wish19_5b57b5ef57c11 X-Filterd-Recvd-Size: 2526 Message-ID: <1472065626.3746.164.camel@perches.com> Subject: Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful From: Joe Perches To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Linus Torvalds , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park , Nilay Vaish Date: Wed, 24 Aug 2016 12:07:06 -0700 In-Reply-To: <20160824184327.ta3u3dckjmmc7dkx@treble> References: <9fbe0db05bacf66d337c162edbf61450d0cff1e2.1472057064.git.jpoimboe@redhat.com> <1472059718.3746.154.camel@perches.com> <20160824184327.ta3u3dckjmmc7dkx@treble> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-08-24 at 13:43 -0500, Josh Poimboeuf wrote: > On Wed, Aug 24, 2016 at 10:28:38AM -0700, Joe Perches wrote: > > On Wed, 2016-08-24 at 11:50 -0500, Josh Poimboeuf wrote: > > > Change printk_stack_address() to be useful when called by an unwinder > > > outside the context of dump_trace(). > > > > > > Specifically: > > > > > > - printk_stack_address()'s 'data' argument is always used as the log > > >   level string.  Make that explicit. [] > > If this is true, and I'm not sure it is as I believe > > there are static strings emitted like EOE and IRQ, > > shouldn't this bubble up through the calling tree? > [] > This function needs to keep its 'void *data' argument because it's a > callback for stacktrace_ops, so it has to conform to the callback > interface.  'data' is used for passing a pointer to an opaque data > structure to the callback. > > Also this is the only caller of printk_stack_address(), so there's > nowhere else to bubble it up to. And that shows that print_stack_address(data is not always a log level. ie: walk_stack uses it to print a string not a log level.