From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lols2-0002NV-30 for qemu-devel@nongnu.org; Tue, 31 Mar 2009 17:51:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lolrx-0002Mq-Ht for qemu-devel@nongnu.org; Tue, 31 Mar 2009 17:51:45 -0400 Received: from [199.232.76.173] (port=40155 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lolrx-0002Mn-F3 for qemu-devel@nongnu.org; Tue, 31 Mar 2009 17:51:41 -0400 Received: from mx20.gnu.org ([199.232.41.8]:38959) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lolrx-0002IQ-21 for qemu-devel@nongnu.org; Tue, 31 Mar 2009 17:51:41 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lolrv-0000vt-Gn for qemu-devel@nongnu.org; Tue, 31 Mar 2009 17:51:39 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 14/17] Revived GUEST_BASE support for usermode emulation targets. Date: Tue, 31 Mar 2009 21:51:36 +0000 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200903312251.37058.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: riku.voipio@iki.fi On Tuesday 31 March 2009, riku.voipio@iki.fi wrote: > + =A0 =A0 =A0 =A0 =A0 "You can use -B option to load target binary into d= ifferent\n" > + =A0 =A0 =A0 =A0 =A0 "address that is specified in elf headers. =A0This = can be > useful\n" + =A0 =A0 =A0 =A0 =A0 "when target binary would be loaded to lo= w addresses > and\n" + =A0 =A0 =A0 =A0 =A0 "/proc/sys/vm/mmap_min_addr is set to higher= =2E =A0For > example\n" + =A0 =A0 =A0 =A0 =A0 " =A0 =A0 qemu-" TARGET_ARCH " -B 0x1000= 00 ...\n" > + =A0 =A0 =A0 =A0 =A0 "loads target binary starting from the first meg.\n" This is wrong. -B is completely transparent to the guest application and=20 offsets the whole guest address space.=20 > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index c6b0b74..ef2bf55 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2413,6 +2413,8 @@ static inline abi_long do_shmat(int shmid, abi_ulong > shmaddr, int shmflg, } > =A0 =A0 =A0} > =A0 > + =A0 =A0*raddr =3D h2g(*raddr); > + This is wrong. host and guest addresses are different sizes. This sort of bugfix should also be separated from the host support. Especia= lly=20 as the bogus code comes from one of your earlier patches. Paul