From: Richard Henderson <richard.henderson@linaro.org>
To: Andreas Schwab <schwab@suse.de>, Laurent Vivier <laurent@vivier.eu>
Cc: Helge Deller <deller@gmx.de>, qemu-devel@nongnu.org
Subject: Re: [PATCH] linux-user: make sure brk(0) returns a page-aligned value
Date: Sat, 8 Jul 2023 18:26:33 +0100 [thread overview]
Message-ID: <0110c2c4-e9de-a2d0-5c0a-6831415beb9f@linaro.org> (raw)
In-Reply-To: <mvmpm55qnno.fsf@suse.de>
On 7/6/23 12:34, Andreas Schwab wrote:
> Fixes: 86f04735ac ("linux-user: Fix brk() to release pages")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> linux-user/syscall.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 08162cc966..e8a17377f5 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -805,7 +805,7 @@ static abi_ulong brk_page;
>
> void target_set_brk(abi_ulong new_brk)
> {
> - target_brk = new_brk;
> + target_brk = TARGET_PAGE_ALIGN(new_brk);
> brk_page = HOST_PAGE_ALIGN(target_brk);
> }
>
It make sense, since that's how do_brk aligns things.
I'm curious why this error might have produced host memory clobbering, but I'm not going
to debug that.
Queuing for tcg/linux-user.
r~
next prev parent reply other threads:[~2023-07-08 17:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 11:34 [PATCH] linux-user: make sure brk(0) returns a page-aligned value Andreas Schwab
2023-07-08 17:26 ` Richard Henderson [this message]
2023-07-08 21:36 ` Helge Deller
2023-07-09 6:12 ` Helge Deller
2023-07-12 20:40 ` Helge Deller
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=0110c2c4-e9de-a2d0-5c0a-6831415beb9f@linaro.org \
--to=richard.henderson@linaro.org \
--cc=deller@gmx.de \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=schwab@suse.de \
/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).