[kpatch] how to kpatch a external module

cxt9401 at 163.com cxt9401 at 163.com
Thu Nov 8 10:22:01 UTC 2018


Hi,

I'm trying to kpatch to my own module, which is built as an out-of-tree module. I've test doit.sh in test/testmod in github. But the test script failed since it uses an very old synopsis format which only give 4 args to create-diff-object, which it requires 7 args.  I've borrowed some code from kpatch-build to fix the create-diff-object call and generate the final kpatch-patch.ko. But it failed to be loaded by kpatch.  dmesg shows:   "kpatch: can't set ftrace filter at address 0xffffffffa0423000". 
kpatch succeed when I included the testmod_drv.c in kernel tree and generate .ko through kpath-build.  But this method doesn't suit for my external module.
Can anyone fix the test/testmod sample  or  give me an guide on how to kpatch an External module ?

Vaughan




More information about the kpatch mailing list