<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile.modfinal</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>7abef41afad05be1a4b2a3303b9ecf62403463a1 - kbuild/btf: Remove broken module relinking exclusion</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#7abef41afad05be1a4b2a3303b9ecf62403463a1</link>
        <description>kbuild/btf: Remove broken module relinking exclusionCommit 5f9ae91f7c0d (&quot;kbuild: Build kernel module BTFs if BTF is enabledand pahole supports it&quot;) in 2020 introduced CONFIG_DEBUG_INFO_BTF_MODULESto enable generation of split BTF for kernel modules. This change requiredthe %.ko Makefile rule to additionally depend on vmlinux, which is used asa base for deduplication. The regular ld_ko_o command executed by the rulewas then modified to be skipped if only vmlinux changes. This was done byintroducing a new if_changed_except command and updating the original callto &apos;+$(call if_changed_except,ld_ko_o,vmlinux)&apos;.Later, commit 214c0eea43b2 (&quot;kbuild: add $(objtree)/ prefix to somein-kernel build artifacts&quot;) in 2024 updated the rule&apos;s reference to vmlinuxfrom &apos;vmlinux&apos; to &apos;$(objtree)/vmlinux&apos;. This accidentally broke theprevious logic to skip relinking modules if only vmlinux changes. The issueis that &apos;$(objtree)&apos; is typically &apos;.&apos; and GNU Make normalizes the resultingprerequisite &apos;./vmlinux&apos; to just &apos;vmlinux&apos;, while the exclusion logicretains the raw &apos;./vmlinux&apos;. As a result, if_changed_except doesn&apos;tcorrectly filter out vmlinux. Consequently, withCONFIG_DEBUG_INFO_BTF_MODULES=y, modules are relinked even if only vmlinuxchanges.It is possible to fix this Makefile issue. However, having the %.ko ruleupdate the resulting file in place without starting from the originalinputs is rather fragile. The logic is harder to debug if something breaksduring a subsequent .ko update because the old input is lost due to theoverwrite. Additionally, it requires that the BTF processing is idempotent.For example, sorting id+flags BTF_SET8 pairs in .BTF_ids by resolve_btfidscurrently doesn&apos;t have this property.One option is to split the %.ko target into two rules: the first forpartial linking and the second one for generating the BTF data. However,this approach runs into an issue with requiring additional intermediatefiles, which increases the size of the build directory. On my system, whenusing a large distribution config with ~5500 modules, the size of the builddirectory with debuginfo enabled is already ~25 GB, with .ko filesoccupying ~8 GB. Duplicating these .ko files doesn&apos;t seem practical.Measuring the speed of the %.ko processing shows that the link step isactually relatively fast. It takes about 20% of the overall rule time,while the BTF processing accounts for 80%. Moreover, skipping the link partbecomes relevant only during local development. In such cases, developerstypically use configs that enable a limited number of modules, so havingthe %.ko rule slightly slower doesn&apos;t significantly impact the totalrebuild time. This is supported by the fact that no one has complainedabout this optimization being broken for the past two years.Therefore, remove the logic that prevents module relinking when onlyvmlinux changes and simplify Makefile.modfinal.Signed-off-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;Reviewed-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;Tested-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;Acked-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;Link: https://patch.msgid.link/20260410131343.2519532-1-petr.pavlu@suse.comSigned-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Fri, 10 Apr 2026 15:13:29 +0200</pubDate>
        <dc:creator>Petr Pavlu &lt;petr.pavlu@suse.com&gt;</dc:creator>
    </item>
<item>
        <title>26ad5d6e763070aa146d86b941884b11eb1ac0aa - scripts/gen-btf.sh: Use CONFIG_SHELL for execution</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#26ad5d6e763070aa146d86b941884b11eb1ac0aa</link>
        <description>scripts/gen-btf.sh: Use CONFIG_SHELL for executionAccording to the docs [1], kernel build scripts should be executed viaCONFIG_SHELL, which is sh by default.Fixup gen-btf.sh to be runnable with sh, and use CONFIG_SHELL at everyinvocation site.See relevant discussion for context [2].[1] https://docs.kernel.org/kbuild/makefiles.html#script-invocation[2] https://lore.kernel.org/bpf/CAADnVQ+dxmSNoJAGb6xV89ffUCKXe5CJXovXZt22nv5iYFV5mw@mail.gmail.com/Signed-off-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;Tested-by: Gary Guo &lt;gary@garyguo.net&gt;Reported-by: Gary Guo &lt;gary@garyguo.net&gt;Suggested-by: Thomas Wei&#223;schuh &lt;linux@weissschuh.net&gt;Fixes: 522397d05e7d (&quot;resolve_btfids: Change in-place update with raw binary output&quot;)Link: https://lore.kernel.org/r/20260121181617.820300-1-ihor.solodrai@linux.devSigned-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Wed, 21 Jan 2026 19:16:17 +0100</pubDate>
        <dc:creator>Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;</dc:creator>
    </item>
