Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2751790imj; Mon, 11 Feb 2019 07:58:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZKv2qt1nATzLc/cvE9ifJ5UUKgW11rcvJwnbPy9kM8wpK+WX+ERlT9z/c58V0aClzm2bf1 X-Received: by 2002:a63:9751:: with SMTP id d17mr33340326pgo.392.1549900717162; Mon, 11 Feb 2019 07:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900717; cv=none; d=google.com; s=arc-20160816; b=gGIc/QWgmCkm727+cdDrz0k+T47DGDFSZuS2YdQjjxwcFdhSEn0bmnftMP/XtIvsxO tQYK9utZhsrx8F/pXzZKhfNk5ogYIvyLWndwzXwRCqLxeV9WCfJyaSYqDN7RxT0kD5WB Qyte3iSYV8K7WiVjMom/zxGgX8RGDVdFG19gTjRdyOGwVyexxPMSuAyg9sIyYvMqjzPt 8nqWp3A4NQXUXZgj2ISBuXiGfkM3nIlacLHDUk5M1swsE19iaYYeHXqUqL5C43jG86A2 yWf+x7b1AR6+FkT8vDiXQNAaUF0JzmgqUH3cocf76o+dC4mKJr7RqWx+5xT6G6vfZ7X3 RXPA== 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=xGVu35ZsdbJNAkzLn91IDCQZAGR70ec+p26R2pUaGbM=; b=kiLgj0eDfI1Xg5rGAz3/GSQ2AL3sR1xl8/anV6lmekKLGIdMgIQqTsex5+0MiKk78P 1b29+pVes/usxPKGRCF0LZhmJQetXxVBcNhhUENoNxEf9puimnMXX3p+bjsZ1xXUViFT kgv8XKfuz52kg3bCU2UxtM+9CnvnGJRn3j11KoZ3svqOaIdTJXAvw+SIPuCejyTPmutN fy3pOcPyJ2Ef5ILDMxCaSKyHSRS85L35QdAsAT6ov8kNZxyO1TWIKdZxVzSjZua7WKIt 3f45MDvuLE0jGHrLP9FyfMW3T21mdrOzRURyUu8hIwfD0lCKwlM6KsfmfNH8yhFN/q7I kMZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vQiI1f7A; 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 f6si9511264pgd.362.2019.02.11.07.58.20; Mon, 11 Feb 2019 07:58:37 -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=vQiI1f7A; 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 S1730680AbfBKOdj (ORCPT + 99 others); Mon, 11 Feb 2019 09:33:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:41404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730663AbfBKOdg (ORCPT ); Mon, 11 Feb 2019 09:33:36 -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 6FF3520844; Mon, 11 Feb 2019 14:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895615; bh=vmUBlkJyVkWZg1zec2jWCt0mFC3ocmcJM6Z2rV+x3SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQiI1f7A8yy4v5m+PY8LZAKYq0iKPg0qHbInX4NwgiUq1MV/FmSxpP1m0SBflWV1k fZXA7/4G7UK4w0pLiOFKx559BzqRteNA160xiZTQpkflTkevfsp4pHSP1aoSKFyPg8 g9Gg+SImAaAg/bWQpTf+4z4PyT8RpFMRdG+wjWN4= 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.20 264/352] scripts/decode_stacktrace: only strip base path when a prefix of the path Date: Mon, 11 Feb 2019 15:18:11 +0100 Message-Id: <20190211141903.832797313@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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