From owner-freebsd-arch Sat Oct 6 6:32:11 2001 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id DB05637B407 for ; Sat, 6 Oct 2001 06:32:07 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id PAA64794; Sat, 6 Oct 2001 15:31:53 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Peter Wemm , Subject: Re: Removing ptrace(2)'s dependency on procfs(5) References: <20011006221156.X824-100000@delplex.bde.org> From: Dag-Erling Smorgrav Date: 06 Oct 2001 15:31:52 +0200 In-Reply-To: <20011006221156.X824-100000@delplex.bde.org> Message-ID: Lines: 32 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans writes: > I noticed the following bugs: > - PHOLD()/PRELE() is now missing from the register access functions of > ptrace(). This makes the bogus EIO error in PROCFS_ACTION() much less > unlikely. Aieee, thanks for catching that before I committed! BTW, I'm intrigued by the following bit of code in kern_sig.c: do { mtx_lock_spin(&sched_lock); stop(p); PROC_UNLOCK_NOSWITCH(p); DROP_GIANT_NOSWITCH(); p->p_stats->p_ru.ru_nivcsw++; mi_switch(); mtx_unlock_spin(&sched_lock); PICKUP_GIANT(); PROC_LOCK(p); } while (!trace_req(p) && p->p_flag & P_TRACED); It's the only reference to trace_req() (defined in sys_process.c) in the entire tree, and trace_req() has been a constant since revision 1.1 of sys_process.c, and true since revision 1.4 (1994/08/08), so this loop will always execute exactly once. Is there a good reason not to simply axe trace_req() and unroll the loop? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message