From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755147AbcHXR2o (ORCPT ); Wed, 24 Aug 2016 13:28:44 -0400 Received: from smtprelay0198.hostedemail.com ([216.40.44.198]:57253 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753440AbcHXR2n (ORCPT ); Wed, 24 Aug 2016 13:28:43 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393: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:8660:9038:10004:10400:10848:11026:11232:11473:11658:11783:11914:12048:12114:12438:12663:12740:13069:13148:13161:13229:13230:13255:13311:13357:13439:13894:14659:14721:21080:21433:30003:30029:30054:30070: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: hour94_68ad957980c15 X-Filterd-Recvd-Size: 2662 Message-ID: <1472059718.3746.154.camel@perches.com> Subject: Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful From: Joe Perches To: Josh Poimboeuf , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: 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 10:28:38 -0700 In-Reply-To: <9fbe0db05bacf66d337c162edbf61450d0cff1e2.1472057064.git.jpoimboe@redhat.com> References: <9fbe0db05bacf66d337c162edbf61450d0cff1e2.1472057064.git.jpoimboe@redhat.com> 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 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? > - Call touch_nmi_watchdog(). [] > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c [] > @@ -26,10 +26,11 @@ int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE; >  static int die_counter; >   >  static void printk_stack_address(unsigned long address, int reliable, > - void *data) > +  char *log_lvl) >  { > + touch_nmi_watchdog(); >   printk("%s [<%p>] %s%pB\n", > - (char *)data, (void *)address, reliable ? "" : "? ", > + log_lvl, (void *)address, reliable ? "" : "? ", >   (void *)address); >  } >   > @@ -148,7 +149,6 @@ static int print_trace_stack(void *data, char *name) >   */ >  static int print_trace_address(void *data, unsigned long addr, int reliable) >  { > - touch_nmi_watchdog(); >   printk_stack_address(addr, reliable, data); >   return 0; >  } like for data here?