I'd like to know why kernfs has became deprecated /proc is not mounted by default.

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

I'd like to know why kernfs has became deprecated /proc is not mounted by default.

João Salvatti
Hi all,

I'd like to know why kernfs has became deprecated, and why
/proc is not mounted by default.

--
Joco Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://salvatti.expert.com.br
e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Nick Guenther
On 2/16/06, Joco Salvatti <[hidden email]> wrote:
> Hi all,
>
> I'd like to know why kernfs has became deprecated, and why
> /proc is not mounted by default.
>

I was under the impression that /proc was a linux thing. Someone
correct me if I'm wrong.

-Kousu

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

João Salvatti
In reply to this post by João Salvatti
Ok, Thanks Frank!

On 2/16/06, Frank Denis <[hidden email]> wrote:

> Le Thu, Feb 16, 2006 at 08:03:57PM -0200, Joco Salvatti ecrivait :
> >I'd like to know why kernfs has became deprecated, and why
> >/proc is not mounted by default.
>
>   Why maintain something that no one ever used? kernfs was nothing but
> useless bloat.
>
>   /proc is only useful to some Linux apps. Having it mounted by default
> wouldn't have any benefit.
>
>
>


--
Joco Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://salvatti.expert.com.br
e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Jason Crawford
In reply to this post by Nick Guenther
On 2/16/06, Nick Guenther <[hidden email]> wrote:
> On 2/16/06, Joco Salvatti <[hidden email]> wrote:
> > Hi all,
> >
> > I'd like to know why kernfs has became deprecated, and why
> > /proc is not mounted by default.
> >
>
> I was under the impression that /proc was a linux thing. Someone
> correct me if I'm wrong.

It is not just a Linux thing, I know FreeBSD has it as well. But,
OpenBSD has never really used /proc unless you were using it for
FreeBSD/Linux binary support (I believe), and the developers saw no
real use in keeping it anymore so removed it. Same with kernfs.

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Marco Peereboom
In reply to this post by João Salvatti
Search the mail archives .  It has been discussed in the past.

On Thu, Feb 16, 2006 at 08:03:57PM -0200, Joco Salvatti wrote:

> Hi all,
>
> I'd like to know why kernfs has became deprecated, and why
> /proc is not mounted by default.
>
> --
> Joco Salvatti
> Undergraduating in Computer Science
> Federal University of Para - UFPA
> web: http://salvatti.expert.com.br
> e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

João Salvatti
ok, I'll look forward

On 2/16/06, Marco Peereboom <[hidden email]> wrote:

> Search the mail archives .  It has been discussed in the past.
>
> On Thu, Feb 16, 2006 at 08:03:57PM -0200, Joco Salvatti wrote:
> > Hi all,
> >
> > I'd like to know why kernfs has became deprecated, and why
> > /proc is not mounted by default.
> >
> > --
> > Joco Salvatti
> > Undergraduating in Computer Science
> > Federal University of Para - UFPA
> > web: http://salvatti.expert.com.br
> > e-mail: [hidden email]
> >
>


--
Joco Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://salvatti.expert.com.br
e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Craig Barraclough
In reply to this post by Nick Guenther
On Friday 17 February 2006 09:21, you wrote:
> On 2/16/06, Joco Salvatti <[hidden email]> wrote:
> > Hi all,
> >
> > I'd like to know why kernfs has became deprecated, and why
> > /proc is not mounted by default.
>
> I was under the impression that /proc was a linux thing. Someone
> correct me if I'm wrong.
>
mount_procfs (8) - mount the process file system

But yes, useful for linux emul.
--
Craig

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Damien Miller
In reply to this post by João Salvatti
On Thu, 16 Feb 2006, Joco Salvatti wrote:

> Hi all,
>
> I'd like to know why kernfs has became deprecated

Because the information it provided is available by sysctl or other
tools, and because it has suffered a number of security problems.

> , and why
> /proc is not mounted by default.

For the same reason we do not run named, tftpd or a whole bunch of
other stuff by default.

-d

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Stuart Henderson
In reply to this post by Nick Guenther
The information is already out there -
if you want to know why something happened, read cvs commit logs.

On 2006/02/16 17:21, Nick Guenther wrote:
> On 2/16/06, Joco Salvatti <[hidden email]> wrote:
> > I'd like to know why kernfs has became deprecated, and why
> > /proc is not mounted by default.

http://marc.theaimsgroup.com/
go to list openbsd-cvs
search for kernfs.
glance through the posts and read the commit logs.
hint: nov 2004.

> I was under the impression that /proc was a linux thing. Someone
> correct me if I'm wrong.

same trick or look at e.g.
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/i386/conf/GENERIC

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Martin Schröder
In reply to this post by Nick Guenther
On 2006-02-16 17:21:30 -0500, Nick Guenther wrote:
> I was under the impression that /proc was a linux thing. Someone
> correct me if I'm wrong.

<quote src="http://en.wikipedia.org/wiki/Procfs">
The UNIX 8th Edition version of /proc was implemented by Tom J.
Killian, who presented a paper titled Processes as Files at
USENIX in June 1984. It was designed in order to replace the
ptrace system call used for process tracing.

Roger Faulkner and Ron Gomes ported V8 /proc to SVr4, and
published a paper called The Process File System and Process
Model in UNIX System V at USENIX in January 1991. This kind of
procfs supported the creation of ps, but the files could only be
access with functions read(), write(), and ioctl().

4.4BSD implemented /proc with subdirectories for each process,
and the ability to access memory, registers, and current status.
Solaris 2.6 /proc (finished in 1996) also had separate directory
for each process, as well as a special ctl file which allowed for
control, tracing and manipulation of processes.
</quote>

Best
    Martin
--
                    http://www.tm.oneiros.de

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

Theo de Raadt
In reply to this post by João Salvatti
> I'd like to know why kernfs has became deprecated

Because we have always considered it insecure.  But if you want
one simple simple reason, it is documented:

     Due to non-atomic operations and the potential for race conditions, pro-
     grams should not depend on information obtained from this filesystem.

This is serious.  And not fixable.  kernfs is fundamentally busted.
And as a result we have been moving away from it for more than 8 years.
It was simply time to delete code.

> and why
> /proc is not mounted by default.

Same basic reasons.  It's garbage.  The other mechanisms are better.

procfs looks clever, but it is wrong.

Reply | Threaded
Open this post in threaded view
|

Re: I'd like to know why kernfs has became deprecated /proc is not mounted by default.

João Salvatti
Thanks Theo.

On 2/23/06, Theo de Raadt <[hidden email]> wrote:

> > I'd like to know why kernfs has became deprecated
>
> Because we have always considered it insecure.  But if you want
> one simple simple reason, it is documented:
>
>      Due to non-atomic operations and the potential for race conditions, pro-
>      grams should not depend on information obtained from this filesystem.
>
> This is serious.  And not fixable.  kernfs is fundamentally busted.
> And as a result we have been moving away from it for more than 8 years.
> It was simply time to delete code.
>
> > and why
> > /proc is not mounted by default.
>
> Same basic reasons.  It's garbage.  The other mechanisms are better.
>
> procfs looks clever, but it is wrong.
>


--
Joco Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://salvatti.expert.com.br
e-mail: [hidden email]