From owner-cvs-all@FreeBSD.ORG Tue Mar 14 16:13:56 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DBC416A424; Tue, 14 Mar 2006 16:13:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ACF943D48; Tue, 14 Mar 2006 16:13:56 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2EGDujK062206; Tue, 14 Mar 2006 16:13:56 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2EGDuj8062205; Tue, 14 Mar 2006 16:13:56 GMT (envelope-from jhb) Message-Id: <200603141613.k2EGDuj8062205@repoman.freebsd.org> From: John Baldwin Date: Tue, 14 Mar 2006 16:13:55 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 machdep.c src/sys/i386/i386 machdep.c src/sys/pc98/pc98 machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2006 16:13:56 -0000 jhb 2006-03-14 16:13:55 UTC FreeBSD src repository Modified files: sys/amd64/amd64 machdep.c sys/i386/i386 machdep.c sys/pc98/pc98 machdep.c Log: Don't allow userland to set hardware watch points on kernel memory at all. Previously, we tried to allow this only for root. However, we were calling suser() on the *target* process rather than the current process. This means that if you can ptrace() a process running as root you can set a hardware watch point in the kernel. In practice I think you probably have to be root in order to pass the p_candebug() checks in ptrace() to attach to a process running as root anyway. Rather than fix the suser(), I just axed the entire idea, as I can't think of any good reason _at all_ for userland to set hardware watch points for KVM. MFC after: 3 days Also thinks hardware watch points on KVM from userland are bad: bde, rwatson Revision Changes Path 1.648 +20 -23 src/sys/amd64/amd64/machdep.c 1.624 +20 -23 src/sys/i386/i386/machdep.c 1.372 +20 -23 src/sys/pc98/pc98/machdep.c