[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjDScHjMUbqYV4s4@bombadil.infradead.org>
Date: Tue, 15 Mar 2022 10:52:48 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Maninder Singh <maninder1.s@...sung.com>
Cc: pmladek@...e.com, rostedt@...dmis.org, senozhatsky@...omium.org,
andriy.shevchenko@...ux.intel.com, linux@...musvillemoes.dk,
akpm@...ux-foundation.org, wangkefeng.wang@...wei.com,
v.narang@...sung.com, swboyd@...omium.org, ojeda@...nel.org,
linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
avimalin@...il.com, atomlin@...hat.com
Subject: Re: [PATCH v3] kallsyms: enhance %pS/s/b printing when KALLSYSMS is
disabled
On Tue, Mar 15, 2022 at 09:21:00PM +0530, Maninder Singh wrote:
> print module information when KALLSYMS is disabled.
>
> No change for %pB, as it needs to know symbol name to adjust address
> value which can't be done without KALLSYMS.
>
> (A) original output with KALLSYMS:
> [8.842129] ps function_1 [crash]
> [8.842735] pS function_1+0x4/0x2c [crash]
> [8.842890] pSb function_1+0x4/0x2c [crash b367e79021b9f3b0172f9a36d4261c1f528ca1b3]
> [8.843175] pB function_1+0x4/0x2c [crash]
> [8.843362] pBb function_1+0x4/0x2c [crash b367e79021b9f3b0172f9a36d4261c1f528ca1b3]
>
> (B) original output without KALLSYMS:
> [12.487424] ps 0xffff800000eb008c
> [12.487598] pS 0xffff800000eb008c
> [12.487723] pSb 0xffff800000eb008c
> [12.487850] pB 0xffff800000eb008c
> [12.487967] pBb 0xffff800000eb008c
>
> (C) With patched kernel
> with KALLYSMS:
> [41.974576] ps function_1 [crash]
> [41.975173] pS function_1+0x4/0x2c [crash]
> [41.975386] pSb function_1+0x4/0x2c [crash a8b20caaec9635b316cf4812f6b55598fe2b7cee]
> [41.975879] pB function_1+0x4/0x2c [crash]
> [41.976076] pBb function_1+0x4/0x2c [crash a8b20caaec9635b316cf4812f6b55598fe2b7cee]
>
> without KALLSYMS:
> [9.624152] ps 0xffff800001bd008c [crash] // similar to original, no changes
> [9.624548] pS 0x(____ptrval____)+0x8c [crash] // base address hashed and offset is without hash
> [9.624847] pSb 0x(____ptrval____)+0x8c [crash a8b20caaec9635b316cf4812f6b55598fe2b7cee]
> [9.625388] pB 0x(____ptrval____)+0x8c [crash]
> [9.625594] pBb 0x(____ptrval____)+0x8c [crash a8b20caaec9635b316cf4812f6b55598fe2b7cee]
>
> with disable hashing:
> [8.563916] ps 0xffff800000f2008c [crash]
> [8.564574] pS 0xffff800000f20000+0x8c [crash]
> [8.564749] pSb 0xffff800000f20000+0x8c [crash 3423a8993a7033fb79e5add14bf9d8d6b56330ca]
> [8.565008] pB 0xffff800000f20000+0x8c [crash]
> [8.565154] pBb 0xffff800000f20000+0x8c [crash 3423a8993a7033fb79e5add14bf9d8d6b56330ca]
>
> Suggested-by: Petr Mladek <pmladek@...e.com>
> Co-developed-by: Vaneet Narang <v.narang@...sung.com>
> Signed-off-by: Vaneet Narang <v.narang@...sung.com>
> Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
> ---
> commit id 'kallsyms: print module name in %ps/S case when KALLSYMS is disabled'
> needs to be removed from mm(linux-next) tree, current change is
> with ignorance of this commit. I was not sure how to send patch, with 2 patches
> consisting reversal commit also, or current approach is correct.
>
> v1->v2: hash base address of module, change *fmt to fmt[0] and removed
> copy paste.
> v2->v3: fixed review comments from Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> include/linux/kallsyms.h | 2 +
> include/linux/module.h | 20 ++++++++++
> kernel/kallsyms.c | 27 +++++++------
> kernel/module.c | 4 +-
> lib/vsprintf.c | 85 ++++++++++++++++++++++++++++++++++------
Hey Maninder, thanks for your patch!
Since this touches kernel/module.c and include/linux/module.h I'd prefer
this go through modules-next [0], and as you will see that's a different
world right now. I also have a set of at least 2 other patch sets to
merge there before yours.
Also, what is on modules-next is not intended to go to Linus for the
next merge window as the changes there got merged only late, and I want
at least 2 months of testing on linux-newt before any pull requiest is
sent to Linus.
Can you rebase to modules-next? I can evaluate the patches then for
integration there once the other stuff gets merged into that tree too.
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=modules-next
Luis
Powered by blists - more mailing lists