[PATCH] Axe ability to set watchpoints in KVA from userland

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 7 Mar 2006 16:51:02 -0500
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 <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Tue Mar 07 2006 - 20:51:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:53 UTC