From owner-freebsd-arch Thu Oct 4 16:11:47 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 2947037B403 for ; Thu, 4 Oct 2001 16:11:43 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id BAA54399; Fri, 5 Oct 2001 01:11:39 +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: Peter Wemm Cc: arch@FreeBSD.ORG Subject: Re: Removing ptrace(2)'s dependency on procfs(5) References: <20011004230154.4A0D63809@overcee.netplex.com.au> From: Dag-Erling Smorgrav Date: 05 Oct 2001 01:11:38 +0200 In-Reply-To: <20011004230154.4A0D63809@overcee.netplex.com.au> Message-ID: Lines: 33 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 Peter Wemm writes: > Dag-Erling Smorgrav wrote: > > - move procfs_rwmem() from src/sys/fs/procfs/procfs_mem.c into > > src/sys/kern/sys_process.c or some other convenient location where > > both ptrace(2) and procfs(5) can access it (and also move its > > prototype to a convenient header file). > It seems to be mostly VM code, perhaps it should be somewhere in vm/*, > perhaps vm/vm_glue.c ? procfs_rwmem() was originally derived from code which still resides (#if 0'd out) in sys_process.c. That's why I felt it was the most logical place to move it to. > Would it not make more sense to just make ptrace_{read|write}_*regs() > in machdep.c rather than have ptrace go via procfs functions and back to > machdep.c? That's exactly what I'm saying. In case you're confused, the PROCFS_ACTION() stuff in procfs_machdep.c has nothing to do with procfs, it's just a poorly-named macro that evaluates its arguments and does some error checking. > This doesn't have to be done all at once. The patch that you posted after > this one looks like a good start so far. Yep - at some point the functions should be renamed, and the prototypes should probably go into instead of the bogus I added. 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