[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: check memory mapping
On Aug 23, 2:50pm, manu%netbsd.org@localhost (Emmanuel Dreyfus) wrote:
-- Subject: Re: check memory mapping
| Christos Zoulas <christos%zoulas.com@localhost> wrote:
| > You write the pointer to a file, if the write was successful, you can read
| > the contents of the pointer. You rewind the file, and read from it into
| > the pointer. If successful, you can write to the pointer and since you
| > read what you just wrote, the memory contents are the same.
| The location is set to PROT_WRITE using mprotect(), hence I cannot read
| from it.
| Some context information: this is to pass a regression test suite for a
| NetBSD implemenation of Linux's libaio. I do it in user space on top of
| librt while Linux does it in kernel. Hence some test checks that a
| system call (which is a function for me) returns EFAULT depending of
| memory protection.
Wel, I think that the conversion to uvm lost kernacc(9) and useracc(9) which
would be exactly want you want. I think FreeBSD has them.
Main Index |
Thread Index |