Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbZAVPm6 (ORCPT ); Thu, 22 Jan 2009 10:42:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752748AbZAVPmu (ORCPT ); Thu, 22 Jan 2009 10:42:50 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:43311 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752616AbZAVPmu (ORCPT ); Thu, 22 Jan 2009 10:42:50 -0500 Date: Thu, 22 Jan 2009 10:42:48 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "K.Prasad" cc: Linux Kernel Mailing List , Roland McGrath , , , , Subject: Re: [RFC Patch 0/9] Hardware Breakpoint interfaces - v4 In-Reply-To: <20090122135640.GA11161@in.ibm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1561 Lines: 36 On Thu, 22 Jan 2009, K.Prasad wrote: > Hi All, > Please find the new set of patches that introduce kernel > interfaces to use Hardware Breakpoint registers and an implementation > for x86 (and x86_64) architecture, now labelled as Version IV. > > The patches are based on 2.6.29-rc2 and have been tested to work fine on > x86 architecture. Some of the major changes over the previous version of > patches include: > i) A sample kernel module that uses Data Hardware breakpoint over a > kernel variable to monitor write operations. See > samples/hw_breakpoint/data_breakpoint.c. > ii) Changes in the register_kernel_hw_breakpoint() interface to accept > only one parameter - pointer to a 'hw_breakpoint' structure which will > contain all relevant data members. I see some problems with this immediately. Firstly, as a result of this change the sample code in include/asm-generic/hw_breakpoint.h is now incorrect. You need to change the comments when you change the code. Second, your arch_store_info() routine is broken. It checks for a kernel symbol name even if when a userspace breakpoint is being registered. You should move that check up into validate_settings(). As a related matter, why did you put the "name" field into the arch-dependent part? Clearly it should be arch-independent. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/