<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/module, branch next/HEAD</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=next%2FHEAD</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=next%2FHEAD'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2026-04-09T13:24:57Z</updated>
<entry>
<title>Merge branch 'modules-next' of https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git</title>
<updated>2026-04-09T13:24:57Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-04-09T13:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e18d188f1b67a93df95fd2fa256732e2e6fbf559'/>
<id>urn:sha1:e18d188f1b67a93df95fd2fa256732e2e6fbf559</id>
<content type='text'>
# Conflicts:
#	scripts/module.lds.S
</content>
</entry>
<entry>
<title>kallsyms: delta-compress lineinfo tables for ~2.7x size reduction</title>
<updated>2026-04-08T23:26:44Z</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2026-03-22T13:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1f3053a7170f7f3fa2e953317c30a56f62a998ff'/>
<id>urn:sha1:1f3053a7170f7f3fa2e953317c30a56f62a998ff</id>
<content type='text'>
Replace the flat uncompressed parallel arrays (lineinfo_addrs[],
lineinfo_file_ids[], lineinfo_lines[]) with a block-indexed,
delta-encoded, ULEB128 varint compressed format.

The sorted address array has small deltas between consecutive entries
(typically 1-50 bytes), file IDs have high locality (delta often 0, same
file), and line numbers change slowly.  Delta-encoding followed by ULEB128
varint compression shrinks most values from 4 bytes to 1.

Entries are grouped into blocks of 64.  A small uncompressed block index
(first addr + byte offset per block) enables O(log(N/64)) binary search,
followed by sequential decode of at most 64 varints within the matching
block.  All decode state lives on the stack -- zero allocations, still
safe for NMI/panic context.

Measured on a defconfig+debug x86_64 build (3,017,154 entries, 4,822
source files, 47,144 blocks):

  Before (flat arrays):
    lineinfo_addrs[]    12,068,616 bytes (u32 x 3.0M)
    lineinfo_file_ids[]  6,034,308 bytes (u16 x 3.0M)
    lineinfo_lines[]    12,068,616 bytes (u32 x 3.0M)
    Total:              30,171,540 bytes (28.8 MiB, 10.0 bytes/entry)

  After (block-indexed delta + ULEB128):
    lineinfo_block_addrs[]    188,576 bytes (184 KiB)
    lineinfo_block_offsets[]  188,576 bytes (184 KiB)
    lineinfo_data[]        10,926,128 bytes (10.4 MiB)
    Total:                 11,303,280 bytes (10.8 MiB, 3.7 bytes/entry)

  Savings: 18.0 MiB (2.7x reduction)

Booted in QEMU and verified with SysRq-l that annotations still work:

  default_idle+0x9/0x10 (arch/x86/kernel/process.c:767)
  default_idle_call+0x6c/0xb0 (kernel/sched/idle.c:122)
  do_idle+0x335/0x490 (kernel/sched/idle.c:191)
  cpu_startup_entry+0x4e/0x60 (kernel/sched/idle.c:429)
  rest_init+0x1aa/0x1b0 (init/main.c:760)

Assisted-by: Claude:claude-opus-4-6
Link: https://lkml.kernel.org/r/20260322131543.971079-4-sashal@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Suggested-by: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Bottomley &lt;james.bottomley@HansenPartnership.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Luis Chamberalin &lt;mcgrof@kernel.org&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thorsten Leemhuis &lt;linux@leemhuis.info&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kallsyms: extend lineinfo to loadable modules</title>
<updated>2026-04-08T23:26:44Z</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2026-03-22T13:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8bfa5889bde6a85fa937e3d4c5243e249374207b'/>
<id>urn:sha1:8bfa5889bde6a85fa937e3d4c5243e249374207b</id>
<content type='text'>
Add CONFIG_KALLSYMS_LINEINFO_MODULES, which extends the
CONFIG_KALLSYMS_LINEINFO feature to loadable kernel modules.

