lkml.org 
[lkml]   [2012]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn()
    * Ingo Molnar <mingo@kernel.org> [2012-06-06 11:40:15]:

    >
    > * Ananth N Mavinakayanahalli <ananth@in.ibm.com> wrote:
    >
    > > On Wed, Jun 06, 2012 at 11:23:52AM +0200, Peter Zijlstra wrote:
    > > > On Wed, 2012-06-06 at 14:49 +0530, Ananth N Mavinakayanahalli wrote:
    > > > > +int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, loff_t vaddr)
    > > >
    > > > Don't we traditionally use unsigned long to pass vaddrs?
    > >
    > > Right. But the vaddr we pass here is vma_info->vaddr which is loff_t.
    > > I guess I should've made that clear in the patch description.
    >
    > Why not fix struct vma_info's vaddr type?
    >

    Calculating and comparing vaddr results either uses variables of type loff_t.
    To avoid typecasting and avoid overflow at each of these places, we used
    loff_t.

    Ananth, install_breakpoint() already has a variable of type addr of type
    unsigned long. Why dont you use addr instead of vaddr.

    --
    Thanks and regards
    Srikar



    \
     
     \ /
      Last update: 2012-06-06 14:21    [W:0.029 / U:0.568 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site