<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/mod, branch v6.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-09-28T11:54:07Z</updated>
<entry>
<title>modpost: Initialize builtin_modname to stop SIGSEGVs</title>
<updated>2025-09-28T11:54:07Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2025-09-28T04:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ea77fca84f07849aa995271271340d262d0c2e9'/>
<id>urn:sha1:2ea77fca84f07849aa995271271340d262d0c2e9</id>
<content type='text'>
Segmentation fault ./scripts/mod/modpost -o vmlinux.symvers vmlinux.o
stops the kernel build.  It comes when write_vmlinux_export_c_file()
tries to buf_printf alias-&gt;builtin_modname.  malloc'ed memory is not
necessarily zeroed.  NULL new-&gt;builtin_modname before adding to aliases.

Fixes: 5ab23c7923a1 ("modpost: Create modalias for builtin modules")
Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://patch.msgid.link/4590a243-0a7e-b7e6-e2d3-cd1b41a12237@google.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: Create modalias for builtin modules</title>
<updated>2025-09-24T16:10:45Z</updated>
<author>
<name>Alexey Gladkov</name>
<email>legion@kernel.org</email>
</author>
<published>2025-09-18T08:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ab23c7923a1d2ae1890026866a2d8506b010a4a'/>
<id>urn:sha1:5ab23c7923a1d2ae1890026866a2d8506b010a4a</id>
<content type='text'>
For some modules, modalias is generated using the modpost utility and
the section is added to the module file.

When a module is added inside vmlinux, modpost does not generate
modalias for such modules and the information is lost.

As a result kmod (which uses modules.builtin.modinfo in userspace)
cannot determine that modalias is handled by a builtin kernel module.

$ cat /sys/devices/pci0000:00/0000:00:14.0/modalias
pci:v00008086d0000A36Dsv00001043sd00008694bc0Csc03i30

$ modinfo xhci_pci
name:           xhci_pci
filename:       (builtin)
license:        GPL
file:           drivers/usb/host/xhci-pci
description:    xHCI PCI Host Controller Driver

Missing modalias "pci:v*d*sv*sd*bc0Csc03i30*" which will be generated by
modpost if the module is built separately.

To fix this it is necessary to generate the same modalias for vmlinux as
for the individual modules. Fortunately '.vmlinux.export.o' is already
generated from which '.modinfo' can be extracted in the same way as for
vmlinux.o.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Alexey Gladkov &lt;legion@kernel.org&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://patch.msgid.link/28d4da3b0e3fc8474142746bcf469e03752c3208.1758182101.git.legion@kernel.org
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: Add modname to mod_device_table alias</title>
<updated>2025-09-24T16:10:45Z</updated>
<author>
<name>Alexey Gladkov</name>
<email>legion@kernel.org</email>
</author>
<published>2025-09-18T08:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83fb49389bbe07defb85b063f7ff0fd016f06b35'/>
<id>urn:sha1:83fb49389bbe07defb85b063f7ff0fd016f06b35</id>
<content type='text'>
At this point, if a symbol is compiled as part of the kernel,
information about which module the symbol belongs to is lost.

To save this it is possible to add the module name to the alias name.
It's not very pretty, but it's possible for now.

Cc: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Cc: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Cc: rust-for-linux@vger.kernel.org
Signed-off-by: Alexey Gladkov &lt;legion@kernel.org&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Acked-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://patch.msgid.link/1a0d0bd87a4981d465b9ed21e14f4e78eaa03ded.1758182101.git.legion@kernel.org
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: check forbidden MODULE_IMPORT_NS("module:") at compile time</title>
<updated>2025-05-25T09:15:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-05-22T07:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c036cfbb75bb58ecce589f547fdb8af153493a6'/>
<id>urn:sha1:9c036cfbb75bb58ecce589f547fdb8af153493a6</id>
<content type='text'>
Explicitly adding MODULE_IMPORT_NS("module:...") is not allowed.

Currently, this is only checked at run time. That is, when such a
module is loaded, an error message like the following is shown:

  foo: module tries to import module namespace: module:bar

