<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/mod/modpost.c, branch v7.3-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-18T19:18:33+00:00</updated>
<entry>
<title>Merge tag 'objtool-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-08-18T19:18:33+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-18T19:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0acd94e3819fcd8346ae3c16df987e0fabb3128'/>
<id>urn:sha1:a0acd94e3819fcd8346ae3c16df987e0fabb3128</id>
<content type='text'>
Pull objtool updates from Ingo Molnar:

 - Fix various klp-build bugs reported by Joe Lawrence (Josh Poimboeuf,
   Joe Lawrence)

 - Misc fixes and cleanups (Puranjay Mohan, Thomas Huth and Ingo Molnar)

* tag 'objtool-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool/klp: Fix vmlinux klp relocations for EXPORT_SYMBOL_FOR_MODULES()
  objtool/klp: Fix .kcfi_traps special section extraction
  objtool/klp: Fix vmlinux .klp.symid link error for .exitcall.exit symbols
  objtool/klp: Fix line numbers in Module.symvers parse errors
  objtool/klp: Fix relocations for EXPORT_SYMBOL_FOR_MODULES() symbols
  objtool/klp: Allow new references to module exports
  objtool/klp: Don't match local symbols against exports
  objtool/klp: Fix cross-module klp relocation section naming
  objtool/klp: Explicitly disallow patching or referencing init code/data
  objtool/klp: Ignore replacement offset of empty x86 alternatives
  objtool/klp: Fix size of empty special section entries
  objtool/klp: Fix vmlinux .klp.symid link error for .no_trim_symbol symbols
  objtool/headers: Sync tools/include/linux/objtool_types.h with include/linux/objtool_types.h
  objtool: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
  objtool/klp: Fix symbol resolution for duplicate data symbols
  objtool/klp: Add .klp.symid for sympos disambiguation
  objtool/klp: Skip hidden directories when finding objects
  objtool/klp: Fix false module dependencies caused by dead relocs
  objtool/klp: Normalize Module.symvers paths to module names
  objtool/klp: Fix module name normalization for paths with dots
</content>
</entry>
<entry>
<title>modpost: use mod_warn() and mod_error(), clean up logging</title>
<updated>2026-08-15T19:01:51+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-08-07T16:29:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d900723d78adec229996aefbab0dcaa66a177b77'/>
<id>urn:sha1:d900723d78adec229996aefbab0dcaa66a177b77</id>
<content type='text'>
Convert all module name logging to use the mod_warn() and mod_error()
helpers, and pass the module to modpost_log() where used directly, to
always have the module name prefixed in the log message, with .ko suffix
for modules.

Pass struct module *mod around in a few places instead of just
mod-&gt;name.

Further unify the logging while at it. Use single quotes instead of
double quotes for symbols, sections, and namespaces. Explicitly state
it's a "symbol" when referencing symbols.

Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patch.msgid.link/17ed1bce5d54fb32533ba83bc83c429cb71adcb0.1786120005.git.jani.nikula@intel.com
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Nicolas Schier &lt;nsc@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: add module as parameter to modpost_log()</title>
<updated>2026-08-14T19:34:40+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-08-07T16:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a765d3c6cd88696fd233b9596b721400c6b25396'/>
<id>urn:sha1:a765d3c6cd88696fd233b9596b721400c6b25396</id>
<content type='text'>
modpost has a lot of error logging with module name, but the module name
is logged in a plethora of ways. Add struct module * parameter to
modpost_log(), and wrappers mod_warn() and mod_error(), to allow logging
with a unified module name, if provided.

If the module is provided, the messages will be of the format:

(ERROR|WARNING): modpost: (modname.ko|vmlinux): message

