Subject: Re: @booted_kernel magic symlink?
To: None <>
From: Chapman Flack <>
List: tech-kern
Date: 04/28/2006 17:53:01
der Mouse wrote:
> To me, this indicates a bug in the implementation of /dev/ksyms.  (I've
> already run into similar bugs elsewhere, such as /kern/msgbuf.)
> If it claims to be a file, it should act like a file.  In particular, a
> *real* file with identical contents should act exactly the same way.

It seems to me that the 'classic' device interface precludes giving
such magic behavior to a regular file.  kern/msgbug is another story;
it lives on a magic filesystem, so there should be no problem making
it appear as a file or any kind of thing you like.  Once /dev is really
a devfs, the same could be done for /dev/ksyms.

Or, why couldn't it be /kern/ksyms?

But then, the is-a-file test in nm was added after the 2.0 release.
The 2.0 nm runs directly on /dev/ksyms and doesn't seem to crash the
stock market, accelerate global warming, or anything like that; but
somebody had to go and add a test to make sure it couldn't. :/