[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking adresses of write and read



On Wed, May 16, 2001 at 07:51:01PM +0200, Fabrice Gautier wrote:
> On Wed, 16 May 2001 18:50:53 +0200 Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL> wrote:
> That's what i'm trying to see: Where does the kernel physically write
> when my program write in the mmaped area. I don't want the user space program
> to handle physical adresses. It just care about it for debugging
> purposes, I just want the physical adres as information.

Then catch it in your driver at the point where userland does the
mmap(). Reads and writes are always relative to the base address.

> > What did you expect on a mailing list with "kernel" in its name? :)
> 
> Don't know, maybe there's a kernel syscall, some way to intercept the
> memory acesses so that maybe i can use virt_to_phys, some sort of kernel
> hack, some way to use a kernel debugger to get this information, some
> way for the user space program to access kernel funtions or structures,
> anything I could use to get the information, but i don't know...

No. If userland could touch kernel datastructures the whole concept of
multiprogramming and security would be violated.

> Since you point out that a user program doesn't normally have to care
> about physical adresses, I guess the possible solution have something to
> do with kernel...

That's right :)


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/