Actual conversion is done separately.

Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patch.msgid.link/f27bd8810f0ef12fb86068f0190e4e0afa81e0fa.1786120005.git.jani.nikula@intel.com
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Signed-off-by: Nicolas Schier &lt;nsc@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: prevent leak when early return no suffix .o in read_symbols()</title>
<updated>2026-08-05T12:51:58+00:00</updated>
<author>
<name>Robertus Diawan Chris</name>
<email>robertusdchris@gmail.com</email>
</author>
<published>2026-06-24T04:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a5b76027ed91680e10f90111d9cba300f96d1ab'/>
<id>urn:sha1:9a5b76027ed91680e10f90111d9cba300f96d1ab</id>
<content type='text'>
The allocation for elf info symsearch and hdr from parse_elf() haven't
been released when return because of modname didn't have suffix ".o".
And it seems like the suffix ".o" check did not depends on parse_elf()
to succeed first. So, move the suffix ".o" check before checking
parse_elf() result to prevent resource leak when the modname didn't have
suffix ".o" and return early.

This is reported by Coverity Scan as "Resource leak".

Fixes: 8c9ce89c5b63 ("modpost: simplify mod-&gt;name allocation")
Signed-off-by: Robertus Diawan Chris &lt;robertusdchris@gmail.com&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Link: https://patch.msgid.link/20260624044742.144852-1-robertusdchris@gmail.com
Signed-off-by: Nicolas Schier &lt;nsc@kernel.org&gt;
</content>
</entry>
<entry>
<title>objtool/klp: Add .klp.symid for sympos disambiguation</title>
<updated>2026-08-03T05:12:39+00:00</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2026-08-03T03:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=029223d301620bc4e1086696047b0d5d6eba5edd'/>
<id>urn:sha1:029223d301620bc4e1086696047b0d5d6eba5edd</id>
<content type='text'>
Livepatch identifies a duplicate-named symbol by its position (sympos)
among same-named kallsyms entries, which for vmlinux are counted in
ascending address order in the final linked kernel.  That order can't be
reliably derived from vmlinux.o: the final link reorders sub-sections
(.text.unlikely*, .data..*, etc).

Bridge the gap with a new .klp.symid section which can be used to
correlate symbols between vmlinux.o and vmlinux so that klp-diff can
reliably determine the sympos.

The table can't survive --gc-sections: keeping it alive would keep every
duplicate-named symbol's section alive, so the reference kernel would
stop matching the one which ships.  klp-build rejects
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION instead.  Nothing is lost today:
x86_64 is the only HAVE_KLP_BUILD arch and doesn't select
HAVE_LD_DEAD_CODE_DATA_ELIMINATION, arm64 and s390 have never selected
it either, and on powerpc, it's still EXPERIMENTAL and disabled by every
distro kernel.

This is the build-time half of reliable vmlinux sympos computation;
"objtool klp diff" will consume the table in a subsequent commit.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: live-patching@vger.kernel.org
Link: https://patch.msgid.link/64d50f077b569f47883c015cdb7079edb068efe8.1785727106.git.jpoimboe@kernel.org
</content>
</entry>
<entry>
<title>modpost: Ignore Clang LTO suffixes in symbol matching</title>
<updated>2026-06-18T18:35:22+00:00</updated>
<author>
<name>Rong Xu</name>
<email>xur@google.com</email>
</author>
<published>2026-06-17T22:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a289cc425bf469642533e4afa01c90f08971d01'/>
<id>urn:sha1:9a289cc425bf469642533e4afa01c90f08971d01</id>
<content type='text'>
When building the kernel with Clang ThinLTO enabled, the compiler
can mangle static variable names by appending suffixes such as
".llvm.&lt;hash&gt;" to prevent naming collisions across translation units.

This name mangling breaks the section mismatch whitelisting in modpost.
modpost relies on glob patterns (e.g., "*_ops" or "*_probe") to identify
safe references between permanent data and initialization code. Because
the LTO suffix modifies the end of the symbol name, legitimately
whitelisted structures fail the match, resulting in false positive
warnings.

For example, a static pernet_operations struct triggers the following:

  WARNING: modpost: vmlinux: section mismatch in reference: \
  ping_v4_net_ops.llvm.5641696707737373282 (section: .data) -&gt; \
  ping_v4_proc_init_net (section: .init.text)

