Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpatch-build does not process the calls to module_free() correctly #509

Closed
euspectre opened this issue Oct 16, 2015 · 2 comments
Closed

Comments

@euspectre
Copy link
Contributor

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

@jpoimboe
Copy link
Member

@euspectre Can you check if the patch in #508 fixes the issue?

@euspectre
Copy link
Contributor Author

Yes, the patch fixed the issue for me. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants