On Fri, Aug 14, 2026 at 02:05:48PM -0700, Dylan Hatch wrote: > Following up on the other thread [1], I noticed that when a patch is > touching a module function with a reference to one of these > module-exported symbols, the patch/module is rejected because KLP > relocs referencing vmlinux symbols are not allowed from > module-specific livepatch relocation sections. I was able to reproduce > this with a simple module/livepatch combo that depends on one of these > symbols [2] (see samples/livepatch/testmod.c and test.patch): > > root@debian-vm:~$ insmod livepatch-test.ko > root@debian-vm:~$ insmod testmod.ko > insmod: ERROR: could not insert module testmod.ko: Invalid parameters > > With dmesg: > [ 655.596876] livepatch_test: loading out-of-tree module taints kernel. > [ 655.600961] livepatch_test: tainting kernel with TAINT_LIVEPATCH > [ 655.605436] livepatch: enabling patch 'livepatch_test' > [ 655.609119] livepatch: 'livepatch_test': starting patching transition > [ 656.653454] livepatch: 'livepatch_test': patching complete > [ 738.777872] livepatch: invalid access to vmlinux symbol > 'get_task_policy' from module-specific livepatch relocation section > [ 738.784899] livepatch: failed to initialize patch 'livepatch_test' > for module 'testmod' (-22) > [ 738.790371] livepatch: patch 'livepatch_test' failed for module > 'testmod', refusing to load module 'testmod' > > Do you recommend a strategy for working around this, or is this > something that would have to be fixed in the kernel?
Ah, this is another tooling issue, let me work up a patch. -- Josh

