On Mon, Feb 2, 2026 at 11:00 AM Josh Poimboeuf <[email protected]> wrote:
>
> Enabling CONFIG_MEM_ALLOC_PROFILING_DEBUG with CONFIG_SAMPLE_LIVEPATCH
> results in the following error:
>
>   samples/livepatch/livepatch-shadow-fix1.o: error: objtool: static_call: 
> can't find static_call_key symbol: __SCK__WARN_trap
>
> This is caused an extra file->klp sanity check which was added by commit
> 164c9201e1da ("objtool: Add base objtool support for livepatch
> modules").  That check was intended to ensure that livepatch modules
> built with klp-build always have full access to their static call keys.
>
> However, it failed to account for the fact that manually built livepatch
> modules (i.e., not built with klp-build) might need access to unexported
> static call keys, for which read-only access is typically allowed for
> modules.
>
> While the livepatch-shadow-fix1 module doesn't explicitly use any static
> calls, it does have a memory allocation, which can cause
> CONFIG_MEM_ALLOC_PROFILING_DEBUG to insert a WARN() call.  And WARN() is
> now an unexported static call as of commit 860238af7a33 ("x86_64/bug:
> Inline the UD1").
>
> Fix it by removing the overzealous file->klp check, restoring the
> original behavior for manually built livepatch modules.
>
> Fixes: 164c9201e1da ("objtool: Add base objtool support for livepatch 
> modules")
> Reported-by: Arnd Bergmann <[email protected]>
> Signed-off-by: Josh Poimboeuf <[email protected]>

Acked-by: Song Liu <[email protected]>

Reply via email to