Re: [Patch]: write_kmem above high_memory

Tigran Aivazian (tigran@sco.COM)
Tue, 4 Jan 2000 14:23:07 +0000 (GMT)


On Tue, 4 Jan 2000, Andi Kleen wrote:
> /dev/mem should not care about page protections I think.

/dev/mem (or /dev/kmem) shouldn't and don't care about page
protections on the "other" side, i.e. on the side of physical (or kernel)
addresses we are reading or writing. But it certainly should (and does)
care about page-level protection of userspace buffers supplied to them.

So, if user supplied a readonly page as argument to read(2) system call
and kernel happily wrote to it without faults or -EFAULT that is *bad*.

It doesn't matter if the file in question is /dev/kmem or /tmp/foo, of
course.

Regards,
Tigran.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/