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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 5107BC3A5A6 for ; Thu, 19 Sep 2019 22:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CE2921907 for ; Thu, 19 Sep 2019 22:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568930862; bh=T9iwYbpHIaYcR1ObrXmOlOde3mk1fmj61LLaKMZLwwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=u/e1lZ1aHdC8OWCvfnCTqHAn3XIRLu7WYzc9IZr2YcV+rVYhdT7dtCElT5emSY2mQ adVMvUXjJCNPJAXJteFHPA0azycoFOly10HSiz10YK6gRkI4STu3HaIHrfHqhbxKET hmlfyFfnCBo6Rd+D5ZNpOZYfS9KUwFgTQoyV4Hvo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393275AbfISWHl (ORCPT ); Thu, 19 Sep 2019 18:07:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:45336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393260AbfISWHh (ORCPT ); Thu, 19 Sep 2019 18:07:37 -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 BBB4E21907; Thu, 19 Sep 2019 22:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568930857; bh=T9iwYbpHIaYcR1ObrXmOlOde3mk1fmj61LLaKMZLwwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fBMwqFllH7Pss9TwY1FCZaAOWxTWfFfTd1yPNyHF8cBAGLTfjxdT9ZC5zufXO9NYs y07ivpMV3+ndf7sdeCyvDvckRwWFWnWo//Ep/pECmbfCFEr3RG9Er06y+siZEhYu0c MY56B0N0BUFdsylryo9lb2qZCzcXXD9r5Mmc5pGQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Boichat , Stephen Boyd , Andrew Morton , Linus Torvalds Subject: [PATCH 5.2 012/124] scripts/decode_stacktrace: match basepath using shell prefix operator, not regex Date: Fri, 20 Sep 2019 00:01:40 +0200 Message-Id: <20190919214819.599451200@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214819.198419517@linuxfoundation.org> References: <20190919214819.198419517@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: Nicolas Boichat commit 31013836a71e07751a6827f9d2ad41ef502ddaff upstream. 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: Greg Kroah-Hartman --- scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -85,7 +85,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'/' '}