From: Luis Chamberlain <mcgrof@kernel.org>
To: Petr Mladek <pmladek@suse.com>, Vimal Agrawal <avimalin@gmail.com>
Cc: Maninder Singh <maninder1.s@samsung.com>,
rostedt@goodmis.org, senozhatsky@chromium.org,
andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk,
akpm@linux-foundation.org, wangkefeng.wang@huawei.com,
mbenes@suse.cz, swboyd@chromium.org, ojeda@kernel.org,
linux-kernel@vger.kernel.org, will@kernel.org,
catalin.marinas@arm.com, Vaneet Narang <v.narang@samsung.com>,
Aaron Tomlin <atomlin@redhat.com>
Subject: Re: [PATCH 1/1] kallsyms: print module name in %ps/S case when KALLSYMS is disabled
Date: Wed, 9 Feb 2022 15:02:06 -0800 [thread overview]
Message-ID: <YgRH7hwFC2AGISdP@bombadil.infradead.org> (raw)
In-Reply-To: <20220209114038.GA8279@pathway.suse.cz>
On Wed, Feb 09, 2022 at 12:40:38PM +0100, Petr Mladek wrote:
> > --- a/include/linux/kallsyms.h
> > +++ b/include/linux/kallsyms.h
> > @@ -163,6 +163,33 @@ static inline bool kallsyms_show_value(const struct cred *cred)
> > return false;
> > }
> >
> > +#ifdef CONFIG_MODULES
> > +static inline int fill_minimal_module_info(char *sym, int size, unsigned long value)
> > +{
> > + struct module *mod;
> > + unsigned long offset;
> > + int ret = 0;
> > +
> > + preempt_disable();
> > + mod = __module_address(value);
> > + if (mod) {
> > + offset = value - (unsigned long)mod->core_layout.base;
> > + snprintf(sym, size - 1, "0x%lx+0x%lx [%s]",
> > + (unsigned long)mod->core_layout.base, offset, mod->name);
> > +
> > + sym[size - 1] = '\0';
> > + ret = 1;
> > + }
> > +
> > + preempt_enable();
> > + return ret;
> > +}
>
> It looks too big for an inlined function. Anyway, we will need
> something even more complex, see below.
Interesting, these observations might apply to Vimal's work as well [0].
[0] https://lkml.kernel.org/r/YgKyC4ZRud0JW1PF@bombadil.infradead.org
Luis
next prev parent reply other threads:[~2022-02-09 23:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220201040100epcas5p180ef094058fc9c76b4b94d9d673fc5fc@epcas5p1.samsung.com>
2022-02-01 4:00 ` Maninder Singh
2022-02-01 9:45 ` Andy Shevchenko
[not found] ` <CGME20220201040100epcas5p180ef094058fc9c76b4b94d9d673fc5fc@epcms5p7>
2022-02-01 10:24 ` Maninder Singh
2022-02-09 11:40 ` Petr Mladek
2022-02-09 23:02 ` Luis Chamberlain [this message]
2022-02-10 8:19 ` Petr Mladek
[not found] ` <CGME20220201040100epcas5p180ef094058fc9c76b4b94d9d673fc5fc@epcms5p4>
2022-02-10 8:48 ` Maninder Singh
2022-02-11 1:37 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgRH7hwFC2AGISdP@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=atomlin@redhat.com \
--cc=avimalin@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maninder1.s@samsung.com \
--cc=mbenes@suse.cz \
--cc=ojeda@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=swboyd@chromium.org \
--cc=v.narang@samsung.com \
--cc=wangkefeng.wang@huawei.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®