Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2686942imj; Mon, 11 Feb 2019 07:02:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IZLSoEePUu7TZeOl6UGnbMb7/F02bPs/dEac5ak/VrEen+J9vWRiPtRl51U+V1yWTeL2WSQ X-Received: by 2002:a63:374e:: with SMTP id g14mr34513229pgn.59.1549897359954; Mon, 11 Feb 2019 07:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897359; cv=none; d=google.com; s=arc-20160816; b=pZMAB1dSx9gKOF+n46ceIFBEA2Gr+teTaUjrZPjocS99JRtO+MFnpYIChAGikctMy1 +jZTheJ2xmfD6kjAdT7CNjUBSwcZPez0zMb4FRBbOe6VLrlaAaaZhlBe0UJBNxDj2ua4 OrLPI0mIrCrXi9ieecWCk8sTsuM4GPuuSR9ZXZXqNOxJwzcCiykKKz7EleogR77etwLH Xdnk/C3dttgT3SyiGpTPxjbF5OOxiAAobhLRGwEbpCZhl5a1k0pxMH64/3JkpAzNY314 9Y/hMBZTrQ0NoM1vWr0YSxRTTS8vgvr3zoGLF6z113+EbsSuv1u9P8KYuz74a7G6G+mR olkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mHOQ4w1DFbTA5qEBjW8Zx1layXzfFdCmtxYb7CN27/E=; b=GPzabRYYMxyYmOE7xrnrJgIvqh+7T6mFKpgeQY5MpStLEtjz1e1igoqTxEuWxvKpJP 6i1if+iqsGUkIZQ2yR8EtPWlWItI4uHI6HYMOErHbnanCfxRTULJWo8SL/6doaNxKTNA KuzMsfYlcHJGtJEJ85YZ0Nbqx745xn0su9wJ2hQXGiv51KTMOb/aTOduCEt/mHy2Xc6a P67aY4MPpisxv3y21n7C8A38A5IHceSDq1kLs9foQqw4hYOfLitgdG2oAtdOD7hIIRan zotcgyZjzb7lQ8JeV/HrNINx8ZAAN4snXBhrz6VHCyUCJ3BVjhKxNt8233C/J8pxBl8+ c3IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m2uEMCvz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si9844296pgh.422.2019.02.11.07.02.12; Mon, 11 Feb 2019 07:02:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m2uEMCvz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390158AbfBKPBU (ORCPT + 99 others); Mon, 11 Feb 2019 10:01:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:49322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389723AbfBKPBR (ORCPT ); Mon, 11 Feb 2019 10:01:17 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7359206BA; Mon, 11 Feb 2019 15:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897277; bh=DUV09jOpbEhYt9PKpImXw1mT5uaHkrXAeJBMbrcG+Qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m2uEMCvzFL2VeA/zCqfEayqv338QAxg5s9QOVRfHk3doyT0fMW/+RSZ7NozQdyWuQ 2porapUATNalBxg0511vw+fsS7D4rF3HInyCDvAhxbgVvvy/J1oawruzlNxscm1P5k 7eBkweuGN3AzdlJzzcRmmtNpuc11XGEZJN5+mhD0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Will Deacon , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.14 147/205] scripts/decode_stacktrace: only strip base path when a prefix of the path Date: Mon, 11 Feb 2019 15:19:05 +0100 Message-Id: <20190211141837.957131175@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 67a28de47faa83585dd644bd4c31e5a1d9346c50 ] Running something like: decodecode vmlinux . leads to interested results where not only the leading "." gets stripped from the displayed paths, but also anywhere in the string, displaying something like: kvm_vcpu_check_block (arch/arm64/kvm/virt/kvm/kvm_mainc:2141) which doesn't help further processing. Fix it by only stripping the base path if it is a prefix of the path. Link: http://lkml.kernel.org/r/20181210174659.31054-3-marc.zyngier@arm.com Signed-off-by: Marc Zyngier Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 64220e36ce3b..98a7d63a723e 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -78,7 +78,7 @@ parse_symbol() { fi # Strip out the base of the path - code=${code//$basepath/""} + code=${code//^$basepath/""} # In the case of inlines, move everything to same line code=${code//$'\n'/' '} -- 2.19.1