Date: Sun, 22 Jun 1997 23:45:46 -0700 From: Ben Cottrell <benco@ucsee.EECS.Berkeley.EDU> To: hackers@FreeBSD.ORG, un_x@anchorage.net Subject: Re: direct access Message-ID: <199706230645.XAA04970@ucsee.EECS.Berkeley.EDU>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706230645.XAA04970>