lkml.org 
[lkml]   [2013]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/8] x86: speed up int3-based patching using less paranoid write
On Fri, 08 Nov 2013 21:04:26 +0900
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:

> (2013/11/08 18:12), Petr Mladek wrote:
> > This change is inspired by the int3-based patching code used in
> > ftrace. See the commit fd4363fff3d9 (x86: Introduce int3
> > (breakpoint)-based instruction patching).
> >
> > When trying to use text_poke_bp in ftrace, the result was slower than
> > the original implementation.
> >
> > It turned out that one difference was in text_poke vs. ftrace_write.
> > text_poke did many extra operations to make sure that the change
> > was atomic.
>
> AFAIK, the main reason why text_poke is used is avoiding
> RODATA protection (by alias mapping).

That is correct, and the reason ftrace didn't do that is because it
would be quite expensive to map 22,000 addresses for each change.

-- Steve


\
 
 \ /
  Last update: 2013-11-08 14:01    [W:0.049 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site