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

Re: /dev/kmem



In article <9407200826.AA02175@hpbeo79.bbn.hp.com> you wrote:

> I think one advantage is that the kernel has more control over what it
> publishes in /proc, and that the /proc device is visible to the user
> for simple manipulations such as in the MultiTOS desktop.

I think there is no reason to remove /proc after /dev/kmem is implemented.

> I'm not sure, however, what a /dev/kmem offers. If it opens up the
> complete kernel address space to other processes, I would definitely
> prefer the /proc approach since it seems safer to me.

/dev/kmem is usually not world readable, it's only readable bye the
kmem-group. Thinks like ps and top are sgid-kmem (SunOS 4):

-rwxr-sr-x  1 root     kmem        36040 Oct 14  1990 /bin/ps*
crw-r-----  1 root     kmem       3,   1 Jan 25 23:42 /dev/kmem
-rwxr-sr-x  1 root     kmem        49152 Feb  2 02:08 /usr/local/bin/top*

BTW: The same feature is used here for df and the group operator:

-rwxr-sr-x  1 root     operator     7904 Oct 14  1990 /bin/df*
crw-r-----  1 root     operator  17,   2 Jan 25 23:42 /dev/rsd0c

Bye,
Knarf
--
    Frank Bartels    |      UUCP/ZModem: + 49 89 5469593       | MiNT is
knarf@nasim.cube.net | Login: nuucp Index: /pub/ls-lR.nasim.gz | Now TOS!