[Devel] [PATCH hci-8.1 10/14] ms/objtool/klp: Fix module name normalization for paths with dots

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:40:09 MSK 2026


> From: Josh Poimboeuf <jpoimboe at kernel.org>
> 
> When .modinfo has no "name=" tag, __find_modname() falls back to
> converting the object's build-tree path to a runtime module name by
> stripping directory components, converting '-' to '_' and truncating the
> file extension.
> 
> It does all that in a single pass over the entire path, so the first dot
> anywhere in the path ends the name.  For an object built in a directory
> whose name contains a dot, e.g. "drivers/foo-1.0/bar.o", the result is a
> bogus module name.
> 
> Strip the directory components up front so only the basename is scanned
> for the extension separator.
> 
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Reported-by: Sashiko <sashiko-bot at kernel.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe at kernel.org>
> Signed-off-by: Ingo Molnar <mingo at kernel.org>
> Cc: live-patching at vger.kernel.org
> Link: https://patch.msgid.link/9017b4609553bed16674e8f924d34691cbc2b2c1.1785727106.git.jpoimboe@kernel.org
> (cherry picked from commit 165affd6f095323d953b0ed5823ec4d0db3b7d0d)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157133
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157133-klp-and-kvm-fixes-v1-0-0ec8eaadf1bc@virtuozzo.com?part=10




More information about the Devel mailing list