From owner-freebsd-hackers Sun Jun 22 23:45:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA16516 for hackers-outgoing; Sun, 22 Jun 1997 23:45:51 -0700 (PDT) Received: from ucsee.EECS.Berkeley.EDU (benco@ucsee.EECS.Berkeley.EDU [128.32.156.173]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA16511 for ; Sun, 22 Jun 1997 23:45:48 -0700 (PDT) Received: (from benco@localhost) by ucsee.EECS.Berkeley.EDU (8.8.4/8.8.4) id XAA04970; Sun, 22 Jun 1997 23:45:46 -0700 Date: Sun, 22 Jun 1997 23:45:46 -0700 From: Ben Cottrell Message-Id: <199706230645.XAA04970@ucsee.EECS.Berkeley.EDU> To: hackers@FreeBSD.ORG, un_x@anchorage.net Subject: Re: direct access Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Steve, Not to say what you want isn't possible. It is--there are many different options available to you. Hack the kernel, write an LKM, run the system in insecure mode and scribble all over /dev/mem and /dev/kmem, whatever. But it's not possible (as several others have mentioned) in the same way as it is in DOS. UNIX is a different mindset--you gotta be prepared to make some paradigm shifts here :-) One of those paradigm shifts is: You are not in control. Only the kernel is--the kernel is the big brother that makes sure all the little kiddie processes play nice with each other and with the system. This means that the answer to this: > is that an absolute? no peek-ing or poke-ing ... at all? is a firm YES. You are allowed to go everywhere within your own address space, but that's a barrier that you can't just flip a switch and have disappear. I don't know how much you know about the address translation hardware, but as long as the CPU is executing your code (no matter if you're root or not), the page table is set up so that the *only* memory your process can see is that which it owns. Everything else is done by a small and well-defined set of system calls. I agree with one of the other posters to this thread that you might get a kick out of a good UNIX book--but I'd also like to put in a plug for "The Design And Implementation of the 4.4BSD Operating System, by McKusick, Bostic, Karels, and Quarterman. I recommend it because the code and data structures it talks about are (for the most part) the exact same ones as you'll find in FreeBSD, thus teaching you a lot about *what you need to know* to really get work done on the kernel, if you want to do that. If you don't, well, it's got a lot of low-down details on how everything is put together. Peace, love, and vm_map_entries, ~Ben