public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nam Cao <namcao@linutronix.de>
Cc: Petr Pavlu <petr.pavlu@suse.com>,
	linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	Daniel Gomez <da.gomez@kernel.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Aaron Tomlin <atomlin@atomlin.com>,
	Shyam Saini <shyamsaini@linux.microsoft.com>,
	Kees Cook <kees@kernel.org>,
	Thorsten Blum <thorsten.blum@linux.dev>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] module: remove MODULE_VERSION()
Date: Fri, 27 Mar 2026 13:44:50 +0100	[thread overview]
Message-ID: <2026032738-brisket-dreadlock-8ddd@gregkh> (raw)
In-Reply-To: <87cy0p5ufl.fsf@yellow.woof>

On Fri, Mar 27, 2026 at 01:27:26PM +0100, Nam Cao wrote:
> Petr Pavlu <petr.pavlu@suse.com> writes:
> > On 3/13/26 3:20 PM, Greg Kroah-Hartman wrote:
> >> Module "versions" do not make sense as the kernel is built all at once,
> >> the "version" is the overall kernel version number, so modules can not
> >> really be described as having a unique version given that they rely on
> >> the infrastructure of the whole kernel.
> >> 
> >> For now, just make this an "empty" define, to keep existing code
> >> building properly as the tree is slowly purged of the use of this over
> >> time.
> >> 
> >> This macro will be removed entirely in the future when there are no
> >> in-tree users.
> ...
> > The original patch "Add a MODULE_VERSION macro" [1] from 2004 doesn't
> > say much about the motivation for adding module versions, but it does
> > mention that they should be accessible via sysfs. That was implemented
> > a year later in commit c988d2b28454 ("[PATCH] modules: add version and
> > srcversion to sysfs") [2], which primarily discusses use cases related
> > to DKMS, and to administrators + tech support needing to know what is
> > actually loaded on the system. For the latter, I believe srcversion (or
> > something similar) should be sufficient.
> 
> I develop an external module. And our userspace program does rely on
> this to get the module's version on the user's system. This patch would
> break our program.

Why not get the module merged upstream so you don't have this problem
anymore?

> I can change to use a different mechanism. But surely I am not the only
> one who write something that rely on this.

I recommend changing it, as this is not needed in the tree :)

I've been at a conference all week, will respin this patch series next
week and resend, sorry for the delay.

thanks,

greg k-h

      reply	other threads:[~2026-03-27 12:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 14:20 [PATCH] module: remove MODULE_VERSION() Greg Kroah-Hartman
2026-03-13 15:46 ` Greg Kroah-Hartman
2026-03-13 17:28   ` Sami Tolvanen
2026-03-14 10:22   ` Christophe Leroy (CS GROUP)
2026-03-16  8:58     ` Christoph Hellwig
2026-03-16 17:25       ` Sami Tolvanen
2026-03-16 10:48   ` Petr Pavlu
2026-03-13 17:07 ` Sami Tolvanen
2026-03-16  8:57 ` Christoph Hellwig
2026-03-16  9:37 ` Petr Pavlu
2026-03-16 10:03   ` Greg Kroah-Hartman
2026-03-17 12:50     ` Petr Pavlu
2026-03-27 12:27   ` Nam Cao
2026-03-27 12:44     ` Greg Kroah-Hartman [this message]

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=2026032738-brisket-dreadlock-8ddd@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=atomlin@atomlin.com \
    --cc=da.gomez@kernel.org \
    --cc=hch@infradead.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=petr.pavlu@suse.com \
    --cc=samitolvanen@google.com \
    --cc=shyamsaini@linux.microsoft.com \
    --cc=thorsten.blum@linux.dev \
    /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