• Prasanna S. Panchamukhi's avatar
    [PATCH] kprobes: Minor i386 changes required for porting kprobes to x86_64 · 3d6921be
    Prasanna S. Panchamukhi authored
    - Kprobes structure has been modified to support copying of original
      instruction as required by the architecture.  On x86_64 normal pages we
      get from kmalloc or vmalloc are not executable.  Single-stepping an
      instruction on such a page yields an oops.  So instead of storing the
      instruction copies in their respective kprobe objects, we allocate a
      page, map it executable, and store all the instruction copies there and
      store the pointer of the copied instruction in the specific kprobes
      object.
    
    - jprobe_return_end is moved into inline assembly to avoid compiler
      optimization.
    
    - arch_prepare_kprobe() now returns an integer,since
      arch_prepare_kprobe() might fail on other architectures.
    
    - added arch_remove_kprobe() routine, since other architectures requires
      it.
    Signed-off-by: default avatarPrasanna S Panchamukhi <prasanna@in.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    3d6921be
kprobes.c 9.77 KB