lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW4g=9Endyxz5gOHWK2M8+CCP4C7_bobPtansMKdm2vn_w@mail.gmail.com>
Date: Mon, 26 Jan 2026 16:36:27 -0800
From: Song Liu <song@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, 
	live-patching@...r.kernel.org, Breno Leitao <leitao@...ian.org>, 
	Puranjay Mohan <puranjay@...nel.org>, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] livepatch/klp-build: Fix klp-build vs CONFIG_MODULE_SRCVERSION_ALL

On Mon, Jan 26, 2026 at 3:56 PM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> When building a patch to a single-file kernel module with
> CONFIG_MODULE_SRCVERSION_ALL enabled, the klp-build module link fails in
> modpost:
>
>   Diffing objects
>   drivers/md/raid0.o: changed function: raid0_run
>   Building patch module: livepatch-0001-patch-raid0_run.ko
>   drivers/md/raid0.c: No such file or directory
>   ...
>
> The problem here is that klp-build copied drivers/md/.raid0.o.cmd to the
> module build directory, but it didn't also copy over the input source
> file listed in the .cmd file:
>
>   source_drivers/md/raid0.o := drivers/md/raid0.c
>
> So modpost dies due to the missing .c file which is needed for
> calculating checksums for CONFIG_MODULE_SRCVERSION_ALL.
>
> Instead of copying the original .cmd file, just create an empty one.
> Modpost only requires that it exists.  The original object's build
> dependencies are irrelevant for the frankenobjects used by klp-build.
>
> Fixes: 24ebfcd65a87 ("livepatch/klp-build: Introduce klp-build script for generating livepatch modules")
> Reported-by: Song Liu <song@...nel.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>

Tested-by: Song Liu <song@...nel.org>

Thanks for the fix!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