Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323563

[GIT PULL] tracing/stacktrace: Show entire trace if passed in function not found

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject [GIT PULL] tracing/stacktrace: Show entire trace if passed in function not found
Date Mon, 01 Feb 2016 23:10:04 +0100
Message-ID <qXuPy-WW-29@gated-at.bofh.it> (permalink)
X-Original-To Linus Torvalds <torvalds@linux-foundation.org>
X-Session-Marker 726F737465647440676F6F646D69732E6F7267
X-Spam-Summary 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:69:355:379:541:800:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2553:2560:2563:2682:2685:2731:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3770:3865:3866:3867:3868:3870:3871:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6261:7266:8599:9025:9121:10004:10400:10848:10913:11026:11233:11658:11914:12043:12262:12266:12438:12517:12519:12555:12679:12740:12783:13255:14096:14097:14659:21080:21324:30025:30054: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:3,LUA_SUMMARY:none
X-He-Tag cast50_37c3f9d43d34a
X-Filterd-Recvd-Size 2992
X-Mailer Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 65
Organization linux.* mail to news gateway
X-Original-Cc LKML <linux-kernel@vger.kernel.org>, Heiko Carstens <heiko.carstens@de.ibm.com>
X-Original-Date Mon, 1 Feb 2016 17:06:21 -0500
X-Original-Message-ID <20160201170621.2aae16dd@gandalf.local.home>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1323563

Show key headers only | View raw


Linus,

A cleanup to the stack tracer broke stack tracing on s390.
Here's a simple fix to correct that issue.


Please pull the latest trace-v4.5-rc1-2 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-v4.5-rc1-2

Tag SHA1: a452e1d1572d2ea305c8fe7b85365a1c5a1de40d
Head SHA1: 6ccd83714a009ee301b50c15f6c3a5dc1f30164c


Steven Rostedt (1):
      tracing/stacktrace: Show entire trace if passed in function not found

----
 kernel/trace/trace_stack.c | 7 +++++++
 1 file changed, 7 insertions(+)
---------------------------
commit 6ccd83714a009ee301b50c15f6c3a5dc1f30164c
Author: Steven Rostedt <rostedt@goodmis.org>
Date:   Fri Jan 29 10:22:41 2016 -0500

    tracing/stacktrace: Show entire trace if passed in function not found
    
    When a max stack trace is discovered, the stack dump is saved. In order to
    not record the overhead of the stack tracer, the ip of the traced function
    is looked for within the dump. The trace is started from the location of
    that function. But if for some reason the ip is not found, the entire stack
    trace is then truncated. That's not very useful. Instead, print everything
    if the ip of the traced function is not found within the trace.
    
    This issue showed up on s390.
    
    Link: http://lkml.kernel.org/r/20160129102241.1b3c9c04@gandalf.local.home
    
    Fixes: 72ac426a5bb0 ("tracing: Clean up stack tracing and fix fentry updates")
    Cc: stable@vger.kernel.org # v4.3+
    Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index dda9e6742950..202df6cffcca 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -126,6 +126,13 @@ check_stack(unsigned long ip, unsigned long *stack)
 	}
 
 	/*
+	 * Some archs may not have the passed in ip in the dump.
+	 * If that happens, we need to show everything.
+	 */
+	if (i == stack_trace_max.nr_entries)
+		i = 0;
+
+	/*
 	 * Now find where in the stack these are.
 	 */
 	x = 0;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[GIT PULL] tracing/stacktrace: Show entire trace if passed in  function not found Steven Rostedt <rostedt@goodmis.org> - 2016-02-01 23:10 +0100

csiph-web