Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3636210imu; Mon, 28 Jan 2019 08:12:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN5aOnq0V5S/jaZYXag4SGaq1isnNTAcDplTjXKhkbe6UY7nVOORICJXnNYyDswo0rIxetRY X-Received: by 2002:a62:3943:: with SMTP id g64mr22770141pfa.114.1548691950495; Mon, 28 Jan 2019 08:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691950; cv=none; d=google.com; s=arc-20160816; b=GuSdFuX8rPSBqgTFH9HcWAse/kkUX5niUS/qImwYfrYG4mZUIABWTvfWmjtVNuKFE0 pqtvd8tbN1wDRXEB3SPBFzx14Xla7uXJTG19xc7jVU2XkEtlb0EJ3OWA+wzolpzPmxI+ V6YRkLgdBrL16cp66BjjK9/kiUA1vtQIV35ISlPThGMzZaJpaK0gOBLl9eaYPRyFmaPK lismlo/quqHYuydWHjUN87k8Nr4whzdFaQn9lsRKXg0Hc8S24OR4vY+0dtIC/QZCYEwb h3gkdxL2RaB8mJVnSQoCCXVFLdhNacpnA0iZ9RBSoNxlm6eazJypZM7Mob4DDt7mnDUj AnDA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ngMALJOWMke7DAbPjkghNmovEBcgRGaplkzuO6JcsxM=; b=FxqfgygpcspzPVs+vSHCAyPaGujeyikJS1/HKMvFcDB1gNcbT8pTks6Lrcjcm9zIhc AFul9IZdopkia55XMVh1EZDI+QY7j8zgIp6yWZQa/S1Pf4I/dIEi4RoBCtZlFsD12WW6 B47WWZ894DjVGzFo0vvnIAmUnwSdlaO0v3MEjQsutsygS823tZccxD+zFus1vjk3QxDp oJO0dXMLfeH3iy59RfHgSt97JtkeD4ZD3RXFKEa5+fuNMdF1pIDdzJwQHSayk+keW/Si VjMF/e+x8AjJXAHprCCbw1VYldJt3PFuMGsWS25Gxo51lZv6OPwOISzZunvxPcMQUpSI tNDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QTbN0G0z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d33si28792806pla.359.2019.01.28.08.12.15; Mon, 28 Jan 2019 08:12:30 -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=QTbN0G0z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732837AbfA1QKh (ORCPT + 99 others); Mon, 28 Jan 2019 11:10:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:36728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728387AbfA1QKg (ORCPT ); Mon, 28 Jan 2019 11:10:36 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 818FD2084A; Mon, 28 Jan 2019 16:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691836; bh=ha13/+c1hI0UVFahTPcIqef+Yu7NvF8dQGclnD8mjb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTbN0G0zpJogKq4pSkYq3z26hZjZ0fpAWxzbBHBzxaJv7Yr4FBaLDdnRwb4ZcGc9p ipZbqZ+lIBbrLVJPzzizX8Xhnv8vH4cErkFalPlgEkZAp3ineLBs5skaTOETMoSAOZ 3bAnhYDIx+WrmZFur2UdecC1L2DAAweuIBSy8luY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marc Zyngier , Will Deacon , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.19 233/258] scripts/decode_stacktrace: only strip base path when a prefix of the path Date: Mon, 28 Jan 2019 10:58:59 -0500 Message-Id: <20190128155924.51521-233-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier [ 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