Date: 06 Oct 2001 15:31:52 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: Bruce Evans <bde@zeta.org.au> Cc: Peter Wemm <peter@wemm.org>, <arch@FreeBSD.ORG> Subject: Re: Removing ptrace(2)'s dependency on procfs(5) Message-ID: <xzpvghsrj1z.fsf@flood.ping.uio.no> In-Reply-To: <20011006221156.X824-100000@delplex.bde.org> References: <20011006221156.X824-100000@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpvghsrj1z.fsf>