lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH v4 3.0-rc2-tip 8/22] 8: x86: architecture specific task information.

    On X86_64, we need to support rip relative instructions.
    Rip relative instructions are handled by saving the scratch register
    on probe hit and then retrieving the previously saved scratch register
    after single-step. This value stored at probe hit is specific to each
    task. Hence this is implemented as part of uprobe_task_arch_info.

    Since x86_32 has no support for rip relative instructions, we dont need to
    bother for x86_32.

    Signed-off-by: Jim Keniston <jkenisto@linux.vnet.ibm.com>
    Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    ---
    arch/x86/include/asm/uprobes.h | 5 +++++
    1 files changed, 5 insertions(+), 0 deletions(-)

    diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h
    index 4295ce0..2f3c64d 100644
    --- a/arch/x86/include/asm/uprobes.h
    +++ b/arch/x86/include/asm/uprobes.h
    @@ -34,8 +34,13 @@ typedef u8 uprobe_opcode_t;
    struct uprobe_arch_info {
    unsigned long rip_rela_target_address;
    };
    +
    +struct uprobe_task_arch_info {
    + unsigned long saved_scratch_register;
    +};
    #else
    struct uprobe_arch_info {};
    +struct uprobe_task_arch_info {};
    #endif
    struct uprobe;
    extern int analyze_insn(struct task_struct *tsk, struct uprobe *uprobe);

    \
     
     \ /
      Last update: 2011-06-07 15:09    [W:4.085 / U:1.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site