Fix this by ignoring "*_ops.llvm.*" in "from" symbol names (the same
as "*_ops").

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202606111233.kM8oo8Df-lkp@intel.com/
Signed-off-by: Rong Xu &lt;xur@google.com&gt;
Link: https://patch.msgid.link/20260617224623.1346309-1-xur@google.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>modpost: Add __llvm_covfun and __llvm_covmap to section_white_list</title>
<updated>2026-06-06T03:48:58+00:00</updated>
<author>
<name>James Lee</name>
<email>james@codeconstruct.com.au</email>
</author>
<published>2026-06-04T06:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29c52907334a8e50ba1ee5fbaa53407dec28d876'/>
<id>urn:sha1:29c52907334a8e50ba1ee5fbaa53407dec28d876</id>
<content type='text'>
Modpost emits hundreds of warnings when using Clang to build for ARCH=um
and CONFIG_GCOV=y. e.g.:
    vmlinux (__llvm_covfun): unexpected non-allocatable section.
    Did you forget to use "ax"/"aw" in a .S file?
    Note that for example &lt;linux/init.h&gt; contains
    section definitions for use in .S files.

For example, when we use LLVM for a kunit user mode build with coverage:
    python3 tools/testing/kunit/kunit.py build --make_options LLVM=1 \
        --kunitconfig=tools/testing/kunit/configs/default.config \
        --kunitconfig=tools/testing/kunit/configs/coverage_uml.config

The behaviour occurs when building the kernel for ARCH=um with code
coverage enabled. The warnings come from modpost's check_sec_ref
function, which ensures no sections reference others that will be
discarded. covfun and covmap sections must reference __init and __exit
sections to collect coverage data, triggering the modpost warning.

To suppress these warnings, these section names have been added to
modpost's whitelist. This is unlikely to suppress legitimate warnings as
Clang will only insert these sections when building with coverage, and
can be assumed to manage these references safely.

Signed-off-by: James Lee &lt;james@codeconstruct.com.au&gt;
Link: https://patch.msgid.link/20260604-dev-coverage-patch-v1-1-9f9368253cb4@codeconstruct.com.au
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: distributed build support for Clang ThinLTO</title>
<updated>2026-05-29T20:44:29+00:00</updated>
<author>
<name>Rong Xu</name>
<email>xur@google.com</email>
</author>
<published>2026-05-29T18:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f2aee8f7d1842be08da860e45265d30dba0d1f7'/>
<id>urn:sha1:9f2aee8f7d1842be08da860e45265d30dba0d1f7</id>
<content type='text'>
Add distributed ThinLTO build support for the Linux kernel.
This new mode offers several advantages: (1) Increased
flexibility in handling user-specified build options.
(2) Improved user-friendliness for developers. (3) Greater
convenience for integrating with objtool and livepatch.

Note that "distributed" in this context refers to a term
that differentiates in-process ThinLTO builds by invoking
backend compilation through the linker, not necessarily
building in distributed environments.

Distributed ThinLTO is enabled via the
`CONFIG_LTO_CLANG_THIN_DIST` Kconfig option. For example:
 &gt; make LLVM=1 defconfig
 &gt; scripts/config -e LTO_CLANG_THIN_DIST
 &gt; make LLVM=1 oldconfig
 &gt; make LLVM=1 vmlinux -j &lt;..&gt;

The build flow proceeds in four stages:
  1. Perform FE compilation, mirroring the in-process ThinLTO mode.
  2. Thin-link the generated IR files and object files.
  3. Find all IR files and perform BE compilation, using the flags
    stored in the .*.o.cmd files.
  4. Link the BE results to generate the final vmlinux.o.

NOTE: This patch currently implements the build for the main kernel
image (vmlinux) only. Kernel module support is planned for a
subsequent patch.

Tested on the following arch: x86, arm64, loongarch, and
riscv.

The earlier implementation details can be found here:
https://discourse.llvm.org/t/rfc-distributed-thinlto-build-for-kernel/85934

