From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45487 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhV1B-0008Se-MN for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:36:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhUpU-0004J6-EM for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:24:09 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:50461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhUpU-0004J2-8o for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:24:08 -0500 Received: by wwi18 with SMTP id 18so3828753wwi.4 for ; Mon, 24 Jan 2011 14:24:07 -0800 (PST) Message-ID: <4D3DFC02.50104@gmail.com> Date: Mon, 24 Jan 2011 23:24:02 +0100 From: Stefano Bonifazi MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness References: <4D3D63B3.1030402@gmail.com> <4D3DC1F6.9030800@gmail.com> <4D3DE7F8.6080807@gmail.com> <4D3DF495.8000707@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Frysinger Cc: Mulyadi Santosa , QEMU Developers > how can the ldso possibly prevent clashes ? it 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. > -mike 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 taken .. then when the process code requires dynamic memory allocation, it does it again through the memory manager (i.e. malloc) avoiding of allocating memory where shared modules have been loaded into.. Again with ASLR I think the mmu should be aware of all used memory slots, avoiding conflicts.. Well your view of random possible clashes maybe is what happens or happened in Windows systems :D But Linux is supposed to be different, isn't it? Best regards, Stefano B.