[Top] [All Lists]

using mprotect to write to .text

Subject: using mprotect to write to .text
From: Joe Buehler <>
Date: Mon, 10 Oct 2011 20:02:39 +0000 (UTC)
User-agent: Loom/3.14 (
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 and if
it matters.

Joe Buehler

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