Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Joe Buehler <aspam@cox.net>
To: linux-mips@linux-mips.org
Subject: using mprotect to write to .text
Date: Mon, 10 Oct 2011 20:02:39 +0000 (UTC)	[thread overview]
Message-ID: <loom.20111010T215444-70@post.gmane.org> (raw)

I intend to use mprotect in a running binary to allow it to modify its .text
section.  The detailed behavior of mprotect for a multithreaded program on SMP
hardware is not documented as far as I can tell.

Can I depend on the LINUX mprotect call to take care of icache flushing,
handling of hazards, etc.?  I am using Octeon CN5650 on 2.6.21.7 and 2.6.27.7 if
it matters.

Joe Buehler

             reply	other threads:[~2011-10-11 10:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 20:02 Joe Buehler [this message]
2011-10-11 16:36 ` using mprotect to write to .text 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

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=loom.20111010T215444-70@post.gmane.org \
    --to=aspam@cox.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox