lkml.org 
[lkml]   [2011]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 3.2-rc2 9/30] uprobes: Background page replacement.
* Peter Zijlstra <peterz@infradead.org> [2011-11-28 15:13:29]:

> On Fri, 2011-11-18 at 16:38 +0530, Srikar Dronamraju wrote:
> > +/**
> > + * is_bkpt_insn - check if instruction is breakpoint instruction.
> > + * @insn: instruction to be checked.
> > + * Default implementation of is_bkpt_insn
> > + * Returns true if @insn is a breakpoint instruction.
> > + */
> > +bool __weak is_bkpt_insn(u8 *insn)
> > +{
> > + return (insn[0] == UPROBES_BKPT_INSN);
> > }
>
> This seems wrong, UPROBES_BKPT_INSN basically defined to be of
> uprobe_opcode_t type, not u8.
>
> So:
>
> bool __weak is_bkpt_insn(uprobe_opcode_t *insn)
> {
> return *insn == UPROBE_BKPT_INSN;
> }
>
> seems like the right way to write this.
>

Agree, will fix this.
Thanks for bringing this up.

--
Thanks and Regards
Srikar



\
 
 \ /
  Last update: 2011-11-29 08:53    [W:0.113 / U:1.500 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site