lkml.org 
[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PROPOSAL: dot-proc interface [was: /proc stuff]
    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.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:12    [W:5.061 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site