lkml.org 
[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2.6.38-rc8-tip 6/20] 6: x86: analyze instruction and determine fixups.
> 
> > + ret = handle_riprel_insn(uprobe, &insn);
> > + if (ret == -1)
> > + /* rip-relative; can't XOL */
> > + return 0;
>
> So we return -1 from handle_riprel_insn() and return success?


handle_riprel_insn() returns 0 if the instruction is not rip-relative
returns 1 if its rip-relative but can use XOL slots.
returns -1 if its rip-relative but cannot use XOL.

We dont see any instructions that are rip-relative and cannot use XOL.
so the check and return are redundant and I will remove that in the next
patch.


Btw how
> deals handle_riprel_insn() with 32bit user space ?
>

handle_riprel_insn() calls insn_rip_relative() which fails if
instruction isnot rip-relative and handle_riprel_insn returns
immediately.

The rest of your suggestions for this patch are taken.

> > +#endif
> > + prepare_fixups(uprobe, &insn);
> > + return 0;
>

--
Thanks and Regards
Srikar


\
 
 \ /
  Last update: 2011-03-18 19:33    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site