From patchwork Wed Dec 20 07:36:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?S3Vhbi1ZaW5nIExlZSAo5p2O5Yag56mOKQ==?= X-Patchwork-Id: 13499622 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17816C3DA6E for ; Wed, 20 Dec 2023 07:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YrdW/+DAx4fWejPndC88kmJI6ITt1iYAWeradSidWRQ=; b=QdcdnYV9tSLSRV Fhscj1CpYf/YLcZ7D350xVtV6C851hVbX15ySSTMl5qcCtfEOASAvitWOMKPnLpcxv4+sHT7BtHyn 6h+w5Z5fhc3ypu1AapNrprLEsyJ1yET6NSKi+3rNfOTHTwqAEsYhIfjsNG1XMX66dk2x4UmUTdpVA v08F50mvp6ynwN57p7fOPkbmrXO840BvhZB6U3C14qDLzuXxB5v2uznwF9rU0C11f59/2RPPbdrYA lTEjDHSgsL028kXfBKcaXib4cQfqn3xBeBFqPgyQahqHwDL2NF68NyvEJuStMzUY84NLemetds2Qk Zdcm9F5a9cpOJi6eTznA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFr8w-00GRkw-1v; Wed, 20 Dec 2023 07:37:26 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFr8t-00GRj6-0j; Wed, 20 Dec 2023 07:37:24 +0000 X-UUID: 9a60ad369f0a11ee958cff29c719f35b-20231220 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=56MmzR0c9zXysLe67Ot4Yef+jNl96T4Rvs/yNt96T7M=; b=bQpsF4Vf/Yvoc/vzSLb9vvfctXnYxPQbZ3SgwP/Zac38VXpgaBNM7FwjtBsGgPgNXcG1CeBiNX8Mmw0IJJ9b/UKR0Cy7g2vSfyYNKRvcIu9s8CAq6tTNxnBaLM0NetmrSH8VpHglm7kdb6afgrt/IfmUDDDuiGWM29w1EvL8QVE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:6328c251-622c-44a2-939e-e4781a49ace4,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:e3a5787e-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR: NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 9a60ad369f0a11ee958cff29c719f35b-20231220 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1447712857; Wed, 20 Dec 2023 00:37:18 -0700 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 20 Dec 2023 15:36:39 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 20 Dec 2023 15:36:39 +0800 From: Kuan-Ying Lee To: Matthias Brugger , AngeloGioacchino Del Regno CC: , , , , , Kuan-Ying Lee , , , Subject: [PATCH] scripts: Fix no space expression between sp and offset Date: Wed, 20 Dec 2023 15:36:28 +0800 Message-ID: <20231220073629.2658-1-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--1.838400-8.000000 X-TMASE-MatchedRID: +ngMWxkROpCWHmpvkeKJB7MjW/sniEQKQKuv8uQBDjq95d3486lhDSdV PZLj058XKso8TQS0K69nHbrFgUuD0ug9HcxTn+DoKaMQ6tw7oDJMkOX0Uoduubra7c58qofOo8W MkQWv6iXBcIE78YqRWo6HM5rqDwqtbSlBMyqqDUULV7pRjhdwXMMzFZKbl0jgifiQwpPzKTMSI/ jO40Gt+CQqeQ5Qn5jx7ltWiLNaZPyWqC20cd7+1qT7trat8oNiwZBgUyJVEbl6Fw8/PpTMRaVvm iAyeA2kc5MSfkiJFI5QBJtcKcOYfpRMZUCEHkRt X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.838400-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 429CEE084C7287DB87733FD72DAC4F7D8977E3FCA84B8E1BD170B1C2EBFD7C472000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231219_233723_271192_52AD01DB X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When I use older version aarch64 objdump (2.24) to disassemble aarch64 vmlinux, I get the result like below. There is no space between sp and offset. ffff800008010000 : ffff800008010000: d503233f hint #0x19 ffff800008010004: a9bc7bfd stp x29, x30, [sp,#-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp,#32] When I use newer version aarch64 objdump (2.35), I get the result like below. There is a space between sp and offset. ffff800008010000 : ffff800008010000: d503233f paciasp ffff800008010004: a9bc7bfd stp x29, x30, [sp, #-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp, #32] Add no space support of regular expression for old version objdump. Cc: Casper Li Signed-off-by: Kuan-Ying Lee --- scripts/checkstack.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index b70482a95088..a0e25a8830b4 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -56,7 +56,7 @@ my (@stack, $re, $dre, $sub, $x, $xs, $funcre, $min_stack); if ($arch =~ '^(aarch|arm)64$') { #ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]! #a110: d11643ff sub sp, sp, #0x590 - $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o; + $re = qr/^.*stp.*sp, ?\#-([0-9]{1,8})\]\!/o; $dre = qr/^.*sub.*sp, sp, #(0x$x{1,8})/o; } elsif ($arch eq 'arm') { #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64