From patchwork Mon Feb 7 06:05:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82173 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1ED70B70B3 for ; Tue, 8 Feb 2011 09:22:06 +1100 (EST) Received: from localhost ([127.0.0.1]:35234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmKU2-0008Uc-Qu for incoming@patchwork.ozlabs.org; Mon, 07 Feb 2011 01:21:58 -0500 Received: from [140.186.70.92] (port=42924 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmKNY-0006CW-5v for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:15:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmKNP-0002jY-TB for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:15:08 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:51405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmKNP-0002jI-Go for qemu-devel@nongnu.org; Mon, 07 Feb 2011 01:15:07 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B22C51B40B5; Mon, 7 Feb 2011 06:05:51 +0000 (UTC) From: Mike Frysinger To: qemu-devel@nongnu.org, Riku Voipio Date: Mon, 7 Feb 2011 01:05:52 -0500 Message-Id: <1297058757-7611-4-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1297058757-7611-1-git-send-email-vapier@gentoo.org> References: <1297058757-7611-1-git-send-email-vapier@gentoo.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.211.166.183 Cc: Subject: [Qemu-devel] [PATCH 4/9] linux-user: decode MAP_{UNINITIALIZED, EXECUTABLE} in strace X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Mike Frysinger --- linux-user/strace.c | 4 ++++ linux-user/syscall_defs.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index bf9a0d9..a8786bb 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -398,6 +398,7 @@ UNUSED static struct flags mmap_flags[] = { FLAG_TARGET(MAP_DENYWRITE), FLAG_TARGET(MAP_FIXED), FLAG_TARGET(MAP_GROWSDOWN), + FLAG_TARGET(MAP_EXECUTABLE), #ifdef MAP_LOCKED FLAG_TARGET(MAP_LOCKED), #endif @@ -408,6 +409,9 @@ UNUSED static struct flags mmap_flags[] = { #ifdef MAP_POPULATE FLAG_TARGET(MAP_POPULATE), #endif +#ifdef TARGET_MAP_UNINITIALIZED + FLAG_TARGET(MAP_UNINITIALIZED), +#endif FLAG_END, }; diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index d02a9bf..4742ac0 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -999,6 +999,7 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ #define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ +#define TARGET_MAP_UNINITIALIZED 0x4000000 /* for anonymous mmap, memory could be uninitialized */ #endif #if (defined(TARGET_I386) && defined(TARGET_ABI32)) || defined(TARGET_ARM) || defined(TARGET_CRIS)