<item>
        <title>522397d05e7d4a7c30b91841492360336b24f833 - resolve_btfids: Change in-place update with raw binary output</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#522397d05e7d4a7c30b91841492360336b24f833</link>
        <description>resolve_btfids: Change in-place update with raw binary outputCurrently resolve_btfids updates .BTF_ids section of an ELF filein-place, based on the contents of provided BTF, usually within thesame input file, and optionally a BTF base.Change resolve_btfids behavior to enable BTF transformations as partof its main operation. To achieve this, in-place ELF write inresolve_btfids is replaced with generation of the following binaries:  * ${1}.BTF with .BTF section data  * ${1}.BTF_ids with .BTF_ids section data if it existed in ${1}  * ${1}.BTF.base with .BTF.base section data for out-of-tree modulesThe execution of resolve_btfids and consumption of its output isorchestrated by scripts/gen-btf.sh introduced in this patch.The motivation for emitting binary data is that it allows simplifyingresolve_btfids implementation by delegating ELF update to the $OBJCOPYtool [1], which is already widely used across the codebase.There are two distinct paths for BTF generation and resolve_btfidsapplication in the kernel build: for vmlinux and for kernel modules.For the vmlinux binary a .BTF section is added in a roundabout way toensure correct linking. The patch doesn&apos;t change this approach, onlythe implementation is a little different.Before this patch it worked as follows:  * pahole consumed .tmp_vmlinux1 [2] and added .BTF section with    llvm-objcopy [3] to it  * then everything except the .BTF section was stripped from .tmp_vmlinux1    into a .tmp_vmlinux1.bpf.o object [2], later linked into vmlinux  * resolve_btfids was executed later on vmlinux.unstripped [4],    updating it in-placeAfter this patch gen-btf.sh implements the following:  * pahole consumes .tmp_vmlinux1 and produces a *detached* file with    raw BTF data  * resolve_btfids consumes .tmp_vmlinux1 and detached BTF to produce    (potentially modified) .BTF, and .BTF_ids sections data  * a .tmp_vmlinux1.bpf.o object is then produced with objcopy copying    BTF output of resolve_btfids  * .BTF_ids data gets embedded into vmlinux.unstripped in    link-vmlinux.sh by objcopy --update-sectionFor kernel modules, creating a special .bpf.o file is not necessary,and so embedding of sections data produced by resolve_btfids isstraightforward with objcopy.With this patch an ELF file becomes effectively read-only withinresolve_btfids, which allows deleting elf_update() call and satellitecode (like compressed_section_fix [5]).Endianness handling of .BTF_ids data is also changed. Previously the&quot;flags&quot; part of the section was bswapped in sets_patch() [6], and thenElf_Type was modified before elf_update() to signal to libelf thatbswap may be necessary. With this patch we explicitly bswap entiredata buffer on load and on dump.[1] https://lore.kernel.org/bpf/131b4190-9c49-4f79-a99d-c00fac97fa44@linux.dev/[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/link-vmlinux.sh?h=v6.18#n110[3] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/tree/btf_encoder.c?h=v1.31#n1803[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/link-vmlinux.sh?h=v6.18#n284[5] https://lore.kernel.org/bpf/20200819092342.259004-1-jolsa@kernel.org/[6] https://lore.kernel.org/bpf/cover.1707223196.git.vmalik@redhat.com/Signed-off-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Tested-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;Acked-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;Link: https://lore.kernel.org/bpf/20251219181825.1289460-3-ihor.solodrai@linux.dev

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Fri, 19 Dec 2025 19:18:25 +0100</pubDate>
        <dc:creator>Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;</dc:creator>
    </item>
