From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhUzl-00080P-ME for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhUzk-0006Mp-Gf for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:45 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:43498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhUzk-0006Ml-CL for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:44 -0500 Received: by iye19 with SMTP id 19so4655633iye.4 for ; Mon, 24 Jan 2011 14:34:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4D3DFC02.50104@gmail.com> References: <4D3D63B3.1030402@gmail.com> <4D3DC1F6.9030800@gmail.com> <4D3DE7F8.6080807@gmail.com> <4D3DF495.8000707@gmail.com> <4D3DFC02.50104@gmail.com> From: Mike Frysinger Date: Mon, 24 Jan 2011 17:34:23 -0500 Message-ID: Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness 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: Stefano Bonifazi Cc: Mulyadi Santosa , QEMU Developers On Mon, Jan 24, 2011 at 17:24, Stefano Bonifazi wrote: >> how can the ldso possibly prevent clashes ? =C2=A0it has no idea what >> addresses an app will ask for at runtime. >> >> plus, if the kernel is employing ASLR (which isnt uncommon nowadays), >> the load addresses could be anywhere. > > Well not alone, in my mind ld.so asks the memory manager through calling > mmap where it can map the shared modules inside the process address space= .. > the memory manager should know what addresses are free and which are take= n > .. then when the process code requires dynamic memory allocation, it does= it > again through the memory manager (i.e. malloc) avoiding of allocating mem= ory > where shared modules have been loaded into.. > Again with ASLR I think the mmu should be aware of all used memory slots, > avoiding conflicts.. i'm not saying conflicts arent noticed. i'm saying that there is no way for the surrounding system (ldso/linux mm/...) to know ahead of time what the app is going to request with MAP_FIXED and thus prevent possible future conflicts. -mike