Messages in this thread | | | Subject | Re: [PATCH 1/1] x86: fix text_poke | From | (Frank Ch. Eigler) | Date | Fri, 25 Apr 2008 22:12:33 -0400 |
| |
Linus Torvalds <torvalds@linux-foundation.org> writes:
> [...] >> The point is to provide a way to dynamically enable code at runtime >> without noticeable performance impact on the system. > > Quite frankly, maybe I'm a bit dense, but why don't you just recompile the > whole original function (at run-time), load that new version of a function > as a mini-module, and then insert a marker at the top of the old function > that just does a "jmp replacementfunction". [...]
You mentioned possible solutions to some of the problems this ambitious an approach would cause. Here are a few more complications:
- instrumenting inlined functions
- proper sharing of static function data amongst multiple live copies of same function
- unknown implications of violating long-standing assumptions about functions not changing addresses
- interaction with other code modification machinery (kprobes, ...)
- necessity to carry kernel sources & compilers on machines; slow marker activation
- FChE
| |