<item>
        <title>01ecf7af00b86daf7ac441b9f94d4873d2b8fc74 - tracing: Add warnings for unused tracepoints for modules</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#01ecf7af00b86daf7ac441b9f94d4873d2b8fc74</link>
        <description>tracing: Add warnings for unused tracepoints for modulesIf a modules has TRACE_EVENT() but does not use it, add a warning about itat build time.Currently, the build must be made by adding &quot;UT=1&quot; to the make commandline in order for this to trigger.Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;Cc: Nicolas Schier &lt;nicolas.schier@linux.dev&gt;Cc: Nick Desaulniers &lt;nick.desaulniers+lkml@gmail.com&gt;Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;Link: https://lore.kernel.org/20251022004453.422000794@kernel.orgSigned-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Wed, 22 Oct 2025 02:43:43 +0200</pubDate>
        <dc:creator>Steven Rostedt &lt;rostedt@goodmis.org&gt;</dc:creator>
    </item>
<item>
        <title>1b466b29a3bf02ed95f28682a975f41ae47bce7d - kbuild: re-enable KCSAN for autogenerated *.mod.c intermediaries</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#1b466b29a3bf02ed95f28682a975f41ae47bce7d</link>
        <description>kbuild: re-enable KCSAN for autogenerated *.mod.c intermediariesThis reverts commit 54babdc0343f (&quot;kbuild: Disable KCSAN forautogenerated *.mod.c intermediaries&quot;).Now that objtool is enabled for *.mod.c, there is no need to filterout CFLAGS_KCSAN.I no longer see &quot;Unpatched return thunk in use. This should not happen!&quot;error with KCSAN when loading a module.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Thu, 14 Nov 2024 00:45:23 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>bede169618c68379e1be7ace14e8ac85b964a9ec - kbuild: enable objtool for *.mod.o and additional kernel objects</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#bede169618c68379e1be7ace14e8ac85b964a9ec</link>
        <description>kbuild: enable objtool for *.mod.o and additional kernel objectsCurrently, objtool is disabled in scripts/Makefile.{modfinal,vmlinux}.This commit moves rule_cc_o_c and rule_as_o_S to scripts/Makefile.liband set objtool-enabled to y there.With this change, *.mod.o, .module-common.o,  builtin-dtb.o, andvmlinux.export.o will now be covered by objtool.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Thu, 14 Nov 2024 00:45:22 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>000e22a80de0727839bb753159ac05c8ba20c3e3 - kbuild: move cmd_cc_o_c and cmd_as_o_S to scripts/Malefile.lib</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#000e22a80de0727839bb753159ac05c8ba20c3e3</link>
        <description>kbuild: move cmd_cc_o_c and cmd_as_o_S to scripts/Malefile.libThe cmd_cc_o_c and cmd_as_o_S macros are duplicated inscripts/Makefile.{build,modfinal,vmlinux}.This commit factors them out to scripts/Makefile.lib.No functional changes are intended.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Thu, 14 Nov 2024 00:45:21 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>bad6beb2c0bb982b830f592a7b3e3eee76cbb85a - kbuild: remove extmod_prefix, MODORDER, MODULES_NSDEPS variables</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#bad6beb2c0bb982b830f592a7b3e3eee76cbb85a</link>
        <description>kbuild: remove extmod_prefix, MODORDER, MODULES_NSDEPS variablesWith the previous changes, $(extmod_prefix), $(MODORDER), and$(MODULES_NSDEPS) are constant. (empty, modules.order, andmodules.nsdeps, respectively).Remove these variables and hard-code their values.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 10 Nov 2024 02:34:34 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>214c0eea43b2ea66bcd6467ea57e47ce8874191b - kbuild: add $(objtree)/ prefix to some in-kernel build artifacts</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#214c0eea43b2ea66bcd6467ea57e47ce8874191b</link>
        <description>kbuild: add $(objtree)/ prefix to some in-kernel build artifacts$(objtree) refers to the top of the output directory of kernel builds.This commit adds the explicit $(objtree)/ prefix to build artifactsneeded for building external modules.This change has no immediate impact, as the top-level Makefilecurrently defines:  objtree         := .This commit prepares for supporting the building of external modulesin a different directory.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 10 Nov 2024 02:34:30 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>cc6d281fcc7319babc6dde8f95a8b7feb1eeffd0 - kbuild: remove append operation on cmd_ld_ko_o</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#cc6d281fcc7319babc6dde8f95a8b7feb1eeffd0</link>
        <description>kbuild: remove append operation on cmd_ld_ko_oThe append operation was introduced incommit b1a1a1a09b46 (&quot;kbuild: lto: postpone objtool&quot;)when the command was created from two parts.In commit 850ded46c642 (&quot;kbuild: Fix TRIM_UNUSED_KSYMS with LTO_CLANG&quot;)however the first part was removed again, making the append operationunnecessary.To keep this command definition aligned with all other commanddefinitions, remove the append again.Signed-off-by: Thomas Wei&#223;schuh &lt;linux@weissschuh.net&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 08 Sep 2024 15:26:00 +0200</pubDate>
        <dc:creator>Thomas Wei&#223;schuh &lt;linux@weissschuh.net&gt;</dc:creator>
    </item>