Signed-off-by: Rong Xu &lt;xur@google.com&gt;
Co-developed-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Tested-by: Piotr Gorski &lt;piotrgorski@cachyos.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Link: https://patch.msgid.link/20260529185347.2418373-4-xur@google.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: modpost: detect and report truncated buf_printf() output</title>
<updated>2026-05-28T16:57:13+00:00</updated>
<author>
<name>Alexandre Courbot</name>
<email>acourbot@nvidia.com</email>
</author>
<published>2026-05-27T11:52:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7231d8cb262b1e350c00271bf53d54414b4f3b1'/>
<id>urn:sha1:d7231d8cb262b1e350c00271bf53d54414b4f3b1</id>
<content type='text'>
buf_printf() uses a fixed-size stack buffer. vsnprintf() returns the
number of bytes that *would* have been written to that buffer, which can
be larger than the size of said buffer if the formatted string is too
long.

The problem is that whenever this happens buf_printf() currently passes
this length, unchecked, to buf_write(), which silently reads past the
stack buffer and copies invalid data into the output buffer.

Fix this by detecting vsnprintf() failures and truncations before
appending to the output buffer, and report a fatal error instead of
producing corrupt symbol names.

Signed-off-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Link: https://patch.msgid.link/20260527-nova-exports-v2-1-06de4c556d55@nvidia.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'modules-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux</title>
<updated>2026-04-15T00:16:38+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-04-15T00:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88b29f3f579987fff0d2bd726d5fa95a53f857fa'/>
<id>urn:sha1:88b29f3f579987fff0d2bd726d5fa95a53f857fa</id>
<content type='text'>
Pull module updates from Sami Tolvanen:
 "Kernel symbol flags:

   - Replace the separate *_gpl symbol sections (__ksymtab_gpl and
     __kcrctab_gpl) with a unified symbol table and a new __kflagstab
     section.

     This section stores symbol flags, such as the GPL-only flag, as an
     8-bit bitset for each exported symbol. This is a cleanup that
     simplifies symbol lookup in the module loader by avoiding table
     fragmentation and will allow a cleaner way to add more flags later
     if needed.

  Module signature UAPI:

   - Move struct module_signature to the UAPI headers to allow reuse by
     tools outside the kernel proper, such as kmod and
     scripts/sign-file.

     This also renames a few constants for clarity and drops unused
     signature types as preparation for hash-based module integrity
     checking work that's in progress.

  Sysfs:

   - Add a /sys/module/&lt;module&gt;/import_ns sysfs attribute to show the
     symbol namespaces imported by loaded modules.

     This makes it easier to verify driver API access at runtime on
     systems that care about such things (e.g. Android).

  Cleanups and fixes:

   - Force sh_addr to 0 for all sections in module.lds. This prevents
     non-zero section addresses when linking modules with 'ld.bfd -r',
     which confused elfutils.

   - Fix a memory leak of charp module parameters on module unload when
     the kernel is configured with CONFIG_SYSFS=n.

   - Override the -EEXIST error code returned by module_init() to
     userspace. This prevents confusion with the errno reserved by the
     module loader to indicate that a module is already loaded.

   - Simplify the warning message and drop the stack dump on positive
     returns from module_init().

   - Drop unnecessary extern keywords from function declarations and
     synchronize parse_args() arguments with their implementation"

* tag 'modules-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: (23 commits)
  module: Simplify warning on positive returns from module_init()
  module: Override -EEXIST module return
  documentation: remove references to *_gpl sections
  module: remove *_gpl sections from vmlinux and modules
  module: deprecate usage of *_gpl sections in module loader
  module: use kflagstab instead of *_gpl sections
  module: populate kflagstab in modpost
  module: add kflagstab section to vmlinux and modules
  module: define ksym_flags enumeration to represent kernel symbol flags
  selftests/bpf: verify_pkcs7_sig: Use 'struct module_signature' from the UAPI headers
  sign-file: use 'struct module_signature' from the UAPI headers
  tools uapi headers: add linux/module_signature.h
  module: Move 'struct module_signature' to UAPI
  module: Give MODULE_SIG_STRING a more descriptive name
  module: Give 'enum pkey_id_type' a more specific name
  module: Drop unused signature types
  extract-cert: drop unused definition of PKEY_ID_PKCS7
  docs: symbol-namespaces: mention sysfs attribute
  module: expose imported namespaces via sysfs
  module: Remove extern keyword from param prototypes
  ...
</content>
</entry>
</feed>
