Re: [PATCH 1/1] x86: fix text_poke

From: Frank Ch. Eigler
Date: Fri Apr 25 2008 - 22:19:06 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/