linux-mips
[Top] [All Lists]

using mprotect to write to .text

To: linux-mips@linux-mips.org
Subject: using mprotect to write to .text
From: Joe Buehler <aspam@cox.net>
Date: Mon, 10 Oct 2011 20:02:39 +0000 (UTC)
Sender: linux-mips-bounce@linux-mips.org
User-agent: Loom/3.14 (http://gmane.org/)
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



<Prev in Thread] Current Thread [Next in Thread>