lkml.org 
[lkml]   [2008]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] x86: fix text_poke
From
Date
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


\
 
 \ /
  Last update: 2008-04-26 04:21    [W:0.292 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site