From owner-freebsd-current@FreeBSD.ORG Tue Mar 7 21:51:08 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5764D16A420; Tue, 7 Mar 2006 21:51:08 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B0B243D53; Tue, 7 Mar 2006 21:51:05 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k27Lp44t030106; Tue, 7 Mar 2006 16:51:04 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: current@freebsd.org Date: Tue, 7 Mar 2006 16:51:02 -0500 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603071651.04643.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1317/Tue Mar 7 01:06:47 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED,AWL autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Robert Watson Subject: [PATCH] Axe ability to set watchpoints in KVA from userland X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 21:51:08 -0000 Any objections to the patch at http://www.FreeBSD.org/~jhb/patches/set_dbregs.patch ? First, the suser() call in the existing code is bogus as it should be using curthread (who's doing the work) rather than td (who's watchpoint is being set). (Side note: we aren't doing anything to keep the debug registers in a multithreaded process in sync, so watch points for multithreaded apps in gdb is probably busted right now.) Secondly, why on earth would it really be a good idea for a userland process to set a hardware watch point in KVA even if they are root? Shouldn't this be the job of a kernel debugger interfacing to KDB (such as remote gdb)? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org