dyer (12/30/82)
Because no reasonable sysmgr would ever keep /dev/kmem or /dev/mem unprotected in an open-access environment, we developed a scheme at Harvard (and later ported to BBN-UNIX) to allow "windows" into different areas of the kernel by introducing a new class of pseudo-devices, table devices. Interested parties can ask me for specifics. Each minor device number selects a region of contiguous kernel memory. For example, we had /dev/table/proc /dev/table/upage (surprise when you read this) /dev/table/text /dev/table/swapmap /dev/table/inode /dev/table/coremap and several others which I can't remember. In these cases, the regions were the entire data structures (i.e., /dev/table/proc is a file containing the entire proc table, and so on.) Protections were usually set to 0644, but the key is that each can be protected individually. We often had students who wanted to write "ps" and "pstat-like" programs, (a common example is a CURSES program displaying memory or swap area frag- mentation), and this mechanism allowed them to do it without special privileges or intervention by the staff. I think the arguments about non-portability aren't relevant, at least as these are used in our environment--it's all system dependent stuff anyway, and would be expected to need more than recompilation when ported to a new environment. Steve Dyer decvax!wivax!dyer sdyer@bbn-unix