netdev
[Top] [All Lists]

Re: Wrong UIDs reported in /proc/net/tcp

To: "Chad N. Tindel" <chad@xxxxxxxxxx>
Subject: Re: Wrong UIDs reported in /proc/net/tcp
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2004 09:58:12 +1100
Cc: netdev@xxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxx
In-reply-to: <20041109224337.GB87321@xxxxxxxxxxxxxx>
References: <20041109205358.GA64015@xxxxxxxxxxxxxx> <E1CRdBr-0001P2-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20041109224337.GB87321@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Tue, Nov 09, 2004 at 05:43:37PM -0500, Chad N. Tindel wrote:
>
> > /proc/net/tcp is an obsolete interface.  It is inherently unreliable
> > in that a record may be read using two read(2) calls.  Those two calls
> > may end up looking at two different records.
> 
> Is it unreliable in that the wrong user id will get returned for an 
> established socket?  How could such a thing happen?

In 2.4 it is entirely possible to have a record broken up into two
reads.  There is no guarantee that the two reads will be reading the
same record.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>