tech-kern archive

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

Re: Unifying /dev/{mem,kmem,zero,null} implementations

Joerg Sonnenberger wrote:
Hi all,
unifies the implementation of /dev/{mem,kmem,zero,null} in MI code and
makes it MPsafe. This is useful as writing to /dev/null is not that
unknown :-)

This needs quite a bit attention from portmasters and testing:
- the address returned by mmap of /dev/mem is not consistent on all
ports, I have no idea if it works on those where atop() doesn't exist.
- on i386, the special /dev/io semantic for COMPAT_10 and COMPAT_FREEBSD
is lost at the moment -- do we want to keep that? It would mean another
platform hook.
- the access permissions for raw memory are inconsistent and should be
changed to use kauth on all platforms.

Over all, the patch adds 1419 lines and removes 6271.



In dev_mem_readwrite() pmap_kenter_pa and pmap_kremove calls require a pmap_update(pmap_kernel()) after them otherwise the updates may not have been sync'd into the hardware.


Home | Main Index | Thread Index | Old Index