From owner-cvs-all Mon Oct 29 0:50:22 2001 Delivered-To: cvs-all@freebsd.org Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by hub.freebsd.org (Postfix) with ESMTP id EEF0C37B403; Mon, 29 Oct 2001 00:50:05 -0800 (PST) Received: from vega.vega.com (h39.229.dialup.iptcom.net [212.9.229.39]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id KAA04955; Mon, 29 Oct 2001 10:49:58 +0200 (EET) (envelope-from max@vega.com) Received: (from max@localhost) by vega.vega.com (8.11.6/8.11.3) id f9T8nBG39778; Mon, 29 Oct 2001 10:49:11 +0200 (EET) (envelope-from sobomax@FreeBSD.org) From: Maxim Sobolev Message-Id: <200110290849.f9T8nBG39778@vega.vega.com> Subject: Re: cvs commit: ports/devel/ORBit Makefile ports/devel/ORBit/files patch-src::IIOP::giop-msg-buffer.c To: rwatson@FreeBSD.ORG (Robert Watson) Date: Mon, 29 Oct 2001 10:48:30 +0200 (EET) Cc: sobomax@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG In-Reply-To: from "Robert Watson" at Oct 28, 2001 01:18:37 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > 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. > > > > 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