Obviously, checking this at compile time improves usability.

In such a case, modpost will report the following error at compile time:

  ERROR: modpost: foo: explicitly importing namespace "module:bar" is not allowed.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>module: Extend the module namespace parsing</title>
<updated>2025-05-25T09:12:03Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2025-05-02T14:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=754f8733fc09dd92093cfbd34fa71a42d152b250'/>
<id>urn:sha1:754f8733fc09dd92093cfbd34fa71a42d152b250</id>
<content type='text'>
Instead of only accepting "module:${name}", extend it with a comma
separated list of module names and add tail glob support.

That is, something like: "module:foo-*,bar" is now possible.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>module: Add module specific symbol namespace support</title>
<updated>2025-05-25T09:11:56Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2025-05-02T14:12:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=520b1a147d918eb07132c847ad5598a17d3ff7ca'/>
<id>urn:sha1:520b1a147d918eb07132c847ad5598a17d3ff7ca</id>
<content type='text'>
Designate the "module:${modname}" symbol namespace to mean: 'only
export to the named module'.

Notably, explicit imports of anything in the "module:" space is
forbidden.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: Use for() loop</title>
<updated>2025-05-25T09:00:52Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2025-05-02T14:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b91ff002c67b2502009f99115c4b7fe5b7b8248'/>
<id>urn:sha1:6b91ff002c67b2502009f99115c4b7fe5b7b8248</id>
<content type='text'>
Slight cleanup by using a for() loop instead of while(). This makes it
clearer what is the iteration and what is the actual work done.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>Disable SLUB_TINY for build testing</title>
<updated>2025-04-06T17:00:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-04-06T17:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f110a5e4f9977c31ce76fefbfef6fd4eab6bfb7'/>
<id>urn:sha1:6f110a5e4f9977c31ce76fefbfef6fd4eab6bfb7</id>
<content type='text'>
... and don't error out so hard on missing module descriptions.

Before commit 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
we used to warn about missing module descriptions, but only when
building with extra warnigns (ie 'W=1').

After that commit the warning became an unconditional hard error.

And it turns out not all modules have been converted despite the claims
to the contrary.  As reported by Damian Tometzki, the slub KUnit test
didn't have a module description, and apparently nobody ever really
noticed.

The reason nobody noticed seems to be that the slub KUnit tests get
disabled by SLUB_TINY, which also ends up disabling a lot of other code,
both in tests and in slub itself.  And so anybody doing full build tests
didn't actually see this failre.

So let's disable SLUB_TINY for build-only tests, since it clearly ends
up limiting build coverage.  Also turn the missing module descriptions
error back into a warning, but let's keep it around for non-'W=1'
builds.

Reported-by: Damian Tometzki &lt;damian@riscv-rocks.de&gt;
Link: https://lore.kernel.org/all/01070196099fd059-e8463438-7b1b-4ec8-816d-173874be9966-000000@eu-central-1.amazonses.com/
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Fixes: 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>modpost: require a MODULE_DESCRIPTION()</title>
<updated>2025-03-22T15:56:12Z</updated>
<author>
<name>Jeff Johnson</name>
<email>jeff.johnson@oss.qualcomm.com</email>
</author>
<published>2025-03-11T19:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c6c1fc09de35f409f6971cb9e881103afe5dbe0'/>
<id>urn:sha1:6c6c1fc09de35f409f6971cb9e881103afe5dbe0</id>
<content type='text'>
Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
description is missing"), a module without a MODULE_DESCRIPTION() has
resulted in a warning with make W=1. Since that time, all known
instances of this issue have been fixed. Therefore, now make it an
error if a MODULE_DESCRIPTION() is not present.

Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: use strstarts() to clean up parse_source_files()</title>
<updated>2025-03-15T12:16:22Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-02-07T17:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=144fced6852ba11c90560c996e986b4563f089af'/>
<id>urn:sha1:144fced6852ba11c90560c996e986b4563f089af</id>
<content type='text'>
No functional changes are intended.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
</feed>