<item>
        <title>fdf94e4403ece60b29ef9e2da95e2fcefe50817f - kbuild: compile constant module information only once</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#fdf94e4403ece60b29ef9e2da95e2fcefe50817f</link>
        <description>kbuild: compile constant module information only onceVarious information about modules is compiled into the info sections.For that a dedicated .mod.c file is generated by modpost for each moduleand then linked into the module.However most of the information in the .mod.c is the same for allmodules, internal and external.Split the shared information into a dedicated source file that iscompiled once and then linked into all modules.This avoids frequent rebuilds for all .mod.c files when usingCONFIG_LOCALVERSION_AUTO because the local version ends up in .mod.cthrough UTS_RELEASE and VERMAGIC_STRING.The modules are still relinked in this case.The code is also easier to maintain as it&apos;s now in a proper source fileinstead of an inline string literal.Signed-off-by: Thomas Wei&#223;schuh &lt;linux@weissschuh.net&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 01 Sep 2024 19:55:21 +0200</pubDate>
        <dc:creator>Thomas Wei&#223;schuh &lt;linux@weissschuh.net&gt;</dc:creator>
    </item>
<item>
        <title>8fb4ac1cee88a57e7a56faba49b408a41a4af4db - kbuild: fix typos &quot;prequisites&quot; to &quot;prerequisites&quot;</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#8fb4ac1cee88a57e7a56faba49b408a41a4af4db</link>
        <description>kbuild: fix typos &quot;prequisites&quot; to &quot;prerequisites&quot;This typo in scripts/Makefile.build has been present for more than 20years. It was accidentally copy-pasted to other scripts/Makefile.* files.Fix them all.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 18 Aug 2024 09:07:11 +0200</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>46fb0b62ea29c0dbcb3e44f1d67aafe79bc6e045 - kbuild,bpf: Add module-specific pahole flags for distilled base BTF</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#46fb0b62ea29c0dbcb3e44f1d67aafe79bc6e045</link>
        <description>kbuild,bpf: Add module-specific pahole flags for distilled base BTFSupport creation of module BTF along with distilled base BTF;the latter is stored in a .BTF.base ELF section and supplementssplit BTF references to base BTF with information about base types,allowing for later relocation of split BTF with a (possiblychanged) base.  resolve_btfids detects the presence of a .BTF.basesection and will use it instead of the base BTF it is passed inBTF id resolution.Modules will be built with a distilled .BTF.base section for externalmodule build, i.e.make -C. -M=path2/module...while in-tree module build as part of a normal kernel build willnot generate distilled base BTF; this is because in-tree moduleschange with the kernel and do not require BTF relocation for therunning vmlinux.Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Reviewed-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;Link: https://lore.kernel.org/bpf/20240620091733.1967885-6-alan.maguire@oracle.com

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Thu, 20 Jun 2024 11:17:32 +0200</pubDate>
        <dc:creator>Alan Maguire &lt;alan.maguire@oracle.com&gt;</dc:creator>
    </item>
