arm64/module: Use text-poke API for late relocations.
authorDylan Hatch <dylanbhatch@google.com>
Tue, 3 Jun 2025 22:34:17 +0000 (22:34 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 20 Jun 2025 12:09:16 +0000 (13:09 +0100)
commit91b89a634487d5614e51ee773a889ed57f5551ca
treec38133e658d46325c8366e0bdd8b9a620d9593a7
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
arm64/module: Use text-poke API for late relocations.

To enable late module patching, livepatch modules need to be able to
apply some of their relocations well after being loaded. In this
scenario however, the livepatch module text and data is already RX-only,
so special treatment is needed to make the late relocations possible. To
do this, use the text-poking API for these late relocations.

This patch is partially based off commit 88fc078a7a8f6 ("x86/module: Use
text_poke() for late relocations").

Signed-off-by: Dylan Hatch <dylanbhatch@google.com>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250603223417.3700218-1-dylanbhatch@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/module.c