Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp715955lqp; Wed, 22 May 2024 19:00:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEys3a8ZRV/U3ISQ5DHbEL+RValp6I03Xvm9MWxKozu3iBliirAEm4wfzCZpUMTv4ymR2utdzy+d9cmCHqW1r8/etjG5t4HOPXWJwO4g== X-Google-Smtp-Source: AGHT+IHGWu9GQG8Y024eYlM8ehglM0KXgicRnQcJ2+Z+OiljfmIjCVN4jQk0DdIa1O5sR73Ek5HM X-Received: by 2002:a05:6359:2c4e:b0:186:27ce:639c with SMTP id e5c5f4694b2df-19791f21474mr391030155d.18.1716429647621; Wed, 22 May 2024 19:00:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716429647; cv=pass; d=google.com; s=arc-20160816; b=GmkkMG/M8hif0Qj727YuFmoI1AaUUDIQfsSBuuCcZIBJ0EMElDMPC7pi6xiJ48ZsSz wy8VkkDt0XVFXyh+dC9633G73RumMZDArxaUC7rkvj7PGFtIxAoiyd5qaiw2xYhAllxW hi18aop3AMDaf+B6me6QNtVFndoU+d0C8yLcHo6zZrvYnBNH+CrLTmIcU5JIgCeKxPCq OXSTf2yeo+QYlDQgl7Y0Z1NiUwKsQMSiX1+B13filRyWHFUXqU2rWBF1Fr9C1KX/Z6WE skMZTrBjv+t7Sn17juVJre2pIPUZ0JKuAH3z9rHEmEVzyzZKfIcNbZpTsWb8lXwTwsYw ZjUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+LiIFNnp6+uDCpIGI0uQwzsJP44iemqQPuHh35TTH/4=; fh=lj4j4DD5Hn0dfxUdP1Yp41hNXnLopXwSGCjv6zKOR0U=; b=avAPp8J3XU9WLRqLYlEvhFBHAWuaqA8XVoHXiQdGz6Sm57l11wjzwIHOndNme7WzhZ 5NPYIWLMCRclh6QDD3Xz8GcUSMQRKRjGjpzHm6JohxfpSW49P7a/9dGSHRGKkNTHEHPc 7wwnXXthyxoLsasFHJLOZYdmeqsu7KYoUo3qnqBuWBLRqRUaLHi3Wnwb7NVKcxA1LsuH 6QIAClUtph1jDoIWc4NhVPmS9LbcPV/dnCYKexI1tsB9Hkh1CWlH9rrKn4BUovolPDIr GW8/84faB2460Cy/x0LGZlTEtETjIQTkrm0CVKzfpQjQ6PtYvAGKYS7SovhUgIvbf/Fs k6xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="T/7Y40EX"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-186898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186898-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6746c84578bsi1147765a12.585.2024.05.22.19.00.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 19:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="T/7Y40EX"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-186898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186898-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C02312828B0 for ; Thu, 23 May 2024 02:00:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06A81187F; Thu, 23 May 2024 02:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="T/7Y40EX" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACC0229AB for ; Thu, 23 May 2024 02:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716429637; cv=none; b=elqGSRdT+YEFyl7igGeTeIt1NLQkxrX2FzqrvCQHNH6qI71yUMikFS9FEK8pnE/WF+X35zF8ul93T7SKeKhVTJLz+6hNB4IYLIQ5daK2L1zCxryUxcu/ZgrpOwJWzmMMS+4vQ2s+fQg1ov2TAEMAYOkkMhi5AMoLoCJXkfaho7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716429637; c=relaxed/simple; bh=5LuGAZn2G3frjwFiOv9YFsKhgCgVPleiTQXpWm6omWQ=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ORmgFDbua8pPsF7GfhDxc0nyAU/XJPSC7NKRPqHkdP54NVlmwUfrG67WlVy9/ZcRMuvPaxfHT6aJ8Cn/1wSJLnRpdH+gWdsxmN3/2YKcLCQyteR4Am6gKvXbIgXjIQrt5YmW6AbWzXJhQ0cmEzS/UQAAd6GVCBeGVd3kfIgn03Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=T/7Y40EX; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44MMlVAQ021900; Thu, 23 May 2024 02:00:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=+LiIFNnp6+uDCpIGI0uQw zsJP44iemqQPuHh35TTH/4=; b=T/7Y40EXa5Aunn831lSIzB8/MchWN4FhKZqpE TkUQVGHEKj2/WDyvXybYE9XcZax8Nt9EUDu8R1BpD7lvybwJc4kP/MKzILjRQP8V 8k7au/LSkLyTMHVMlPKSYcAfbdgftzqyFIER9m9Y+e3agidJsigrQnxGSsBqloEm 2iG7qv21TpBZh7eBRX+wowrMgB/GtH97k1ATIAmeBSIM1nvNQgAXzN9YZQmx87US V1O+dRm51YcvcLnuqrv/8rqgw/8DTfn+n4k3SJ1N6tkVLhQ6L/Z8Yvx3+EMiX+kg oKv6pdn4UQt2Az/BCQftl5MmBS1V2g5E/oNOKbwGjP3KwGAiA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6pr2tcwk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 02:00:32 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44N20V5b024652 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 02:00:31 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 22 May 2024 19:00:30 -0700 Date: Wed, 22 May 2024 19:00:30 -0700 From: Elliot Berman To: Xiong Nandi CC: , , , Subject: Re: [PATCH v2 2/2] scripts/decode_stacktrace.sh: better support to ARM32 module stack trace Message-ID: <20240522185741891-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240521194010043-0700.eberman@hu-eberman-lv.qualcomm.com> <20240523010318.12934-1-xndchn@gmail.com> <20240523010318.12934-3-xndchn@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240523010318.12934-3-xndchn@gmail.com> X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: SnbSIRKPCwKH0CNOIzPaKPfb-F7DeyVb X-Proofpoint-GUID: SnbSIRKPCwKH0CNOIzPaKPfb-F7DeyVb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_14,2024-05-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=651 bulkscore=0 malwarescore=0 spamscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405230012 On Thu, May 23, 2024 at 09:03:18AM +0800, Xiong Nandi wrote: > Sometimes there is special characters around module name in stack trace, > such as ARM32 with BACKTRACE_VERBOSE in "(%pS)" format, such as: > [<806e4845>] (dump_stack_lvl) from [<7f806013>] (hello_init+0x13/0x1000 [test]) > > After stripping other characters around "[module]", it can be finally decoded: > (dump_stack_lvl) from hello_init (/foo/test.c:10) test > > Signed-off-by: Xiong Nandi > --- > scripts/decode_stacktrace.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh > index 2bc3a54ffba5..324e4a6c260a 100755 > --- a/scripts/decode_stacktrace.sh > +++ b/scripts/decode_stacktrace.sh > @@ -283,8 +283,8 @@ handle_line() { > > if [[ ${words[$last]} =~ \[([^]]+)\] ]]; then > module=${words[$last]} > - module=${module#\[} > - module=${module%\]} > + module=${module#*\[} > + module=${module%\]*} I think it'd be better to just remove the parenthesis similar to how is done in the symbol name. That is: module=${words[$last]} module=${module#\[} module=${module%\]} # some nice comment explaining only the closing paren is # need to be stripped module=${module%\)} modbuildid=${module#* } > modbuildid=${module#* } > module=${module% *} > if [[ $modbuildid == $module ]]; then > -- > 2.25.1 >