Re: [PATCH] arm64: update mapping symbol filter in arm64_verify_symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Qianli Zhao

Thanks for the patch.
在 2020年11月30日 18:22, crash-utility-request@xxxxxxxxxx 写道:
> Message: 2
> Date: Mon, 30 Nov 2020 10:21:48 +0000
> From: ??? <zhaoqianli@xxxxxxxxxx>
> To: "crash-utility@xxxxxxxxxx" <crash-utility@xxxxxxxxxx>
> Subject:  [PATCH] arm64: update mapping symbol filter
> 	in	arm64_verify_symbol
> Message-ID: <e2360405c4aa4036908a840e943e8f5e@xxxxxxxxxx>
> Content-Type: text/plain; charset="utf-8"
> 
> From: Qianli Zhao <zhaoqianli@xxxxxxxxxx>
> 
> Name Meaning of mapping symbol:
> $x
> $x.<any...>
> Start of a sequence of A64 instructions
> 
> $c
> $c.<any...>
> Start of a sequence of C64 instructions
> 
> $d
> $d.<any...>
> Start of a sequence of data items (for example, a literal pool)
> 
> Reference documents:
> https://documentation-service.arm.com/static/5f9a92f6b1a7c5445f28fee6?token=
> 
> Signed-off-by: Qianli Zhao <zhaoqianli@xxxxxxxxxx>
> ---
> When use crash-arm64 parsing kdump,"dis" command can not completely parse out the disassembly code(aarch64-objdump is ok),miss some assembly code at the end,such as below:
> 
> The queued_spin_lock_slowpath() actual code segment of the function is from 0xffffffdf44b80d48 to ffffffecc41591d4,but "dis" command only dump from 0xffffffdf44b80d48 to 0xffffffdf44b80df0.
> 
> crash> dis queued_spin_lock_slowpath
> 0xffffffdf44b80d48 <$x.1>:      str     x30, [x18],#8
> 0xffffffdf44b80d4c <queued_spin_lock_slowpath+4>:       stp     x29, x30, [sp,#-64]!
> ....
> 0xffffffdf44b80dec <queued_spin_lock_slowpath+164>:     cbnz    w10, 0xffffffdf44b80e9c
> 0xffffffdf44b80df0 <queued_spin_lock_slowpath+168>:     nop
> 
> The reason for the issue is that crash-tool thinks next vaild symbol is $x.3,but $x.* is a mapping symbol defined by ARM,this type of symbol needs skip.
> 
> ffffffdf44b80d48 (T) queued_spin_lock_slowpath
> ffffffdf44b80df4 (t) $x.3
> ffffffdf44b80dfc (t) $x.5
> ffffffdf44b80e24 (t) $x.7
> ffffffdf44b80e2c (t) $x.9
> ffffffdf44b80f6c (t) $x.13
> ffffffdf44b80f74 (t) $x.15
> ffffffdf44b8102c (t) $x.19
> ffffffdf44b81034 (t) $x.21
> ffffffdf44b810e8 (t) $x.7
> ffffffdf44b810e8 (T) rt_mutex_adjust_pi
> ffffffdf44b8118c (t) $x.8
> 
> This issue will mislead us to analyze assembly issue:
> [20332.505051] Call trace:
> [20332.505057]  queued_spin_lock_slowpath+0x198/0x3a0---->//Beyond code segment?
> [20332.505063]  do_raw_spin_lock+0x10c/0x12c
> [20332.505071]  _raw_spin_lock_irqsave+0x3c/0x50
> [20332.505080]  set_dspp_hist_irq_feature+0x180/0x1d4
> [20332.505089]  sde_cp_crtc_setfeature+0x168/0x2f4
> [20332.505095]  sde_cp_crtc_apply_properties+0x46c/0x76c
> [20332.505102]  sde_crtc_atomic_begin+0x490/0x62c
> [20332.505111]  drm_atomic_helper_commit_planes+0x5c/0x2bc
> [20332.505117]  complete_commit+0xa0/0x264
> [20332.505123]  _msm_drm_commit_work_cb+0x128/0x22c
> [20332.505130]  kthread_worker_fn+0x110/0x1ac
> [20332.505136]  kthread+0x160/0x170
> [20332.505143]  ret_from_fork+0x10/0x18
> 
> 
> Reference documents(page 7):
> https://documentation-service.arm.com/static/5f9a92f6b1a7c5445f28fee6?token=
> ---
> 
>  arm64.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arm64.c b/arm64.c
> index fdf77bd..24fd91e 100644
> --- a/arm64.c
> +++ b/arm64.c
> @@ -510,9 +510,11 @@ arm64_verify_symbol(const char *name, ulong value, char type)
>             ((type == 'a') || (type == 'n') || (type == 'N') || (type == 'U')))
>                 return FALSE;
> 
> -       if (STREQ(name, "$d") || STREQ(name, "$x"))
> +       if (STREQ(name, "$d") || STRNEQ(name, "$d.") ||
> +               STREQ(name, "$x") || STRNEQ(name, "$x.") ||
> +               STREQ(name, "$c") || STRNEQ(name, "$c."))
>                 return FALSE;

This looks good according to the "Table 5.5: Mapping symbols" in the document.

Acked-by: Lianbo Jiang <lijiang@xxxxxxxxxx>

> -
> +
>         if ((type == 'A') && STRNEQ(name, "__crc_"))
>                 return FALSE;
> 
> --
> 2.7.4

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux