linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts: Fix no space expression between sp and offset
@ 2022-07-22  6:35 Kuan-Ying Lee
  2022-08-03 11:18 ` Kuan-Ying Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Kuan-Ying Lee @ 2022-07-22  6:35 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: chinwen.chang, Kuan-Ying Lee, linux-kernel, linux-arm-kernel,
	linux-mediatek

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 <dw_apb_ictl_handle_irq>:
ffff800008010000:       d503233f        hint    #0x19
ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp,#-64]!
ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000 <num_ictlrs>
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.

ffff800008010000 <dw_apb_ictl_handle_irq>:
ffff800008010000:       d503233f        paciasp
ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp, #-64]!
ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000 <num_ictlrs>
ffff80000801000c:       910003fd        mov     x29, sp
ffff800008010010:       a9025bf5        stp     x21, x22, [sp, #32]

Add no space support of regular expression for old version objdump.

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
---
 scripts/checkstack.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index d2c38584ece6..e404b6b11295 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
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts: Fix no space expression between sp and offset
  2022-07-22  6:35 [PATCH] scripts: Fix no space expression between sp and offset Kuan-Ying Lee
@ 2022-08-03 11:18 ` Kuan-Ying Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Kuan-Ying Lee @ 2022-08-03 11:18 UTC (permalink / raw)
  To: Matthias Brugger, masahiroy, paul.walmsley, palmer, aou, wafgo01
  Cc: Chinwen Chang (張錦文),
	linux-kernel, linux-arm-kernel, linux-mediatek

On Fri, 2022-07-22 at 14:35 +0800, Kuan-Ying Lee wrote:

Cc maintainers.

> 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 <dw_apb_ictl_handle_irq>:
> ffff800008010000:       d503233f        hint    #0x19
> ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp,#-64]!
> ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000
> <num_ictlrs>
> 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.
> 
> ffff800008010000 <dw_apb_ictl_handle_irq>:
> ffff800008010000:       d503233f        paciasp
> ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp, #-64]!
> ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000
> <num_ictlrs>
> ffff80000801000c:       910003fd        mov     x29, sp
> ffff800008010010:       a9025bf5        stp     x21, x22, [sp, #32]
> 
> Add no space support of regular expression for old version objdump.
> 
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> ---
>  scripts/checkstack.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> index d2c38584ece6..e404b6b11295 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
> -- 
> 2.18.0
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] scripts: Fix no space expression between sp and offset
@ 2023-12-20  7:36 Kuan-Ying Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Kuan-Ying Lee @ 2023-12-20  7:36 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno
  Cc: casper.li, chinwen.chang, qun-wei.lin, linux-mm, akpm,
	Kuan-Ying Lee, linux-kernel, linux-arm-kernel, linux-mediatek

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 <dw_apb_ictl_handle_irq>:
ffff800008010000:       d503233f        hint    #0x19
ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp,#-64]!
ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000 <num_ictlrs>
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 <dw_apb_ictl_handle_irq>:
ffff800008010000:       d503233f        paciasp
ffff800008010004:       a9bc7bfd        stp     x29, x30, [sp, #-64]!
ffff800008010008:       90011e60        adrp    x0, ffff80000a3dc000 <num_ictlrs>
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 <casper.li@mediatek.com>
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
---
 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
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-20  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22  6:35 [PATCH] scripts: Fix no space expression between sp and offset Kuan-Ying Lee
2022-08-03 11:18 ` Kuan-Ying Lee
2023-12-20  7:36 Kuan-Ying Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).