Re: [PATCH v4 2/5] selftests/livepatch: Test rejection of aliased symbols in one object

From: Miroslav Benes

Date: Fri Sep 18 2026 - 10:01:46 EST


On Tue, 08 Sep 2026 14:03:22 +0200, Petr Mladek <pmladek@xxxxxxxx> wrote:
> klp_init_object_loaded() now rejects an object whose klp_funcs resolve to
> the same address, because aliased symbols would push two klp_funcs of one
> livepatch onto a single ops->func_stack and leave the redirection
> ambiguous.
>
> Add a target module providing test_klp_alias_show() together with its
> __alias() sibling, and a livepatch naming both of them. Two test cases
> cover both callers of klp_init_object_loaded(): the klp_enable_patch()
> path, where the target module is loaded before the livepatch, and the
> klp_module_coming() path, where the livepatch is loaded first and the
> module loader has to refuse the target module.
>
> [...]

Acked-by: Miroslav Benes <mbenes@xxxxxxx>

--
Miroslav