All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: <linux-modules@vger.kernel.org>
Cc: "Luis Chamberlain" <mcgrof@kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	<linux-kernel@vger.kernel.org>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	<linux-crypto@vger.kernel.org>
Subject: is_module()
Date: Thu, 23 May 2024 18:01:49 +0300	[thread overview]
Message-ID: <D1H452IHSLRC.1WZSPJQLCD5RD@kernel.org> (raw)

Hi,

I just put this here while I still have it on my mind. Possibly I'm
ignoring something that already enables this but at least I learn
something by doing this then. 

This came up in a recent discussion albeit for this crypto bug it
did not make waves because the bug fix did not require it:

https://lore.kernel.org/linux-integrity/D1GXKODMD4S8.1J12D4GOEQWPL@kernel.org/

So the gist of  is_module() would be that it would have different
semantics than IS_MODULE(): it could be used to e.g. check modules in a
loop.

Compilation would generate a new ELF section with following entries:

<ASCIIZ string><0 or 1>

The string would contain module name, and 1 could be marking for
being a module, and 0 for being builtin.

Also, it would enabled to add lsmod -b to enumerate built-in modules,
which would give nice way to carve up more information about a running
test kernel. This would obviously need perhaps a new file to procfs for
built-in modules (for regular there is /proc/modules).

Not fighting for having this, just makig it visible.

BR, Jarkko

             reply	other threads:[~2024-05-23 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:01 Jarkko Sakkinen [this message]
2024-06-14 19:33 ` is_module() Lucas De Marchi

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=D1H452IHSLRC.1WZSPJQLCD5RD@kernel.org \
    --to=jarkko@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.