qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>,
	Laurent Vivier <laurent@vivier.eu>,
	Lirong Yuan <yuanzi@google.com>
Subject: [PULL v3 09/16] linux-user: Update TASK_UNMAPPED_BASE for aarch64
Date: Thu, 19 Mar 2020 10:26:20 +0100	[thread overview]
Message-ID: <20200319092627.51487-10-laurent@vivier.eu> (raw)
In-Reply-To: <20200319092627.51487-1-laurent@vivier.eu>

From: Lirong Yuan <yuanzi@google.com>

This change updates TASK_UNMAPPED_BASE (the base address for guest programs) for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), which has specific boundary definitions for memory mappings on different platforms:
https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/rtl/tsan_platform.h

Signed-off-by: Lirong Yuan <yuanzi@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200313002813.3857-1-yuanzi@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/mmap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 8685f02e7e90..e37803379747 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -184,7 +184,11 @@ static int mmap_frag(abi_ulong real_start,
 }
 
 #if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64
+#ifdef TARGET_AARCH64
+# define TASK_UNMAPPED_BASE  0x5500000000
+#else
 # define TASK_UNMAPPED_BASE  (1ul << 38)
+#endif
 #else
 # define TASK_UNMAPPED_BASE  0x40000000
 #endif
-- 
2.25.1



  parent reply	other threads:[~2020-03-19  9:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19  9:26 [PULL v3 00/16] Linux user for 5.0 patches Laurent Vivier
2020-03-19  9:26 ` [PULL v3 01/16] target/i386: Renumber EXCP_SYSCALL Laurent Vivier
2020-03-19  9:26 ` [PULL v3 02/16] linux-user/i386: Split out gen_signal Laurent Vivier
2020-03-19  9:26 ` [PULL v3 03/16] linux-user/i386: Emulate x86_64 vsyscalls Laurent Vivier
2020-03-19  9:26 ` [PULL v3 04/16] linux-user: Add x86_64 vsyscall page to /proc/self/maps Laurent Vivier
2020-03-19  9:26 ` [PULL v3 05/16] linux-user: Flush out implementation of gettimeofday Laurent Vivier
2020-03-19  9:26 ` [PULL v3 06/16] linux-user: Add AT_EXECFN auxval Laurent Vivier
2020-03-19  9:26 ` [PULL v3 07/16] linux-user: do prlimit selectively Laurent Vivier
2020-03-19  9:26 ` [PULL v3 08/16] linux-user: fix socket() strace Laurent Vivier
2020-03-19  9:26 ` Laurent Vivier [this message]
2020-03-19  9:26 ` [PULL v3 10/16] linux-user: Protect more syscalls Laurent Vivier
2020-03-19  9:26 ` [PULL v3 11/16] linux-user/syscall: Add support for clock_gettime64/clock_settime64 Laurent Vivier
2020-03-19  9:26 ` [PULL v3 12/16] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel Laurent Vivier
2020-03-19  9:26 ` [PULL v3 13/16] scripts: add a script to generate syscall_nr.h Laurent Vivier
2020-03-19  9:26 ` [PULL v3 14/16] linux-user, aarch64: sync syscall numbers with kernel v5.5 Laurent Vivier
2020-03-19  9:26 ` [PULL v3 15/16] linux-user, nios2: " Laurent Vivier
2020-03-19  9:26 ` [PULL v3 16/16] linux-user, openrisc: " Laurent Vivier
2020-03-19 20:45 ` [PULL v3 00/16] Linux user for 5.0 patches Peter Maydell
2020-03-20  8:21   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200319092627.51487-10-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=yuanzi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).