Hi,

On 08/09/07 22:46, Joachim Worringen wrote:
[cut]
Why does map_len have to be page-aligned? devmap(9E) doesn't mention this (says it has to be <= the mmap() len), and the example there does no alignment, too. Also, I tried and returned ptob(btopr((len)), but it did not fix the problem (and violated the maplen <= len constraint - but ptob(btop((len)) wouldn't make sense, either).

A page is the smallest currency unit for the MMU which polices page
mappings - you can't expose less than a page from kernel to userland
since once the page is loaded into the TLB after the intial pagefault
in userland you won't trap again for as long as it remains loaded -
so you have no way to stop userland accessing other bits of the page.

Perhaps devmap(9E) does not mention that, but it is alluded to in
pages such as ddi_umem_alloc(9F) and devmap_umem_setup(9F).

Cheers

Gavin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to