<item>
        <title>b4f944ba521485125206640f6e66dce3f350ad6b - kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#b4f944ba521485125206640f6e66dce3f350ad6b</link>
        <description>kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinalInstead of filtering out the GCOV and KCSAN flags, let&apos;s set GCOV_PROFILEand KCSAN_SANITIZE to &apos;n&apos;, as in other Makefiles.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;Tested-by: Roberto Sassu &lt;roberto.sassu@huawei.com&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Mon, 06 May 2024 15:35:44 +0200</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>54babdc0343fff2f32dfaafaaa9e42c4db278204 - kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#54babdc0343fff2f32dfaafaaa9e42c4db278204</link>
        <description>kbuild: Disable KCSAN for autogenerated *.mod.c intermediariesWhen KCSAN and CONSTRUCTORS are enabled, one can trigger the  &quot;Unpatched return thunk in use. This should not happen!&quot;catch-all warning.Usually, when objtool runs on the .o objects, it does generate a section.return_sites which contains all offsets in the objects to the returnthunks of the functions present there. Those return thunks then getpatched at runtime by the alternatives.KCSAN and CONSTRUCTORS add this to the object file&apos;s .text.startupsection:  -------------------  Disassembly of section .text.startup:  ...  0000000000000010 &lt;_sub_I_00099_0&gt;:    10:   f3 0f 1e fa             endbr64    14:   e8 00 00 00 00          call   19 &lt;_sub_I_00099_0+0x9&gt;                          15: R_X86_64_PLT32      __tsan_init-0x4    19:   e9 00 00 00 00          jmp    1e &lt;__UNIQUE_ID___addressable_cryptd_alloc_aead349+0x6&gt;                          1a: R_X86_64_PLT32      __x86_return_thunk-0x4  -------------------which, if it is built as a module goes through the intermediary stage ofcreating a &lt;module&gt;.mod.c file which, when translated, receives a secondconstructor:  -------------------  Disassembly of section .text.startup:  0000000000000010 &lt;_sub_I_00099_0&gt;:    10:   f3 0f 1e fa             endbr64    14:   e8 00 00 00 00          call   19 &lt;_sub_I_00099_0+0x9&gt;                          15: R_X86_64_PLT32      __tsan_init-0x4    19:   e9 00 00 00 00          jmp    1e &lt;_sub_I_00099_0+0xe&gt;                          1a: R_X86_64_PLT32      __x86_return_thunk-0x4  ...  0000000000000030 &lt;_sub_I_00099_0&gt;:    30:   f3 0f 1e fa             endbr64    34:   e8 00 00 00 00          call   39 &lt;_sub_I_00099_0+0x9&gt;                          35: R_X86_64_PLT32      __tsan_init-0x4    39:   e9 00 00 00 00          jmp    3e &lt;__ksymtab_cryptd_alloc_ahash+0x2&gt;                          3a: R_X86_64_PLT32      __x86_return_thunk-0x4  -------------------in the .ko file.Objtool has run already so that second constructor&apos;s return thunk cannotbe added to the .return_sites section and thus the return thunk remainsunpatched and the warning rightfully fires.Drop KCSAN flags from the mod.c generation stage as those constructorsdo not contain data races one would be interested about.Debugged together with David Kaplan &lt;David.Kaplan@amd.com&gt; and NikolayBorisov &lt;nik.borisov@suse.com&gt;.Reported-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;Closes: https://lore.kernel.org/r/0851a207-7143-417e-be31-8bf2b3afb57d@molgen.mpg.deSigned-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;Tested-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt; # Dell XPS 13Reviewed-by: Nikolay Borisov &lt;nik.borisov@suse.com&gt;Reviewed-by: Marco Elver &lt;elver@google.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Tue, 26 Mar 2024 21:25:48 +0100</pubDate>
        <dc:creator>Borislav Petkov (AMD) &lt;bp@alien8.de&gt;</dc:creator>
    </item>
