From owner-freebsd-emulation@FreeBSD.ORG Thu Sep 20 08:19:51 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0100A16A418; Thu, 20 Sep 2007 08:19:51 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 9704D13C4A5; Thu, 20 Sep 2007 08:19:50 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A54607.dip.t-dialin.net [84.165.70.7]) by redbull.bpaserver.net (Postfix) with ESMTP id 36E002E2E6; Thu, 20 Sep 2007 10:19:34 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id F20875B4812; Thu, 20 Sep 2007 10:19:07 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.1/8.13.8/Submit) id l8K8J7xR071472; Thu, 20 Sep 2007 10:19:07 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Thu, 20 Sep 2007 10:19:07 +0200 Message-ID: <20070920101907.uxb5zxel8g00g4s0@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 20 Sep 2007 10:19:07 +0200 From: Alexander Leidinger To: Roman Divacky References: <46EF7E05.5040405@gmail.com> <20070918074332.GA30053@freebsd.org> <88000019@srv.sem.ipt.ru> <20070918082119.GA30932@freebsd.org> <89768331@srv.sem.ipt.ru> <41596338@srv.sem.ipt.ru> <20070919085405.GA24442@freebsd.org> <18395962@srv.sem.ipt.ru> <20070919111557.GA28377@freebsd.org> <75502368@srv.sem.ipt.ru> <20070919132546.GA35553@freebsd.org> In-Reply-To: <20070919132546.GA35553@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.2, required 8, BAYES_00 -15.00, J_CHICKENPOX_36 0.60, J_CHICKENPOX_66 0.60, RDNS_DYNAMIC 0.10, SMILEY -0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-emulation@freebsd.org, sam Subject: Re: linuxolator problem on i386 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 08:19:51 -0000 Quoting Roman Divacky (from Wed, 19 Sep 2007 =20 15:25:46 +0200): >> > @@ -442,8 +443,7 @@ >> >> > off =3D fp->f_offset; >> >> > - buflen =3D max(LINUX_DIRBLKSIZ, nbytes); >> > - buflen =3D min(buflen, MAXBSIZE); >> > + buflen =3D max(buflen, MAXBSIZE); >> > buf =3D malloc(buflen, M_TEMP, M_WAITOK); >> > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); >> >> No. It limits buflen to which is smaller, buflen or MAXBSIZE. > > yes... brain does not work real good today :( > > I wonder why the limitation is there. Isn't this the code where we made sure that we don't use more buffer =20 than we have? In some part of the code we specially made sure that we =20 don't overflow either the FreeBSD size nor the linux size. You could check if nbytes is with or without the \0. Bye, Alexander. --=20 People never lie so much as after a hunt, during a war, or before an election. =09=09-- Otto von Bismarck http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137