Received: from eggs.gnu.org ([2001:4830:134:3::10]:46334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF4y8-0002Z2-RT for qemu-devel@nongnu.org; Wed, 06 Aug 2014 13:25:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF4y1-000315-R9 for qemu-devel@nongnu.org; Wed, 06 Aug 2014 13:25:44 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:57582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF4y1-00030v-HG for qemu-devel@nongnu.org; Wed, 06 Aug 2014 13:25:37 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Aug 2014 13:25:36 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <53C8CF42.6040703@samsung.com> References: <53C8CF42.6040703@samsung.com> Message-ID: <20140806172530.14379.59941@loki> Date: Wed, 06 Aug 2014 12:25:30 -0500 Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH for-2.1] linux-user: hide reserved mmap in /proc/self/mmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mikhail Ilin , qemu-stable@nongnu.org Cc: "Slava Garbuzov , 'Yury Gribov'" , qemu-devel@nongnu.org Quoting Mikhail Ilin (2014-07-18 02:39:46) > Hi, > = > Running 32-bits binaries with address sanitizer (ASAN) instrumentations > fails under 64-bits qemu. During initialization ASAN relies on the output > from /proc/self/mmap then tries to find a big chunk for shadow memory but > it is not happened. > = > Reserved memory for guest address space is used privately by qemu to > satisfy user anonymous mmap calls but in the same time it is not hidden > from an application and is reported when a user reads /proc/self/mmap. > Qemu is not fully transparent for a guest. > = > The patch covers the case and cleans up the reserved memory map from > the output. > = > = > From 167c42e6a9521c05ddd7c6dfbb108d2ae65de098 Mon Sep 17 00:00:00 2001 > From: Mikhail Ilyin > Date: Fri, 18 Jul 2014 10:14:06 +0400 > Subject: [PATCH] Clean up the reserved memory map from /proc/self/mmap = > output > which doesn't belong to an emulated process. > = > Signed-off-by: Mikhail Ilyin Hi Mikhail, all patches need to go through qemu-devel@nongnu.org (Cc'd). qemu-stable is for fixes potentially applicable to older qemu releases, but qemu-devel should be cc'd in either case. > --- > linux-user/syscall.c | 7 +++++++ > 1 file changed, 7 insertions(+) > = > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index a50229d..8f406e4 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -5122,6 +5122,13 @@ static int open_self_maps(void *cpu_env, int fd) > continue; > } > if (h2g_valid(min) && h2g_valid(max)) { > +#ifdef CONFIG_USE_GUEST_BASE > + if (RESERVED_VA) { > + if (mmap_next_start =3D=3D h2g(max)) { > + continue; > + } > + } > +#endif > dprintf(fd, TARGET_ABI_FMT_lx "-" TARGET_ABI_FMT_lx > " %c%c%c%c %08" PRIx64 " %02x:%02x %d %s%s\n", > h2g(min), h2g(max), flag_r, flag_w, > -- = > 1.9.1