From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEE17C433DF for ; Thu, 30 Jul 2020 08:16:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C43622075F for ; Thu, 30 Jul 2020 08:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596096967; bh=WVGseNld/B1+IQwECE9FwtgVtrQctphA6KMqHwfC9lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FeUaB5EnsOu8FFLVH9cdAATeRwNWNMJegmz3wzmCUOsGOVaQz/Euwbcvzgi7zhL4X AGLxwb1aHUj11fJDGvMHg+vSp+43OixDAvPxadwb/SoSFeoKhm5314iJ3DtZR+3sfC IdcgoTL2IBJ5Ivl6v7NkCGu+NRUfKMwyccpK956o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729331AbgG3IQG (ORCPT ); Thu, 30 Jul 2020 04:16:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729556AbgG3IL1 (ORCPT ); Thu, 30 Jul 2020 04:11:27 -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 5CCFC2074B; Thu, 30 Jul 2020 08:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596096686; bh=WVGseNld/B1+IQwECE9FwtgVtrQctphA6KMqHwfC9lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O/pHUYMcSxI4HWhUvytln0vS545DwTibF9iXsQaGSRz7OqAnqcIsL70bxih0a1AOl BZF/cB5aZMP33bmqFAo2QlVyJ/MQsJY7fz3ruqbebn4B78tpwGtluiz+GJ3/KCLvf2 QxFGnbTWkaxFkc/P0pFJ/nN0VyChInJCPk2QwFmo= 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 4.4 21/54] scripts/decode_stacktrace: strip basepath from all paths Date: Thu, 30 Jul 2020 10:05:00 +0200 Message-Id: <20200730074422.227700703@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200730074421.203879987@linuxfoundation.org> References: <20200730074421.203879987@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 4f5e76f76b9dc..003968cb04d4a 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -63,8 +63,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