All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alexander Graf <agraf@suse.de>
Cc: Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap
Date: Mon, 7 May 2012 13:15:46 +0100	[thread overview]
Message-ID: <CAFEAcA-RNcJLscSukvFSZ0nrO9vD-umn-QBeG=YN7mwua_HZYg@mail.gmail.com> (raw)
In-Reply-To: <BA0ED813-AF4C-4FB4-AEFB-CB1B802DF76D@suse.de>

On 7 May 2012 12:38, Alexander Graf <agraf@suse.de> wrote:
> And the below patch on top of my revised patch fixes it.
> The question is whether we still need to flush on mmap() then?

IIRC the kernel will let you MAP_FIXED mmap a file to an
address that's already mmap'd for something else without
having to munmap the previous mapping. So yes, we still
need to flush on mmap I think.

Also I think you need mprotect() for the case of:
  mmap(...,PROT_EXEC)
  execute
  mprotect(not PROT_EXEC)
  try to execute again

-- PMM

  reply	other threads:[~2012-05-07 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  9:30 [Qemu-devel] [PATCH] linux-user: Fix stale tbs after mmap Alexander Graf
2012-05-07 10:37 ` Peter Maydell
2012-05-07 10:58   ` Alexander Graf
2012-05-07 11:07   ` Alexander Graf
2012-05-07 11:32   ` Alexander Graf
2012-05-07 11:38     ` Alexander Graf
2012-05-07 12:15       ` Peter Maydell [this message]
2012-05-11 15:46       ` Peter Maydell
2012-05-11 16:00         ` Alexander Graf
2012-05-11  8:40 Alexander Graf
2012-05-11 16:25 ` Peter Maydell

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='CAFEAcA-RNcJLscSukvFSZ0nrO9vD-umn-QBeG=YN7mwua_HZYg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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.