From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqF7P-0002ck-Lj for qemu-devel@nongnu.org; Fri, 12 Mar 2010 19:22:15 -0500 Received: from [199.232.76.173] (port=45123 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqF7O-0002cb-6N for qemu-devel@nongnu.org; Fri, 12 Mar 2010 19:22:14 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NqF7M-0002v0-Q3 for qemu-devel@nongnu.org; Fri, 12 Mar 2010 19:22:14 -0500 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:64550 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NqF7M-0002uu-Eq for qemu-devel@nongnu.org; Fri, 12 Mar 2010 19:22:12 -0500 Date: Sat, 13 Mar 2010 03:21:59 +0300 (MSK) From: malc Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [Qemu-devel] linux-user issues List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook , Aurelien Jarno a) elfload.c:859 #define TARGET_ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(TARGET_ELF_EXEC_PAGESIZE-1)) This means that for 64bit guest on a 32bit host the _v's value is silently reduced to 32bit, the cast should be abi_ulong. b) mmap.c:428 real_start = start & qemu_host_page_mask; Same thing basically qemu_host_page_mask is unsigned long and so the upper bits are sliently cleared. Again qemu_host_page_mask should probably be abi_ulong. The above two make elf binary with one of the segments above 4G load and run on 32bit guest only to fail well into execution and without any indication that it shouldn't have been allowed to run in the first place. -- mailto:av1474@comtv.ru