Comments (5)
Well, the .meminfo.o.cmd file is not the cause.
After updated gcc from gcc-4.8.2-1.fc20.x86_64 to gcc-4.8.2-7.fc20.x86_64, I could got the right address of meminfo_proc_show.
(I installed the minimized environment, so the affected packages are: gcc, libgcc, libgomp, cpp.)
And I tried to downgrade it, then the wrong address came back.
So that, this fact could tell us:
either different compilers could generate different address of meminfo_proc_show, because some compiling optimization improvement.
or there is a bug on gcc-4.8.2-1.fc20.x86_64.
I prefer to the former conclusion. (why? I don't know, just guess.)
One question could be asked: should we build the vmlinux using the same version of gcc by which the running kernel builds?
from kpatch.
should we build the vmlinux using the same version of gcc by which the running kernel builds?
Yes, I think we should.
from kpatch.
I think we could check /proc/version and gcc -v to decide whether building kpatch-xxx.ko for running kernel in kpatch-build.
The second choice is checking the changed function address against running kernel, if consistent, then building kpatch-xxx.ko.
from kpatch.
Another option would be to compare the System.map of our unpatched kernel with the System.map or kallsyms of the running kernel to ensure all the addresses match up.
But the only problem is that we have the --sourcedir option which allows the user to build patch modules against other kernels. In that case I guess we would need to add another cmdline option to find the System.map to compare against.
We are planning on adding some additional runtime checks to ensure that the kernel matches our expectations at module loading time. So adding them at build time might not be necessary.
from kpatch.
I think this is no longer an issue, since #209 added the verification of the addresses of all patched functions and non-exported relocations when loading the module.
from kpatch.
Related Issues (20)
- kpatch-build error with 5.19 kernel HOT 27
- rhel-7.9/syscall.patch fails to build on 3.10.0-1160.71.1.el7.ppc64le HOT 1
- kpatch-build: .rela.return_sites not selected for inclusion on 5.18.12-rc1+ kernels HOT 2
- kpatch-cc build error when source tree prefix matches substring in changed object file
- kpatch module build could fail when kernel 5.19+ contains dynamic symbols HOT 21
- kpatch_version: Unknown symbol kpatch_unregister HOT 8
- '-'/'_' mismatch for OOT modules HOT 2
- kpatch load can't find core module HOT 8
- Fix possible buffer overflow in ESP transformation error System.map error HOT 3
- integration tests: CONFIG_MODVERSIONS and linux-5.18.0/symvers-disagreement-FAIL.patch HOT 8
- After the kpatch install "xxx. ko" on openeuler, the machine was restarted. The kpatch service failed, resulting in the kernel patch restart not taking effect
- What do I need to do to support riscv64? HOT 11
- ERROR: testmod_drv.o: .return_sites section header details differ from .return_sites HOT 20
- Need suggestions for CONFIG_LTO_CLANG support HOT 40
- New error building patch for 6.2-rc2? HOT 12
- kpatch-build errors for kernel v6.1.4 HOT 4
- ubsan for kpatch HOT 2
- find_local_syms for <modified-file>: found_none HOT 2
- 6.3 failure with setlocalversion HOT 5
- Outstanding clang issues for 6.2 HOT 3
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.