LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: jeyu@kernel.org, masahiroy@kernel.org,
	linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
	arnd@arndb.de, eugene.loh@oracle.com, kris.van.hees@oracle.com
Subject: Re: [PATCH v5] kallsyms: new /proc/kallmodsyms with builtin modules
Date: Thu, 30 Sep 2021 10:53:35 -0700	[thread overview]
Message-ID: <202109301051.DDD8B5F27@keescook> (raw)
In-Reply-To: <875yui0ymc.fsf@esperi.org.uk>

On Thu, Sep 30, 2021 at 06:19:55PM +0100, Nick Alcock wrote:
> On 30 Sep 2021, Kees Cook said:
> > On Wed, Sep 29, 2021 at 10:51:47PM +0100, Nick Alcock wrote:
> >> It would be useful if there were a mapping between kernel symbol and module
> >> name that only changed when the kernel source code is changed.  This mapping
> >> should not change simply because a module becomes built into the kernel.
> >> 
> >> It might also be useful if there were reliable symbol size information to
> >> determine whether an address is within a symbol or outside it, especially
> >> given that there could be huge gaps between symbols.
> >> [...]
> > [...]
> > It would be useful, sure, but is there something that does, in fact,
> > need this, or would like this if it were available? Since this provides
> > a userspace API, what would be consuming that API? For example, when
> > Syscall User Dispatch was added, it was clear it was for Wine[1].
> 
> We have a long-term consumer in DTrace (e.g.
> <https://github.com/oracle/dtrace-utils/blob/dev/libdtrace/dt_module.c#L1323>).
> (But since we control this consumer we are quite happy to change the
> format of kallmodsyms, integrate it with kallsyms so that kallsyms just
> provides the same information if the file format break were acceptable,
> or whatever you think most sensible. We just want this information
> somehow. :) e.g. the code there doesn't yet handle the
> symbol-in-multiple-modules case: I'll have to add that.)

Ah-ha, excellent. That works for me. :) (If there is a v5, maybe add a
note about DTrace to help show the specific need.)

Thanks!

-Kees

-- 
Kees Cook

  reply	other threads:[~2021-09-30 17:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 21:51 Nick Alcock
2021-09-29 21:51 ` [PATCH v5 1/7] kbuild: bring back tristate.conf Nick Alcock
2021-09-29 21:51 ` [PATCH v5 2/7] kbuild: add modules_thick.builtin Nick Alcock
2021-09-29 21:51 ` [PATCH v5 3/7] kbuild: generate an address ranges map at vmlinux link time Nick Alcock
2021-09-29 21:51 ` [PATCH v5 4/7] kallsyms: introduce sections needed to map symbols to built-in modules Nick Alcock
2021-09-29 21:51 ` [PATCH v5 5/7] kallsyms: optimize .kallsyms_modules* Nick Alcock
2021-09-29 21:51 ` [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms Nick Alcock
2021-09-29 21:51 ` [PATCH v5 7/7] kallsyms: add reliable symbol size info Nick Alcock
2021-09-29 23:34 ` [PATCH v5] kallsyms: new /proc/kallmodsyms with builtin modules Kees Cook
2021-09-30 17:19   ` Nick Alcock
2021-09-30 17:53     ` Kees Cook [this message]
2021-10-27 17:46 ` [PING PATCH " Nick Alcock
2021-10-27 17:47   ` [PATCH v5 1/7] kbuild: bring back tristate.conf Nick Alcock
2021-10-27 17:47   ` [PATCH v5 2/7] kbuild: add modules_thick.builtin Nick Alcock
2021-10-27 17:47   ` [PATCH v5 3/7] kbuild: generate an address ranges map at vmlinux link time Nick Alcock
2021-10-30 16:49     ` kernel test robot
2021-10-27 17:47   ` [PATCH v5 4/7] kallsyms: introduce sections needed to map symbols to built-in modules Nick Alcock
2021-10-27 17:47   ` [PATCH v5 5/7] kallsyms: optimize .kallsyms_modules* Nick Alcock
2021-10-27 17:47   ` [PATCH v5 6/7] kallsyms: add /proc/kallmodsyms Nick Alcock
2021-10-28 11:36     ` kernel test robot
2021-10-28 21:52       ` Nick Alcock
2021-10-27 17:47   ` [PATCH v5 7/7] kallsyms: add reliable symbol size info Nick Alcock

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=202109301051.DDD8B5F27@keescook \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=eugene.loh@oracle.com \
    --cc=jeyu@kernel.org \
    --cc=kris.van.hees@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nick.alcock@oracle.com \
    --subject='Re: [PATCH v5] kallsyms: new /proc/kallmodsyms with builtin modules' \
    /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

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).