mirror of
https://github.com/dynup/kpatch
synced 2024-12-25 14:52:05 +00:00
0ebbed244e
The -fdata-sections gcc flag doesn't work with objects in the .data..percpu section. Any function which uses a percpu variable references this section, causing the section to get incorrectly included in the patch module. Manually convert these section references to object symbol references so that the needed symbol can be found in vmlinux. Also, the core module symbol verification code will fail when looking up a percpu variable, because sprint_symbol doesn't think a percpu address is a valid kernel address. So rewrite the symbol verification code to use kallsyms_on_each_symbol() instead. It's not ideal performance-wise: it seems to cost about 1ms per symbol lookup. I think that's acceptable for now. In the future we may want to try to get a better upstream kallsyms interface. |
||
---|---|---|
.. | ||
core | ||
patch | ||
Makefile |