Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2001 10:48:30 +0200 (EET)
From:      Maxim Sobolev <sobomax@FreeBSD.ORG>
To:        rwatson@FreeBSD.ORG (Robert Watson)
Cc:        sobomax@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: ports/devel/ORBit Makefile ports/devel/ORBit/files         patch-src::IIOP::giop-msg-buffer.c
Message-ID:  <200110290849.f9T8nBG39778@vega.vega.com>
In-Reply-To: <Pine.NEB.3.96L.1011028122718.15623C-100000@fledge.watson.org> from "Robert Watson" at Oct 28, 2001 01:18:37 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> On Sun, 28 Oct 2001, Maxim Sobolev wrote:
> 
> > > My local Linux box has:
> > > 
> > >   ...
> > >   linux/uio.h: *  UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
> > >   ...
> > >   #define UIO_MAXIOV      1024
> > >   #if 0
> > >   #define UIO_MAXIOV      16      /* Maximum iovec's in one operation 
> > >                                      16 matches BSD */
> > >                                   /* Beg pardon: BSD has 1024 --ANK */
> > >   #endif
> > 
> > I doubt that Linux is really enforces this limit, because if it does,
> > then the ORBit would be broken there as well. BTW, could you please do
> > me a favor and run the following program on your Linux box and send me
> > its output? It tests and reports real value of the limit. 
> 
> <snip>
> 
> Here's the output:
> 
> phoenix:/tmp/tmp> gcc -Wall -g -o o  o.c
> o.c: In function `main':
> o.c:10: warning: implicit declaration of function `exit'
> o.c:13: warning: implicit declaration of function `close'
> phoenix:/tmp/tmp> ./o 
> 16385
> 
> Interestingly, from the Linux source on that box:
> 
> linux-2.4/fs/read_write.c:
>         ret = -EINVAL;
>         if (count > UIO_MAXIOV)
>                 goto out_nofree;
> 
> So it really looks like, for a file readv or writev, it should reject high
> count values.  Likewise the socket code:
> 
> linux-2.4/net/socket.c:
> 
>         /* do not move before msg_sys is valid */
>         err = -EINVAL;
>         if (msg_sys.msg_iovlen > UIO_MAXIOV)
>                 goto out_put;
> 
> Pointing it at a file instead of a device doesn't seem to make a
> difference.
> 
> Not sure what to think :-).

I bet they have a writev(2) wrapper in glibc, which lifts this
UIO_MAXIOV limit. Nedless to say that this promotes writing
incompatible software, but do they really care?

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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