Re: PROPOSAL: dot-proc interface [was: /proc stuff]

Martin Dalecki
2001-11-05T10:14:29Z

Alexander Viro wrote:
>
> On Sun, 4 Nov 2001, Tim Jansen wrote:
>
> > So if only some programs use the 'dot-files' and the other still use the
> > crappy text interface we still have the old problem for scripts, only with a
> > much larger effort.
>
> Folks, could we please deep-six the "ASCII is tough" mentality? Idea of
> native-endian data is so broken that it's not even funny. Exercise:
> try to export such thing over the network. Another one: try to use
> that in a shell script. One more: try to do it portably in Perl script.
>
> It had been tried. Many times. It had backfired 100 times out 100.
> We have the same idiocy to thank for fun trying to move a disk with UFS
> volume from Solaris sparc to Solaris x86. We have the same idiocy to
> thank for a lot of ugliness in X.
>
> At the very least, use canonical bytesex and field sizes. Anything less
> is just begging for trouble. And in case of procfs or its equivalents,
> _use_ the_ _damn_ _ASCII_ _representations_. scanf(3) is there for
> purpose.

And the purpose of scanf in system level applications is to introduce
nice
opportunities for buffer overruns and string formatting bugs.