lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3.1.0-rc4-tip 5/26] Uprobes: copy of the original instruction.
On 10/05, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@redhat.com> [2011-10-03 18:29:05]:
>
> > But I am starting to think I simply do not understand this change.
> > To the point, I do not underestand why do we need copy_insn() at all.
> > We are going to replace this page, can't we save/analyze ->insn later
> > when we copy the content of the old page? Most probably I missed
> > something simple...
> >
>
> Copying the instruction at the time we replace the original instruction
> would have been ideal. However there are a few irritants to handle.
>
> ...
> How do we distinguish if the
> breakpoint instruction was around in the text or somebody inserted a
> breakpoint in that address-space? Since we read from the page-cache,
> we can easily resolve this.

Ah. I see.

> - On archs like x86, with variable size instructions, the original
> instruction can be across 2 pages.

Heh. Indeed ;)

Thanks Srikar.

Oleg.



\
 
 \ /
  Last update: 2011-10-05 20:01    [W:0.123 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site