You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The patch module was prepared without visible errors. But when I tried to load it, the system complained: "Unknown symbol in module". dmesg showed:
[ 622.986678] kpatch_patch: Unknown symbol module_free (err 0)
Looks like, create-diff-object kept the relocation for that call to module_free(). module_free() is not exported to the modules, so, if I understand it correctly, create-diff-object should have created a dynrela for it and omit the original relocation. This is what it does for module_alloc() called from the same function, for example.
The only thing I can see special about module_free() is that it is a "__weak" symbol (and is not redefined on x86).
I stumbled upon this when processing this patch:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3f7352bf21f8fd7ba3e2fcef9488756f188e12be.
The patch module was prepared without visible errors. But when I tried to load it, the system complained: "Unknown symbol in module". dmesg showed:
[ 622.986678] kpatch_patch: Unknown symbol module_free (err 0)
Looks like, create-diff-object kept the relocation for that call to module_free(). module_free() is not exported to the modules, so, if I understand it correctly, create-diff-object should have created a dynrela for it and omit the original relocation. This is what it does for module_alloc() called from the same function, for example.
The only thing I can see special about module_free() is that it is a "__weak" symbol (and is not redefined on x86).
More details (BTW, thanks to Jessica Yu for making it clearer):
https://www.redhat.com/archives/kpatch/2015-October/msg00012.html
The text was updated successfully, but these errors were encountered: