From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaQKh-000148-27 for qemu-devel@nongnu.org; Mon, 10 Aug 2009 04:34:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaQKg-00013t-2F for qemu-devel@nongnu.org; Mon, 10 Aug 2009 04:34:18 -0400 Received: from [199.232.76.173] (port=43903 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaQKf-00013m-U5 for qemu-devel@nongnu.org; Mon, 10 Aug 2009 04:34:17 -0400 Received: from dd21438.kasserver.com ([85.13.141.110]:42002) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaQKf-0001cD-DP for qemu-devel@nongnu.org; Mon, 10 Aug 2009 04:34:17 -0400 Message-ID: <4A7FDB66.2090506@opensuse.org> Date: Mon, 10 Aug 2009 10:33:42 +0200 From: Martin Mohring MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu-arm fails on test-mmap References: <200908100145.52476.dl9pf@gmx.de> <200908100409.04926.dl9pf@gmx.de> In-Reply-To: <200908100409.04926.dl9pf@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , Aurelien Jarno , =?UTF-8?B?SmFuLVNpbW9uIE3DtmxsZXI=?= Hi, yesterday, we tracked down the problem to a kernel bug in this area: http://bugzilla.kernel.org/attachment.cgi?id=3D17219 What do I want to sa= y with this: the user mode memory allocator does not work because it runs into a kernel bug. Kudos to Jan-Simon. Has anyone an idea how to handle such a case.... Patching the kernel is not the best idea. We will check which kernels are affected. Cheers, Martin Jan-Simon M=C3=B6ller wrote: > A quick hack around is this: > > diff --git a/linux-user/mmap.c b/linux-user/mmap.c > index e05caa0..a04d6b1 100644 > --- a/linux-user/mmap.c > +++ b/linux-user/mmap.c > @@ -316,8 +316,14 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong= size) > if (addr =3D=3D addr_start) > return (abi_ulong)-1; > } > - if (start =3D=3D 0) > - mmap_next_start =3D addr + size; > + if (start =3D=3D 0) { > + abi_ulong mynext =3D addr + size ; > + if ( (mynext > 0x5f000000) && (mynext < 0x65000000) ) { > + mmap_next_start =3D 0x65000000 ; > + } else { > + mmap_next_start =3D addr + size; > + } > + } > return addr; > } > > > But this is for sure not the real solution. > > Best, > Jan-Simon > > > =20