Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1107150ybi; Fri, 31 May 2019 14:03:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxd7p1kRYlD1aGfUuc3fYlJJf1YNOlfZYwc/KALQCvN1t87xjO5kHSi2NUXbfVXCtcoL1N X-Received: by 2002:a17:902:42d:: with SMTP id 42mr11491082ple.228.1559336620954; Fri, 31 May 2019 14:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559336620; cv=none; d=google.com; s=arc-20160816; b=PuA7IVuoWkdYIbr8VRf1/QuLYAn87jtuayOeytzEoz/zhCwjmQNCM9OotGfVW1fbtJ 5F5ELAjZ4ubwFP9Gu1wq/Sx90Cw4ktnYF2iBUvdMNQim3pwTnZghePpAcL6D5eoPlSCd 9ojuHiDTwmBH71oQCfnQPHUfhh6kOAySxZT3tGKhjsT5YtTxTkrbefuJlLLK7bpLGTvX 12IpRYxW4jCA7W9FZPtNrdKWzuT5KjkV7x2J3OhvH9wJoAcuVBZVYEmIFpKPM+Dys9tT k0+09upv+PMFVJ3gd0NT8kwYCV0FZNB4Mx+5xsSFrrW/UjRNnIFGKextZKcNizpA/xGZ U1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PuyCAOWAhmD+YZO0ugz0gJOz+hoKh/oSXrFPY7bljN8=; b=KsHnx6JAt+2C53+QIwRrGGV2zCY7MlphjEn9NGWFspH38E5cUYQPoKfXvfa5oeh3YO cGT3IvMCIa3mBDdn5zLM9pSQzz5wex8YVW+QsZ+7StWm1y0+Us2gn2GQcGxer3cj7u0B iUrSiZCp0YVhSq5eq/m/a4CR5X8BsV4jvoIO4QTzotGdKoN0AQ0G35Wiu1yD4s4/OEjZ pOts+OIuATTAgLQ/ghRRAM0mVE6TOtQsRRkdjBEvwD3CFR1tPV6509peBuGL8gC852d4 9OdEZ4m+fORdzx6dTH/KZtcPVwWaCH34FzEMW3lTQ6yzFqNPtLTl1ps9vfoJvJl4Ggn9 0fbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EZtEimIe; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si7414760pgw.226.2019.05.31.14.03.23; Fri, 31 May 2019 14:03:40 -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=@chromium.org header.s=google header.b=EZtEimIe; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbfEaVCJ (ORCPT + 99 others); Fri, 31 May 2019 17:02:09 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:45809 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727196AbfEaVCI (ORCPT ); Fri, 31 May 2019 17:02:08 -0400 Received: by mail-vs1-f66.google.com with SMTP id n21so1832032vsp.12 for ; Fri, 31 May 2019 14:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PuyCAOWAhmD+YZO0ugz0gJOz+hoKh/oSXrFPY7bljN8=; b=EZtEimIeHcrXqTbgifI3uHjto8/jboSrzUJb1iNZd+j4B/Ut+MLkTKkExtCcXvfkd0 Nq9gV4hFY8zrUp10Plig/aEE/IafJCPXYNOqz2clS1TPU/8O9wItnP8shJZIRXK22qqV VDMlkjbIc1Nxx5kHdpFajj6qMS/G1I45Tfvl8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PuyCAOWAhmD+YZO0ugz0gJOz+hoKh/oSXrFPY7bljN8=; b=nTt9iokhboJBmPXiKbLJcHA8oxdsitp7xASKPA0d8ImaoGBNTO7r1n7k46qkhluDlA j4Q7ntBDLurkRxgWtPSAevBC7NCRD4IEV5DwA4hFLxn5qjQNsAqzggnsDaT3wCiS53gS 1/o5IVONoiudb0XqUUeFCarjgdHTrmfBGAoh3kVzP7ZEv/2CjHWHBb2MLq7F1gmoWcDI C7S1TcBmP7YY0FLDpBY/Ssf19PF9mMkZWqZzFKv3TkpeCdrccR4cX3fz0wNEhINlt0um Hw3e+yl3c0+KMHWLzhkTqAh+osIcH6+v9QDhqJ/Tpyd5rnEm1oPkns5Ck/n+kdHT8cg5 vIOA== X-Gm-Message-State: APjAAAVpPyOsS8kkTb7ixCWUTGHN+xXNSz5GctaDU4C5IQAmkAsPIIVh vwzoHWqzCjcbbps9sVYNCgvd8RydX6o= X-Received: by 2002:a67:f607:: with SMTP id k7mr7143278vso.169.1559336527508; Fri, 31 May 2019 14:02:07 -0700 (PDT) Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com. [209.85.217.41]) by smtp.gmail.com with ESMTPSA id l132sm3529394vkd.39.2019.05.31.14.02.05 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 14:02:05 -0700 (PDT) Received: by mail-vs1-f41.google.com with SMTP id q64so7602693vsd.1 for ; Fri, 31 May 2019 14:02:05 -0700 (PDT) X-Received: by 2002:a67:1cc2:: with SMTP id c185mr6238259vsc.20.1559336524877; Fri, 31 May 2019 14:02:04 -0700 (PDT) MIME-Version: 1.0 References: <20190531205926.42474-1-evgreen@chromium.org> In-Reply-To: <20190531205926.42474-1-evgreen@chromium.org> From: Doug Anderson Date: Fri, 31 May 2019 14:01:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts/decode_stacktrace: Accept dash/underscore in modules To: Evan Green Cc: Stephen Rothwell , Konstantin Khlebnikov , LKML , Nicolas Boichat , Marc Zyngier , Manuel Traut , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, May 31, 2019 at 1:59 PM Evan Green wrote: > > The manpage for modprobe mentions that dashes and underscores are > treated interchangeably in module names. The stack trace dumps seem > to print module names with underscores. Use bash to replace _ with > the pattern [-_] so that file names with dashes or underscores can be > found. > > For example, this line: > [ 27.919759] hda_widget_sysfs_init+0x2b8/0x3a5 [snd_hda_core] > > should find a module named snd-hda-core.ko. > > Signed-off-by: Evan Green > --- > > Note: This should apply atop linux-next. > > Thanks to Doug for showing me the bash string substitution magic. > > --- > 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 fa704f17275e..13e5fbafdf2f 100755 > --- a/scripts/decode_stacktrace.sh > +++ b/scripts/decode_stacktrace.sh > @@ -28,7 +28,7 @@ parse_symbol() { > local objfile=${modcache[$module]} > else > [[ $modpath == "" ]] && return > - local objfile=$(find "$modpath" -name "$module.ko*" -print -quit) > + local objfile=$(find "$modpath" -name "${module//_/[-_]}.ko*" -print -quit) > [[ $objfile == "" ]] && return > modcache[$module]=$objfile > fi Reviewed-by: Douglas Anderson