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 EF8B5C3A59F for ; Thu, 29 Aug 2019 10:52:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7B6C23403 for ; Thu, 29 Aug 2019 10:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567075942; bh=xoxk9jxkuoOZfhocIiS0de+uIj2KTFu3DX/VP0RtgBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GqliGvaMr7umS1nYbqlP/NjtDvBWxNF+4B9YVJRIAqvSGcOTi76CFH9Lc9F+QtPmB K99OfidXWlxOLPUB18C8SoZ7nJORgFk3c3KQrOKGAIS506d6AVKiCgT/lkVZiN/PoF VlVwbD37aJhfjC4syce+x+f5v0dHG4+Vr/tP4v8M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728729AbfH2KwR (ORCPT ); Thu, 29 Aug 2019 06:52:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:59222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728559AbfH2KvR (ORCPT ); Thu, 29 Aug 2019 06:51:17 -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 A5A8323405; Thu, 29 Aug 2019 10:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567075876; bh=xoxk9jxkuoOZfhocIiS0de+uIj2KTFu3DX/VP0RtgBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r3OoZLel88WVmEfiqRKSbY/RmZYPSWeyjk62ZZdbnzK84bpyZvfDRxWE27JyhuOLA dpH+d6gZ8yUUhNcMkw2IHbrIWLaZq9Ma/Gnw7z2ycY3AbL/Qi3mA0eElYikNhPOO2c 2hq0yAma89xBmSS+J7yFOZ/Ex3tXeEQ11Ye4v02I= 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.4 4/6] scripts/decode_stacktrace: match basepath using shell prefix operator, not regex Date: Thu, 29 Aug 2019 06:51:08 -0400 Message-Id: <20190829105110.2748-4-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190829105110.2748-1-sashal@kernel.org> References: <20190829105110.2748-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 ffc46c7c3afbb..4f5e76f76b9dc 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -64,7 +64,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