linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
	arnd@arndb.de, akpm@linux-foundation.org, eugene.loh@oracle.com,
	kris.van.hees@oracle.com
Subject: Re: [PATCH v9 2/8] kbuild: add modules_thick.builtin
Date: Fri, 11 Nov 2022 13:47:03 +0000	[thread overview]
Message-ID: <87h6z5wqlk.fsf@esperi.org.uk> (raw)
In-Reply-To: <Y2x22mKtaZvC7ZSk@bombadil.infradead.org> (Luis Chamberlain's message of "Wed, 9 Nov 2022 19:58:18 -0800")

On 10 Nov 2022, Luis Chamberlain uttered the following:

> On Wed, Nov 09, 2022 at 01:41:26PM +0000, Nick Alcock wrote:
>> I am not wedded to the approach used to construct this file, but I don't
>> see any other way to do it despite spending a week or so trying to tie
>> it into Kbuild without using a separate Makefile.modbuiltin: unlike the
>> names of builtin modules (which are also recorded in the source files
>> themseves via MODULE_*() macros) the mapping from object file name to
>> built-in module name is not recorded anywhere but in the makefiles
>> themselves, so we have to at least reparse them with something to
>> indicate the builtin-ness of each module (i.e., tristate.conf) if we are
>> to figure out which modules are built-in and which are not.
>
> Please try this patch, unless I am not understanding perhaps we may be
> able to replace the first two patches with this one? It also seems
> to capture a bit more data than the modules_thick.builtin file.

Oh thank you! At first sight this looks really good. I had trouble
believing it could be that much simpler :)

...

But... it's not quite doing the same thing, so perhaps it can't be that
much simpler. Picking the first item that appears in my test build of
this but not in modules_thick.builtin:

+arch/x86/crypto/libblake2s-x86_64.o: arch/x86/crypto/blake2s-core.o arch/x86/crypto/blake2s-glue.o

But...

obj-$(CONFIG_CRYPTO_BLAKE2S_X86) += libblake2s-x86_64.o
libblake2s-x86_64-y := blake2s-core.o blake2s-glue.o

config CRYPTO_BLAKE2S_X86
        bool "Hash functions: BLAKE2s (SSSE3/AVX-512)"

This cannot be built as a module. The point of modules_thick.builtin was
not to capture things that can be built into the kernel or left
unconfigured entirely (though that is *also* a nice thing to capture,
and should probably be captured regardless) but to capture *those things
that can possibly be built as modules*, i.e. those things which are
tristates in Kbuild and might possibly get built into .ko's. That was
the whole reason we needed the tristate stuff in the first place, and
I'm still not sure how to do it without that.

(The reason: if your tracer or whatever has a distinct notation used by
users for things in named modules, then you'd usually like to keep that
notation the same if you choose to build something into the kernel that
might otherwise be a module. Things that cannot be built as modules
could just use the in-the-core-kernel notation unconditionally, because
there's no way they can ever be found anywhere else: and users are
likely to expect that. At least, when I broke it in DTrace years ago, I
got complaints!)

-- 
NULL && (void)

  reply	other threads:[~2022-11-11 13:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 13:41 [PATCH PING v9] kallsyms: reliable symbol->address lookup with /proc/kallmodsyms Nick Alcock
2022-11-09 13:41 ` [PATCH v9 1/8] kbuild: bring back tristate.conf Nick Alcock
2022-11-10  3:56   ` Luis Chamberlain
2022-11-09 13:41 ` [PATCH v9 2/8] kbuild: add modules_thick.builtin Nick Alcock
2022-11-10  3:58   ` Luis Chamberlain
2022-11-11 13:47     ` Nick Alcock [this message]
2022-11-11 14:03       ` Nick Alcock
2022-11-11 15:12       ` Luis Chamberlain
2022-11-14 17:49         ` Nick Alcock
2022-11-15 21:21           ` Luis Chamberlain
2022-11-21 15:21             ` Nick Alcock
2022-11-21 19:12               ` Luis Chamberlain
2022-11-21 19:18                 ` Luis Chamberlain
2022-11-21 21:14                   ` Nick Alcock
2022-11-09 13:41 ` [PATCH v9 3/8] kbuild: generate an address ranges map at vmlinux link time Nick Alcock
2022-11-13  3:02   ` Luis Chamberlain
2022-11-14 16:48     ` Nick Alcock
2022-11-15 21:22       ` Luis Chamberlain
2022-11-16 16:06         ` Nick Alcock
2022-11-09 13:41 ` [PATCH v9 4/8] kallsyms: introduce sections needed to map symbols to built-in modules Nick Alcock
2022-11-13  3:15   ` Luis Chamberlain
2022-11-14 17:04     ` Nick Alcock
2022-11-15 11:47       ` Leizhen (ThunderTown)
2022-11-15 13:25         ` Nick Alcock
2022-11-15 19:58           ` Luis Chamberlain
2022-11-15 20:36             ` Luis Chamberlain
2022-11-09 13:41 ` [PATCH v9 5/8] kallsyms: optimize .kallsyms_modules* Nick Alcock
2022-11-09 13:41 ` [PATCH v9 6/8] kallsyms: distinguish text symbols fully using object file names Nick Alcock
2022-11-09 13:41 ` [PATCH v9 7/8] kallsyms: add /proc/kallmodsyms for text symbol disambiguation Nick Alcock
2022-11-13  3:26   ` Luis Chamberlain
2022-11-14 16:57     ` Nick Alcock
2022-11-15 21:24       ` Luis Chamberlain
2022-11-09 13:41 ` [PATCH v9 8/8] perf: proof-of-concept kallmodsyms support Nick Alcock
  -- strict thread matches above, loose matches on Subject: below --
2022-10-27 19:57 [PATCH v9] kallsyms: reliable symbol->address lookup with /proc/kallmodsyms Nick Alcock
2022-10-27 19:57 ` [PATCH v9 2/8] kbuild: add modules_thick.builtin 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=87h6z5wqlk.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=eugene.loh@oracle.com \
    --cc=kris.van.hees@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mcgrof@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;
as well as URLs for NNTP newsgroup(s).