Subject: Re: procfs_machdep.c
To: None <fvdl@wasabisystems.com>
From: Wolfgang Solfrank <ws@tools.de>
List: tech-kern
Date: 01/17/2001 15:48:49
Hi,

> > Shouldn't this be implemented via some kind of linux_procfs? If I
> > missed a discussion about this, just ignore me.

I was just about going to say this, too!  At least to me, it seems to
be quite wrong to put this into procfs.  procfs in *BSD is meant to be
used to access processes' data.  Our approach to access kernel data is
kernfs.

Now if we need to have something similar to kernfs and it has to reside
in /proc for compatibility, we should provide a different filesystem
(assuming it needs to be different from kernfs) for this purpose, which
can then be union-mounted (mount -o union, not mount -t union) on top
of /proc (or probably better, /emul/linux/proc).

Hell, depending on the stuff accessible via this new filesystem, we
might even think about replacing our existing kernfs by it.

However, mangling different things into one monolithic thing seems
like the wrong approach to me.

> That is what FreeBSD does, and I considered that. However, since
> the goal is mainly to provide only the necessary extensions for
> Linux emulation (so you can do mount -t procfs -o linux procfs
> /emul/linux/proc), there would be a lot of duplicated code.

Hmm, would you care to comment about the duplicated code bit?

> Hence, I opted for a mount option. There was already some code
> in procfs specifically targeted to Linux emulation.

For the record, IMHO, the fact that there was linux specific code in
procfs looks wrong, too.  And you seem to agree here, as you did away
with most of the linux-speciality of that stuff.  The code previously
dependent on COMPAT_LINUX and only shown for processes running under
linux emulation, is now only dependent on the -o linux mount option.

Ciao,
Wolfgang

PS: As an aside, I still maintain that the correct name for the executable
of a process is "a.out", not "file".  This is the traditional default name
of an executable (and still is) and has nothing to do with the format of
the binary.  (If you don't believe me, when did you last link a program
without giving an explicit name to it?)
-- 
ws@TooLs.DE     Wolfgang Solfrank, TooLs GmbH 	+49-228-985800