title: Does mprotect flush the instruction cache on ARM Linux?
body: <p>I am writing a JIT on ARM Linux that executes an instruction set that contains self-modifying code. The instruction set does not have any cache flush instructions (similar to x86 in that respect).</p>
  
  <p>If I write out some code to a page and then call <code>mprotect</code> on that page, is that sufficient to invalidate the instruction cache? Or do I also need to use the <code>cacheflush</code> syscall on those pages?</p>