qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] linux-user: mremap fails with EFAULT if address range overla


From: Laurent Vivier
Subject: Re: [PATCH] linux-user: mremap fails with EFAULT if address range overlaps with stack guard
Date: Thu, 7 May 2020 16:35:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Le 05/03/2020 à 22:05, Tobias Koch a écrit :
> If the address range starting at old_address overlaps with the stack guard it
> is invalid and mremap must fail with EFAULT. The musl c library relies on this
> behavior to detect the stack size, which it does by doing consecutive mremaps
> until it hits the stack guard. Without this patch, software (such as the Ruby
> interpreter) that calls pthread_getattr_np under musl will crash on 32 bit
> targets emulated on a 64 bit host.

Could you share some pointers to the code that is doing this?

We have already this kind of code in linux-user/elfload.c,
setup_arg_pages(): could you check why it doesn't work?

Thanks,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]