At build time, each .ko is post-processed by scripts/gen-mod-lineinfo.sh
(modeled on gen-btf.sh) which runs scripts/gen_lineinfo --module on the
.ko, generates a .mod_lineinfo section containing a compact binary table
of .text-relative offsets, file IDs, line numbers, and filenames, and
embeds it back into the .ko via objcopy.

At runtime, module_lookup_lineinfo() performs a binary search on the
module's .mod_lineinfo section, and __sprint_symbol() calls it for
addresses that fall within a module.  The lookup is NMI/panic-safe (no
locks, no allocations) — the data lives in read-only module memory and
is freed automatically when the module is unloaded.

The gen_lineinfo tool gains --module mode which:
 - Uses .text section address as base (ET_REL files have no _text symbol)
 - Filters entries to .text-only (excludes .init.text/.exit.text)
 - Handles libdw's ET_REL path-doubling quirk in make_relative()
 - Outputs a flat binary-format section instead of named global symbols

Per-module overhead is approximately 10 bytes per DWARF line entry.

Assisted-by: Claude:claude-opus-4-6
Link: https://lkml.kernel.org/r/20260322131543.971079-3-sashal@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Bottomley &lt;james.bottomley@HansenPartnership.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Juegren Gross &lt;jgross@suse.com&gt;
Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Luis Chamberalin &lt;mcgrof@kernel.org&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thorsten Leemhuis &lt;linux@leemhuis.info&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>module: Simplify warning on positive returns from module_init()</title>
<updated>2026-04-04T00:04:48Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>demarchi@kernel.org</email>
</author>
<published>2026-03-30T13:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=663385f9155f27892a97a5824006f806a32eb8dc'/>
<id>urn:sha1:663385f9155f27892a97a5824006f806a32eb8dc</id>
<content type='text'>
It should now be rare to trigger this warning - it doesn't need to be so
verbose. Make it follow the usual style in the module loading code.

For the same reason, drop the dump_stack().

Suggested-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Lucas De Marchi &lt;demarchi@kernel.org&gt;
Reviewed-by: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Reviewed-by: Daniel Gomez &lt;da.gomez@samsung.com&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: Override -EEXIST module return</title>
<updated>2026-04-04T00:04:42Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>demarchi@kernel.org</email>
</author>
<published>2026-03-30T13:13:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=743f8cae549affe8eafb021b8c0e78a9f3bc23fa'/>
<id>urn:sha1:743f8cae549affe8eafb021b8c0e78a9f3bc23fa</id>
<content type='text'>
The -EEXIST errno is reserved by the module loading functionality. When
userspace calls [f]init_module(), it expects a -EEXIST to mean that the
module is already loaded in the kernel. If module_init() returns it,
that is not true anymore.

Override the error when returning to userspace: it doesn't make sense to
change potentially long error propagation call chains just because it's
will end up as the return of module_init().

Closes: https://lore.kernel.org/all/aKLzsAX14ybEjHfJ@orbyte.nwl.cc/
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Cc: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Cc: Daniel Gomez &lt;da.gomez@samsung.com&gt;
Cc: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Lucas De Marchi &lt;demarchi@kernel.org&gt;
[Sami: Fixed a typo.]
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: deprecate usage of *_gpl sections in module loader</title>
<updated>2026-03-31T23:42:52Z</updated>
<author>
<name>Siddharth Nayyar</name>
<email>sidnayyar@google.com</email>
</author>
<published>2026-03-26T21:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b4760ff2a5e4351c59d185967735f59c0b0bd7f6'/>
<id>urn:sha1:b4760ff2a5e4351c59d185967735f59c0b0bd7f6</id>
<content type='text'>
The *_gpl section are not being used populated by modpost anymore. Hence
the module loader doesn't need to find and process these sections in
modules.

This patch also simplifies symbol finding logic in module loader since
*_gpl sections don't have to be searched anymore.

