Comments (4)
Amazing analyse, so the root problem is the code generation of the macro __FILE__
and __LINE__
.
from kpatch.
For now I think it's ok if we just document this behavior. It is kind of annoying, but technically, it's working as expected. If the WARN call's line number changes, then it makes sense that the value of __LINE__
will be different and the function will be replaced to use the new value of __LINE__
in the WARN call.
The worst case is that we end up patching some functions that haven't really changed. If that turns out to be a problem for the user, we might be able to fix this in a different way. For example, they could modify the patch to redefine the WARN macro for the affected files, such that it hard codes the old line number instead of using __LINE__
, so that the affected function is recompiled to be identical.
from kpatch.
@jpoimboe sounds like a reasonable (and the only) solution for now. Detecting line number changes when they are encoded in mov instructions... not sure how we could detect that and therefore determine equivalence at the object level.
from kpatch.
Since we have no plans to fix this, I'll just document it in the README as expected behavior.
A future fix might involve changing the WARN macro upstream so that it works kind of like the BUG macro, with its own warn_table.
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.