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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 9F421C3A59F for ; Thu, 29 Aug 2019 10:51:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DA7C233FF for ; Thu, 29 Aug 2019 10:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567075894; bh=bDJz9xX1crM9Y0uzvGfY1u0ZAJuD2fDp31TudgDx6m8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zDx7nzTBzH1ErtiZxmsKzZI5Jic5wlsI6zUJeIZn6PYUvh9bflk0CmIllfOKnJ8wV OnBzDfeVbaQiLWtb5P/9stbbiXrQ7m1aYaaZcdRulaN4V1TKd6wWX8JFvJg1t253cL pol3X+hHhB8571GgK7MYfe8OLrlBZM2z77gTdhSg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbfH2Kvd (ORCPT ); Thu, 29 Aug 2019 06:51:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:58840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728474AbfH2KvI (ORCPT ); Thu, 29 Aug 2019 06:51:08 -0400 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 63E9223405; Thu, 29 Aug 2019 10:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567075868; bh=bDJz9xX1crM9Y0uzvGfY1u0ZAJuD2fDp31TudgDx6m8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yJcm+k9prndysGZVC7SmopvRR5oZ4OpiykltmQry13r1nb1fJN6eR5fGb/EyFnfft rdBGwjpoeKyQhwMNNILY4Gt6GxaOd7aBdbc4wx3BKsTduSFssvd4hSCuklmRfBPHXf A9kXNV9qoe8p8UZVtzbtWXFRVBIEyk4m1VsKvkto= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicolas Boichat , Stephen Boyd , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.9 6/8] scripts/decode_stacktrace: match basepath using shell prefix operator, not regex Date: Thu, 29 Aug 2019 06:50:58 -0400 Message-Id: <20190829105100.2649-6-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190829105100.2649-1-sashal@kernel.org> References: <20190829105100.2649-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review 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: Nicolas Boichat [ Upstream commit 31013836a71e07751a6827f9d2ad41ef502ddaff ] The basepath may contain special characters, which would confuse the regex matcher. ${var#prefix} does the right thing. Link: http://lkml.kernel.org/r/20190518055946.181563-1-drinkcat@chromium.org Fixes: 67a28de47faa8358 ("scripts/decode_stacktrace: only strip base path when a prefix of the path") Signed-off-by: Nicolas Boichat Reviewed-by: Stephen Boyd 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 381acfc4c59dd..98cf6343afcd7 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -77,7 +77,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.20.1