Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2116522ybl; Thu, 29 Aug 2019 03:53:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNN3ha0tBswqUCptrfz6zI6l/mzIoJJS4zPCYrPFgb3ZQtHh70jwVe9wHz3N2wk2HqqVBJ X-Received: by 2002:a17:902:1121:: with SMTP id d30mr9150368pla.174.1567076029341; Thu, 29 Aug 2019 03:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567076029; cv=none; d=google.com; s=arc-20160816; b=0WRljhFPkqFNxg1QUBCESzUq0jbVdMQZ24tUtnZvVicPf7VpEK/2ItjGtX+lgJqHW7 4TmgLoUFQmeCeTPLaJAt/YO+JTe1u5k8Za1Ac8eqUL9CzGJcn5SANVGGPhxfW3YuaP7H aar5NknPxJX01ZiIclvpOx/27uUi49V35j+ySfk9pADL/48+6oprxBvaoRbitANGxMLU woIVYMomCMOmqR+iIJrVLudp5nCQS4gFdnVUOgvoZIqHGdlvGhgQ2FM/VYQxddfrI9j8 2oUyHHszX0rLAk4H6tCCBkaiWdKyi+f/hhkCoEiMWot2XsvqtuHunRqws5G/uEMXz6nY 7MZw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wA4uBcAuXhf2pOBKErstOaamT0gQB+ASWHtdhnZCfp4=; b=k9Ugr91o5UB3K5Eqsokd0OpNzpExi3wUM5xl1YPgDSaa8cdxl4wX8tAZeT03cCJgxn Y+7hTK9OZ2h+oa9zD6C5eKvpyr7/FBSx/P/5F3cMdlnggGyVG350W4TWpxnCS13JOM34 4RCCYWwJyJUZAPL6USHHxVi/p/I/TRE7oKDwmJKQqJanrX/t55ZxgLOVtpJDiuGsgRxl qt33B5k4X1VQwRnVtlpdnLoXWQJH/01b5VB03bCKfb/TMgORh0mVyQ5tYhbC3q5kzAmY fSLxAQQY8mIKT/EntXwqB2X/u6/MSjZI7AS1kO469Lra3K5HFOv4eb0jWuHAwoZZ26P1 y8Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E7viI7FG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si1646602plh.138.2019.08.29.03.53.34; Thu, 29 Aug 2019 03:53:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E7viI7FG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728595AbfH2KvS (ORCPT + 99 others); Thu, 29 Aug 2019 06:51:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:58508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728347AbfH2Ku5 (ORCPT ); Thu, 29 Aug 2019 06:50:57 -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 362432341C; Thu, 29 Aug 2019 10:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567075856; bh=ArHiVFqSrRYIIOQuOR5tVWl00xvZYHqTB2s/aommuZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7viI7FGj60IF74j5/CFQKO9pDOdOBX7tXYHcw1Pmduw0lJO6q5epBu5FC30cx2/H WEe6jsBKUqWhCzUa+ZMjgof7AKnC2mK7aqSMHbelo2eea9HT5vEq8+XSETMunAIfyn IYge9x3ExyFEJ2+aOA2ZPZX2UCe/TNoFiQeEF5zA= 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.14 11/14] scripts/decode_stacktrace: match basepath using shell prefix operator, not regex Date: Thu, 29 Aug 2019 06:50:40 -0400 Message-Id: <20190829105043.2508-11-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190829105043.2508-1-sashal@kernel.org> References: <20190829105043.2508-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 c4a9ddb174bc5..5aa75a0a1cede 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -78,7 +78,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