Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4882516pjb; Mon, 27 Jul 2020 07:31:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqQ/8gzNv3cnG5E+f9+EmP3C4uNSGyJDNFaMIigaPm2v2apIBWRjTmamwX8lleyQKYuK6k X-Received: by 2002:a17:906:b294:: with SMTP id q20mr3479176ejz.223.1595860289131; Mon, 27 Jul 2020 07:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860289; cv=none; d=google.com; s=arc-20160816; b=QZJQ8opl5JoAVBeLMvC0vhxFWiyUpQVPC0m/NSVWTM8gTqRA+6PeH81/omeOpCPcr4 6E4Hz1/fA+Dvgci7l7+qf5pqW9WHCxHBB5cXqygsVPx3gOZYpjbqMyZw4lqaw/2QA8sv 3RfqLnlXDIXjaxViW757DezCF5gr8WBLfqWhEV4RnjJPlyfX4urhZBEXREV8YXfmEX+B 1Xjz8ykiq18XpMVEGjD1ZMGwF+aPcri70uIWG6yn5wwLwVdNBOHuDcNjwsVyi7WNzuaB K6csRm58fNnkBVlKzToSQDr2gaM+CZF1VyGFuV6K4Wll1/vbQC2CRFvD1k5MMp1KMToO 5kGg== 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=aKCmW7AwqQDVpnUJlWp0LNQvrhA1MzrwNIAOnrL5hFw=; b=paptm5mVDlZxVlqcyohgkQarNChvNZJRkIis3Etg8M+TJxfZjCSYbbZ7l9XbleBbos ChTM3vkCZ1GqkRAv62iKhN0bKj4XqqWVg17aQulrGpIs8UWXphLNoMaYEuXjvoIGscYe J0dek9qmis4LoHLDME6WdE9roZPAz33Ua9uwJS3iwdkQ6hGsRiW9ESPgmMALiBJldAnr IAaQWToAa2/eXYys0K2/IdzDObMOu2Rm4iQOdtA6Y4MkAo+Yb3VZ49BYEdtUsMnEs7m+ PG0yyl9oH1ky6vqS0lsExvzlOZx2Uds4DU0v83Eh2t8WwTUp+xbtaW84+xgnYzbqdaxX QzEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HCF5Pukc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si5691267ejx.45.2020.07.27.07.31.06; Mon, 27 Jul 2020 07:31:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HCF5Pukc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731951AbgG0OWp (ORCPT + 99 others); Mon, 27 Jul 2020 10:22:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:51728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731924AbgG0OWn (ORCPT ); Mon, 27 Jul 2020 10:22:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 7209A2075A; Mon, 27 Jul 2020 14:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859762; bh=5zQqoD96yDS07C+kDyvDQ1xSEMfj4vIcSvr/g+YgXR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCF5PukcNzZJ3Nx3rbonF5NgvVk3nZOmteAaiQD4dWwf6de9tsfoCIIOQ0RZjR2bm oe81dipJkFJeNJ2xPR2c/eN+gthUm1k9FLc2iXZgeCEGfCSpPpl1tIyTNdT/9WEGqU jLxzbJAQ5OcgLI0ziuDadsuGrISsEnJ3lTgxXZao= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pi-Hsun Shih , Shik Chen , Andrew Morton , Stephen Boyd , Sasha Levin , Nicolas Boichat , Jiri Slaby , Linus Torvalds Subject: [PATCH 5.7 096/179] scripts/decode_stacktrace: strip basepath from all paths Date: Mon, 27 Jul 2020 16:04:31 +0200 Message-Id: <20200727134937.343746664@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Pi-Hsun Shih [ Upstream commit d178770d8d21489abf5bafefcbb6d5243b482e9a ] Currently the basepath is removed only from the beginning of the string. When the symbol is inlined and there's multiple line outputs of addr2line, only the first line would have basepath removed. Change to remove the basepath prefix from all lines. Fixes: 31013836a71e ("scripts/decode_stacktrace: match basepath using shell prefix operator, not regex") Co-developed-by: Shik Chen Signed-off-by: Pi-Hsun Shih Signed-off-by: Shik Chen Signed-off-by: Andrew Morton Reviewed-by: Stephen Boyd Cc: Sasha Levin Cc: Nicolas Boichat Cc: Jiri Slaby Link: http://lkml.kernel.org/r/20200720082709.252805-1-pihsun@chromium.org Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/decode_stacktrace.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 13e5fbafdf2f7..fe7076fdac8a3 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -84,8 +84,8 @@ parse_symbol() { return fi - # Strip out the base of the path - code=${code#$basepath/} + # Strip out the base of the path on each line + code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code") # In the case of inlines, move everything to same line code=${code//$'\n'/' '} -- 2.25.1