From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753808Ab1K1OOM (ORCPT ); Mon, 28 Nov 2011 09:14:12 -0500 Received: from casper.infradead.org ([85.118.1.10]:54905 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522Ab1K1OOL convert rfc822-to-8bit (ORCPT ); Mon, 28 Nov 2011 09:14:11 -0500 Message-ID: <1322489609.2921.132.camel@twins> Subject: Re: [PATCH v7 3.2-rc2 9/30] uprobes: Background page replacement. From: Peter Zijlstra To: Srikar Dronamraju Cc: Linus Torvalds , Oleg Nesterov , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Wilson Date: Mon, 28 Nov 2011 15:13:29 +0100 In-Reply-To: <20111118110823.10512.74338.sendpatchset@srdronam.in.ibm.com> References: <20111118110631.10512.73274.sendpatchset@srdronam.in.ibm.com> <20111118110823.10512.74338.sendpatchset@srdronam.in.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.2.1- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.