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

John Baldwin jhb at freebsd.org
Tue Mar 7 21:51:08 UTC 2006


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


More information about the freebsd-current mailing list