Hi all, At Miroslav's request I am providing code I currently have to supplement the discussion about offloading reloc work to the module loader (see other thread). This patchset is currently functional but NOT complete nor mergeable. It requires changes to kpatch's kpatch-build system [1] to fully work. I'm providing this patchset only to springboard further discussion. It works on x86 and it works with vmlinux patches as well as module patches, *but* only if the modules are already loaded. As I mentioned before, it not compatible with the current klp_module_notify() design. In this patchset a patch module currently fails if the to-be-patched module is not loaded. This patchset is a prototype and hopefully demonstrates how we might be able to offload symbol resolution and relocation work to the module loader, as well as remove the need for arch-specific code (klp_write_module_reloc()) plus remove the relocation code in livepatch's core.c I attempted to keep changes to module.c to a minimum, though I know creeping into other subsystems is not at all ideal. As Josh nicely summarized in the other thread, the main benefits are: - removal of livepatch relocation code (which duplicates existing kernel module reloc code) - no more dynrelas on kpatch's side - livepatch becomes more arch-independent + support for s390x made way easier - potential removal of complex klp module notifier code (controversial) - kbuild based livepatch modules achieve functional parity with kpatch-build ones [1] https://github.com/flaming-toast/kpatch/tree/no_dynrela Jessica Yu (2): Working klp resolve sym functions Remove relocation code arch/x86/kernel/Makefile | 1 - arch/x86/kernel/livepatch.c | 90 ------------------------- kernel/livepatch/core.c | 155 ++++++++++++++++++++++++-------------------- kernel/module.c | 43 +++++++++++- 4 files changed, 123 insertions(+), 166 deletions(-) delete mode 100644 arch/x86/kernel/livepatch.c -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe live-patching" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html