[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64
From: |
Laurent Vivier |
Subject: |
Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64 |
Date: |
Fri, 13 Mar 2020 22:45:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
Le 13/03/2020 à 01:28, Lirong Yuan a écrit :
> 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 <address@hidden>
> ---
> linux-user/mmap.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
> index 8685f02e7e..e378033797 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
>
Applied to my linux-user branch.
Thanks,
Laurent