Re: [PATCH v4 0/5] livepatch: Fail object initialization on duplicate patched function
From: Petr Mladek
Date: Fri Oct 23 2026 - 11:29:58 EST
On Tue 2026-09-08 14:03:20, Petr Mladek wrote:
> This is v4 of the patch failing object initialization when it patches
> the same underlying function twice through two aliased symbols
> (functions sharing one address) in the same object.
I wonder how to move forward with this patchset. There seems to be
three unresolved problems:
1. How to handle aliased functions when replacing two livepatches
with aliased symbols, aka two NOPs on the same stack [1].
My take: I would fix this later on top of scoped atomic replace.
The aliased symbols should conflict.
2. Fix the low-level __write_relocate_add() to clean its own
mess on failure.
My take: I would fix this a follow up patch.
3. Better describe the purpose of klp_write_object_relocs_limited().
Or clean its own mess a better way (code duplication)?
My take: This requires v5.
[1] https://lore.kernel.org/all/20260908121744.81D641F00A3A@xxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/all/20260908121810.9577A1F00A3A@xxxxxxxxxxxxxxx/
[3] https://lore.kernel.org/all/att3oHvCpVDjDt-h@xxxxxxxxxxxxxxx/
Best Regards,
Petr