<item>
        <title>7f6d8f7e43fb516f060cf71672a922031aa5faa9 - kbuild: remove ARCH_POSTLINK from module builds</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#7f6d8f7e43fb516f060cf71672a922031aa5faa9</link>
        <description>kbuild: remove ARCH_POSTLINK from module buildsThe &apos;%.ko&apos; rule in arch/*/Makefile.postlink does nothing but call the&apos;true&apos; command.Remove the unneeded code.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;n.schier@avm.de&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Wed, 18 Oct 2023 17:19:47 +0200</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>41bdc6decda074afc4d8f8ba44c69b08d0e9aff6 - btf, scripts: rust: drop is_rust_module.sh</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#41bdc6decda074afc4d8f8ba44c69b08d0e9aff6</link>
        <description>btf, scripts: rust: drop is_rust_module.shWith commit c1177979af9c (&quot;btf, scripts: Exclude Rust CUs with pahole&quot;)we are now able to use pahole directly to identify Rust compilationunits (CUs) and exclude them from generating BTF debugging information(when DEBUG_INFO_BTF is enabled).And if pahole doesn&apos;t support the --lang-exclude flag, we can&apos;t enableboth RUST and DEBUG_INFO_BTF at the same time.So, in any case, the script is_rust_module.sh is just redundant and wecan drop it.NOTE: we may also be able to drop the &quot;Rust loadable module&quot; markinside Rust modules, but it seems safer to keep it for now to make surewe are not breaking any external tool that may potentially rely on it.Signed-off-by: Andrea Righi &lt;andrea.righi@canonical.com&gt;Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Tested-by: Eric Curtin &lt;ecurtin@redhat.com&gt;Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;Reviewed-by: Neal Gompa &lt;neal@gompa.dev&gt;Reviewed-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Martin Rodriguez Reboredo &lt;yakoyoku@gmail.com&gt;Acked-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;Link: https://lore.kernel.org/r/20230704052136.155445-1-andrea.righi@canonical.com[ Picked the `Reviewed-by`s from the old patch too. ]Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Tue, 04 Jul 2023 07:21:36 +0200</pubDate>
        <dc:creator>Andrea Righi &lt;andrea.righi@canonical.com&gt;</dc:creator>
    </item>
<item>
        <title>25a21fbb934a0d989e1858f83c2ddf4cfb2ebe30 - kbuild: Disable GCOV for *.mod.o</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#25a21fbb934a0d989e1858f83c2ddf4cfb2ebe30</link>
        <description>kbuild: Disable GCOV for *.mod.oWith GCOV_PROFILE_ALL, Clang injects __llvm_gcov_* functions to eachobject file, including the *.mod.o. As we filter out CC_FLAGS_CFIfor *.mod.o, the compiler won&apos;t generate type hashes for theinjected functions, and therefore indirectly calling them duringmodule loading trips indirect call checking.Enabling CFI for *.mod.o isn&apos;t sufficient to fix this issue aftercommit 0c3e806ec0f9 (&quot;x86/cfi: Add boot time hash randomization&quot;),as *.mod.o aren&apos;t processed by objtool, which means any hashesemitted there won&apos;t be randomized. Therefore, in addition todisabling CFI for *.mod.o, also disable GCOV, as the object filesdon&apos;t otherwise contain any executable code.Fixes: cf68fffb66d6 (&quot;add support for Clang CFI&quot;)Reported-by: Joe Fradley &lt;joefradley@google.com&gt;Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Fri, 23 Jun 2023 02:11:43 +0200</pubDate>
        <dc:creator>Sami Tolvanen &lt;samitolvanen@google.com&gt;</dc:creator>
    </item>
<item>
        <title>92215e7a801da7b89037a185c98f5ebb86a415b9 - kbuild: rename cmd_$@ to savedcmd_$@ in *.cmd files</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#92215e7a801da7b89037a185c98f5ebb86a415b9</link>
        <description>kbuild: rename cmd_$@ to savedcmd_$@ in *.cmd filesThe cmd-check macro compares $(cmd_$@) and $(cmd_$1), but a pitfall isthat you cannot use cmd_&lt;target&gt; as the variable name for the command.For example, the following code will not work in the top Makefileor ./Kbuild.    quiet_cmd_foo = GEN     $@          cmd_foo = touch $@    targets += foo    foo: FORCE            $(call if_changed,foo)In this case, both $@ and $1 are expanded to &apos;foo&apos;, so $(cmd_check)is always empty.We do not need to use the same prefix for cmd_$@ and cmd_$1.Rename the former to savedcmd_$@.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Thu, 29 Dec 2022 10:15:00 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>f65a486821cfd363833079b2a7b0769250ee21c9 - kbuild: change module.order to list *.o instead of *.ko</title>
        <link>http://kernelsources.org:8080/source/history/linux/scripts/Makefile.modfinal#f65a486821cfd363833079b2a7b0769250ee21c9</link>
        <description>kbuild: change module.order to list *.o instead of *.koscripts/Makefile.build replaces the suffix .o with .ko, thenscripts/Makefile.modpost calls the sed command to change .ko backto the original .o suffix.Instead of converting the suffixes back-and-forth, store the .o pathsin modules.order, and replace it with .ko in &apos;make modules_install&apos;.This avoids the unneeded sed command.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;

            List of files:
            /linux/scripts/Makefile.modfinal</description>
        <pubDate>Sun, 11 Dec 2022 14:04:07 +0100</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
