Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3842132ybi; Mon, 3 Jun 2019 00:54:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMbtRJSl1t5uvTH8hAMLEbIJcX7ZIcI47Khnykw/hc5Ozi6jhiQrO00U9lhC0dxxWUTEdA X-Received: by 2002:a17:902:bd06:: with SMTP id p6mr27748288pls.112.1559548450826; Mon, 03 Jun 2019 00:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559548450; cv=none; d=google.com; s=arc-20160816; b=UP5R55aYepMc7i4AxspMpPNw7LvcI9UQ5UxATi26rymm4y5ISYmHWcAj/cpJVM0KK8 pd2bn9DsV5bKOTf+fdjL7TvGVt3RjtxPu9kaJmMDc8s2uI3qtJyrzzXhlmttQe9gxAfZ Iu/ZI6ILmuF5IbkJrZyiXL28jLZRsPprTYTy6Gikjq4lhPdjZLyFttNSFl9hy4Ox7uUc gMFIsRPB91fRJDVoCHrTXQanEBWxJi3I8EBCOV4/9kkbFCK5BEzjyHHzJFJAz6/uMDXe Q07jQ1CUotuFjEXzEX1oiPKRrfDLEau8OrZwb/LdtVLT88OGe//NvXJLuqX6g9ri38rA 52Qg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EiLbVXDQ9KTjFwXlIVvmEa04sb6AaLzJfqDuh/MDD9w=; b=U9O+DZJZ4j8BVxQJarrxPs60yPEpwz3AatcnB/sZJYO4TRk0vy9MmKPXCTXoiT6bet vwsjX/kqaUbM0NrWbdBOlRORkxIqY50ZVzBhFnf9voUM6mTBfRP2tDeuFp9DlJvIq7YR aBr9GE88lm4kmPCuR7jxk+qObLr6SxmLII/vARJ2q1jArrGAxEnAZTCcXZF9CwbJEcKe JIeERfvEjnT/dvtNmWTSmpTEfJTxIWrC/TWpQo476k7seKJx56JcWTCxZ/VRFzTGvOT4 Oxz1lry584yk5rwuBwFrYqkoLGaU5EQABpUFnE5FftijitBaHdSmWsnh679wtZRGY9km SYFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex-team.ru header.s=default header.b=wbmlXMsw; 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=yandex-team.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64si18522596plf.128.2019.06.03.00.53.53; Mon, 03 Jun 2019 00:54:10 -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=@yandex-team.ru header.s=default header.b=wbmlXMsw; 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=yandex-team.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726826AbfFCHvI (ORCPT + 99 others); Mon, 3 Jun 2019 03:51:08 -0400 Received: from forwardcorp1o.mail.yandex.net ([95.108.205.193]:51424 "EHLO forwardcorp1o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbfFCHvI (ORCPT ); Mon, 3 Jun 2019 03:51:08 -0400 Received: from mxbackcorp1j.mail.yandex.net (mxbackcorp1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::162]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id 1FDC22E08D3; Mon, 3 Jun 2019 10:51:06 +0300 (MSK) Received: from smtpcorp1j.mail.yandex.net (smtpcorp1j.mail.yandex.net [2a02:6b8:0:1619::137]) by mxbackcorp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id HTQF86XK9T-p5pinl5f; Mon, 03 Jun 2019 10:51:06 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1559548266; bh=EiLbVXDQ9KTjFwXlIVvmEa04sb6AaLzJfqDuh/MDD9w=; h=In-Reply-To:Message-ID:From:Date:References:To:Subject:Cc; b=wbmlXMswhm/ulrxOK2IH/j1fDipp2dW0BgDjHPEGoRqgGphlRiFFp4r7QaBAg6QGY pxGfgHAzyviLOtN8evRTSJsxqrxbYj0v3Itjd/YTLPCED78F9Y0IASqV1FcsB8ktIS J80ABDO0/b6ACzSeHqaKpsMaSZ6bsFNXXAxbTOiw= Authentication-Results: mxbackcorp1j.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from dynamic-red.dhcp.yndx.net (dynamic-red.dhcp.yndx.net [2a02:6b8:0:40c:4c89:a73d:8d94:91a5]) by smtpcorp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eczyja9xde-p584J5fc; Mon, 03 Jun 2019 10:51:05 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: [PATCH] scripts/decode_stacktrace: Accept dash/underscore in modules To: Evan Green , Stephen Rothwell Cc: Douglas Anderson , linux-kernel@vger.kernel.org, Nicolas Boichat , Marc Zyngier , Manuel Traut , Andrew Morton References: <20190531205926.42474-1-evgreen@chromium.org> From: Konstantin Khlebnikov Message-ID: Date: Mon, 3 Jun 2019 10:51:04 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190531205926.42474-1-evgreen@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.05.2019 23:59, 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 Acked-by: Konstantin Khlebnikov > --- > > 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 >