Signed-off-by: Siddharth Nayyar &lt;sidnayyar@google.com&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: use kflagstab instead of *_gpl sections</title>
<updated>2026-03-31T23:42:52Z</updated>
<author>
<name>Siddharth Nayyar</name>
<email>sidnayyar@google.com</email>
</author>
<published>2026-03-26T21:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=55fcb926b6d8b5cfb40873e4840a69961db1bb69'/>
<id>urn:sha1:55fcb926b6d8b5cfb40873e4840a69961db1bb69</id>
<content type='text'>
Read kflagstab section for vmlinux and modules to determine whether
kernel symbols are GPL only.

This patch eliminates the need for fragmenting the ksymtab for infering
the value of GPL-only symbol flag, henceforth stop populating *_gpl
versions of the ksymtab and kcrctab in modpost.

Signed-off-by: Siddharth Nayyar &lt;sidnayyar@google.com&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: Give MODULE_SIG_STRING a more descriptive name</title>
<updated>2026-03-24T21:42:37Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-03-05T09:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ae4ea2d9aaf25cb74fbc23450b1b8f0a5b7aa89'/>
<id>urn:sha1:2ae4ea2d9aaf25cb74fbc23450b1b8f0a5b7aa89</id>
<content type='text'>
The purpose of the constant it is not entirely clear from its name.

As this constant is going to be exposed in a UAPI header, give it a more
specific name for clarity. As all its users call it 'marker', use that
wording in the constant itself.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: expose imported namespaces via sysfs</title>
<updated>2026-03-19T22:24:55Z</updated>
<author>
<name>Nicholas Sielicki</name>
<email>linux@opensource.nslick.com</email>
</author>
<published>2026-03-07T09:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3fe1dcbc2d20c5dbc581c0bb458e05365bfffcf7'/>
<id>urn:sha1:3fe1dcbc2d20c5dbc581c0bb458e05365bfffcf7</id>
<content type='text'>
Add /sys/module/*/import_ns to expose imported namespaces for
currently loaded modules. The file contains one namespace per line and
only exists for modules that import at least one namespace.

Previously, the only way for userspace to inspect the symbol
namespaces a module imports is to locate the .ko on disk and invoke
modinfo(8) to decompress/parse the metadata. The kernel validated
namespaces at load time, but it was otherwise discarded.

Exposing this data via sysfs provides a runtime mechanism to verify
which namespaces are being used by modules. For example, this allows
userspace to audit driver API access in Android GKI, which uses symbol
namespaces to restrict vendor drivers from using specific kernel
interfaces (e.g., direct filesystem access).

Signed-off-by: Nicholas Sielicki &lt;linux@opensource.nslick.com&gt;
[Sami: Updated the commit message to explain motivation.]
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
<entry>
<title>module: Fix freeing of charp module parameters when CONFIG_SYSFS=n</title>
<updated>2026-03-18T21:43:18Z</updated>
<author>
<name>Petr Pavlu</name>
<email>petr.pavlu@suse.com</email>
</author>
<published>2026-03-13T13:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=deffe1edba626d474fef38007c03646ca5876a0e'/>
<id>urn:sha1:deffe1edba626d474fef38007c03646ca5876a0e</id>
<content type='text'>
When setting a charp module parameter, the param_set_charp() function
allocates memory to store a copy of the input value. Later, when the module
is potentially unloaded, the destroy_params() function is called to free
this allocated memory.

However, destroy_params() is available only when CONFIG_SYSFS=y, otherwise
only a dummy variant is present. In the unlikely case that the kernel is
configured with CONFIG_MODULES=y and CONFIG_SYSFS=n, this results in
a memory leak of charp values when a module is unloaded.

Fix this issue by making destroy_params() always available when
CONFIG_MODULES=y. Rename the function to module_destroy_params() to clarify
that it is intended for use by the module loader.

Fixes: e180a6b7759a ("param: fix charp parameters set via sysfs")
Signed-off-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
</content>
</entry>
</feed>
