Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2011 18:35:02 -0800
From:      Julian Elischer <julian@freebsd.org>
To:        freebsd-fs@freebsd.org, kellydeanch@yahoo.com
Cc:        Oliver Fromme <olli@lurza.secnetix.de>
Subject:   Re: Why is procfs deprecated in favor of procstat?
Message-ID:  <4D65C3D6.9060205@freebsd.org>
In-Reply-To: <201102211707.p1LH7c8n075660@lurza.secnetix.de>
References:  <201102211707.p1LH7c8n075660@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/21/11 9:07 AM, Oliver Fromme wrote:
> Kelly Dean<kellydeanch@yahoo.com>  wrote:
>   >  http://ivoras.sharanet.org/freebsd/freebsd8.html says that
>   >  procfs is deprecated in favor of procstat. But Plan 9 says
>   >  that procfs is the right way to do things.
>
> Linux says the same.  But it's irrelevant what they say.
> FreeBSD is not Plan 9, and FreeBSD is not Linux.
>
> Procfs has a long history of security vulnerabilities and
> other problems.  I do not mount procfs on most machines
> I'm responsible for, especially not on machines that have
> user accounts or services that are not restricted to jails.
>
> I also think it is inefficient to let the kernel render
> data to ASCII, and then have userland tools parse that
> ASCII data again.  That's ridiculous.
I disagree. It was ridiculous when pdp-11s had 500,000  instructions 
per second
but there are many cases to day where it is not ridiculous.
I don't think that procfs is by definition bad, and I am no really 
sure where this
"edict" has come from.

At fusion-io  we have abstracted the control stuff
to export as sysctl when compiled in the freebsd driver and procfs in 
the linux driver.
While sysctl is 'ok' I will admit that the procfs variant is a bit 
more convenient to use.
simply because you can enumerate the damned tree  without seeing all 
the contents.

>   There is no sane
> reason for putting kernel data as ASCII text into a pseudo
> file system.
>
> Best regards
>     Oliver
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D65C3D6.9060205>