Comments (8)
Module.symvers for kpatch.ko is needed for building the patch rather than for loading it.
So could you try to build the binary patch again, after you have copied /root/kpatch/kmod/core/Module.symvers to /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/?
Will kpatch-build complain now about Module.symvers?
Besides, please show the output of /sbin/modinfo /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/kpatch.ko
, let us see the kernel kpatch.ko was built for.
from kpatch.
By the way, which version of kpatch sources are you using to build kpatch.ko and the kpatch build tools? The latest revision from this git repo? Or some of the released versions?
from kpatch.
The problem is solved in the following way
mkdir -p /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/
ln -s /usr/src/kernel/4.19.113-300.el7.x86_64/Module.symvers /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/
why Directory /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/ will not be created automatically,need to be created manually?
Under normal conditions , need to exist
/usr/local/lib/kpatch/4.19.113-300.el7.x86_64/Module.symvers and /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/kpatch.ko
from kpatch.
It is really strange. Module.symvers is only used for building, it does not affect loading of the patch.
And, /usr/src/kernel/4.19.113-300.el7.x86_64/Module.symvers is the symvers file for the kernel, not for kpatch.ko. It is unrelated.
from kpatch.
Also, please see my comment #1285 (comment), it might help build patches in a more reliable way.
from kpatch.
Module.symvers is only used for building ,building error: not find Module.symvers;
loading of the patch error reson : not insert mod kpatch.ko ;insmod /root/kpatch/kmod/core/kpatch.ko is ok
The cause of the problem has been solved, thank you !
from kpatch.
why Directory /usr/local/lib/kpatch/4.19.113-300.el7.x86_64/ will not be created automatically,need to be created manually?
This should not be necessary. The patch module you have built, kpatch-meminfo-string.ko either requires kpatch.ko or does not. modinfo path/to/kpatch-meminfo-string.ko
should tell that.
-
If kpatch-meminfo-string.ko does not actually need kpatch.ko, then kpatch-build should not try to load kpatch.ko. If it does, it looks like a bug.
-
If kpatch-meminfo-string.ko depends on kpatch.ko,
kpatch load
would try to find kpatch.ko in specific locations, seefind_core_module
in kpatch script:
find_core_module() {
COREMOD="$SCRIPTDIR"/../kmod/core/kpatch.ko
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/local/lib/kpatch/$(uname -r)/kpatch.ko"
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/lib/kpatch/$(uname -r)/kpatch.ko"
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/local/lib/modules/$(uname -r)/extra/kpatch/kpatch.ko"
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/lib/modules/$(uname -r)/extra/kpatch/kpatch.ko"
[[ -f "$COREMOD" ]] && return
return 1
}
You can place kpatch.ko in any of these locations. If the chosen directories do not exist, then yes, it is up to you to create them.
from kpatch.
insmod /root/kpatch/kmod/core/kpatch.ko is ok
Ah, yes, if you have kpatch.ko in a non-standard location, then yes, loading it manually should help.
Glad it works for you now.
from kpatch.
Related Issues (20)
- Do we need more robust archeticture protection HOT 4
- kpatch-build: verify_patch_files might miss a parameter HOT 2
- ERROR in find_local_syms, couldn't find matching XXX local symbols in vmlinux symbol table HOT 14
- Can you add support for Rocky and Alma? HOT 1
- relocation with type R_X86_64_GOTPCREL is not supported HOT 5
- Arch Compile kpatch-git test failed HOT 4
- Regarding "statically allocated data" again HOT 2
- kpatch-build error when modifying an object file's only syscall
- nowhere to find the definition of klp_register_patch HOT 5
- x86 paravirt code uses alternatives v6.8+ HOT 1
- special-static.patch can fail to build on s390x / upstream v6.8 HOT 6
- CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY not supported on ppc64le HOT 6
- function __pfx_new_sync_read has no fentry/mcount call, unable to patch HOT 6
- Unchanged and unpatchable function moves from .text to .text.unlikely HOT 5
- Why did the kpatch-build script export the KPATCH-BUILD environment variable from the BUILD directory to the SOURCE directory? HOT 3
- CONFIG_WERROR=y and CONFIG_LD_ORPHAN_WARN_LEVEL="error" break kpatch-build HOT 2
- linux 6.9.0-rc6 can't find special struct paravirt_patch_site size HOT 6
- fair.o: changed section .data..read_mostly not selected for inclusion HOT 9
- find_local_syms: 218: couldn't find matching cm.c local symbols in ib_mad symbol table HOT 5
- Kernel Warning: Unpatched return thunk in use. This should not happen! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kpatch.