From: Ralf Baechle <ralf@linux-mips.org>
To: David Daney <david.daney@cavium.com>
Cc: Joe Buehler <aspam@cox.net>, linux-mips@linux-mips.org
Subject: Re: using mprotect to write to .text
Date: Wed, 12 Oct 2011 00:17:35 +0100 [thread overview]
Message-ID: <20111011231735.GA19175@linux-mips.org> (raw)
In-Reply-To: <4E948E48.60205@cavium.com>
On Tue, Oct 11, 2011 at 11:43:20AM -0700, David Daney wrote:
> 1) cacheflush() clears all hazards.
More by accident than design - when I wrote the cacheflush syscall and
manpage in 1995 the term execution hazard barrier didn't yet exist in
manuals though the CPU behaviour was documented in the R4000 / R4600
manual of those days as a small number of pipeline cycles required to
handle. The return patch of the syscall was taking care of this
implicitly. And today the required R2 hazard barrier is provided by
the ERET instruction of the return path, so everything is fine.
But it may be worth updating the man page. A change every 15 years or
so isn't that bad ;-)
Ralf
prev parent reply other threads:[~2011-10-11 23:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 20:02 using mprotect to write to .text Joe Buehler
2011-10-11 16:36 ` David Daney
2011-10-11 17:31 ` Joe Buehler
2011-10-11 18:06 ` David Daney
2011-10-11 18:35 ` Joe Buehler
2011-10-11 18:43 ` David Daney
2011-10-11 23:17 ` Ralf Baechle [this message]
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=20111011231735.GA19175@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=aspam@cox.net \
--cc=david.daney@cavium.com \
--cc=linux-mips@linux-mips.org \
/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.