From patchwork Mon Jan 24 07:57:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 80096 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 D23761007D1 for ; Mon, 24 Jan 2011 19:04:40 +1100 (EST) Received: from localhost ([127.0.0.1]:38341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhHLF-00070y-Ur for incoming@patchwork.ozlabs.org; Mon, 24 Jan 2011 03:00:02 -0500 Received: from [140.186.70.92] (port=42137 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhHJk-0006X3-9T for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:58:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhHIr-0004WD-J8 for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:57:35 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:34928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhHIr-0004W8-7L for qemu-devel@nongnu.org; Mon, 24 Jan 2011 02:57:33 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CBBEE1B411D; Mon, 24 Jan 2011 07:57:31 +0000 (UTC) From: Mike Frysinger To: qemu-devel@nongnu.org, Riku Voipio Date: Mon, 24 Jan 2011 02:57:33 -0500 Message-Id: <1295855853-30237-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.4.rc2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Subject: [Qemu-devel] [PATCH] 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)