All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <chengang@emindsoft.com.cn>
To: Laurent Vivier <laurent@vivier.eu>, riku.voipio@iki.fi
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Notice about lock bitmask translation for fcntl
Date: Mon, 21 Dec 2015 10:47:29 +0800	[thread overview]
Message-ID: <56776841.2060003@emindsoft.com.cn> (raw)
In-Reply-To: <5673E459.7030901@emindsoft.com.cn>


On 2015年12月18日 18:47, Chen Gang wrote:
> 
> On 2015年12月18日 17:41, Laurent Vivier wrote:
>>
>> Le 18/12/2015 07:51, Chen Gang a écrit :

[...]

>>>
>>> +++ b/linux-user/mmap.c
>>> @@ -567,6 +567,10 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
>>>      printf("\n");
>>>  #endif
>>>      tb_invalidate_phys_range(start, start + len);
>>> +    if ((prot & PROT_WRITE) && (flags & MAP_ANONYMOUS)
>>> +        && ((flags & MAP_PRIVATE) || (fd == -1))) {
>>> +        memset(g2h(start), 0, len);
>>> +    }
>>
>> IMHO, their kernel needs a fix, mmap(2):
>>
>> MAP_ANONYMOUS
>>         The mapping is not backed by any file; its contents are initial‐
>>         ized to zero.
>>

Oh, sorry, after check again, it is not kernel's issue: mmap() will
always zero the ANONYMOUS memory for kernel 3.8 in sw_64 arch.

It is still our qemu's issue in mmap_frag (do not zero ANONYMOUS memory
fragments), so I sent patch v2 for it, please help check.

Thanks.

> 
> OK, Thanks.
> 
> 

-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2015-12-21  2:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  6:26 [Qemu-devel] [PATCH] linux-user/syscall.c: Notice about lock bitmask translation for fcntl Chen Gang
2015-12-18  6:51 ` Chen Gang
2015-12-18  9:41   ` Laurent Vivier
2015-12-18 10:47     ` Chen Gang
2015-12-21  2:47       ` Chen Gang [this message]
2015-12-18  9:37 ` Laurent Vivier
2015-12-18 21:40   ` Chen Gang
2015-12-18 21:58     ` Laurent Vivier
2015-12-18 22:12       ` Chen Gang
2015-12-18 22:15         ` Laurent Vivier
2015-12-18 22:31           ` Chen Gang

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=56776841.2060003@emindsoft.com.cn \
    --to=chengang@emindsoft.com.cn \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.