From: Laurent Vivier <laurent@vivier.eu>
To: Tobias Koch <tobias.koch@nonterra.com>, qemu-devel@nongnu.org
Cc: riku.voipio@iki.fi
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 [thread overview]
Message-ID: <d643f0d0-d5e7-d1f3-d3e2-7d62661774e8@vivier.eu> (raw)
In-Reply-To: <20200305210534.28392-1-tobias.koch@nonterra.com>
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
next prev parent reply other threads:[~2020-05-07 14:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 21:05 [PATCH] linux-user: mremap fails with EFAULT if address range overlaps with stack guard Tobias Koch
2020-05-07 14:35 ` Laurent Vivier [this message]
2020-06-15 7:17 ` Tobias Koch
2020-06-15 20:28 ` Tobias Koch
2020-06-15 21:10 ` Tobias Koch
2020-07-04 14:44 ` Tobias Koch
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=d643f0d0-d5e7-d1f3-d3e2-7d62661774e8@vivier.eu \
--to=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=tobias.koch@nonterra.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).