Kernel related (?) user space crash at ARM11 MPCore

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Sep 21 04:41:55 EDT 2009


On Mon, Sep 21, 2009 at 09:31:09AM +0100, Jamie Lokier wrote:
> I'm not able to tell from this thread, and I don't have the hardware
> to test either:
> 
> I have some userspace ARM code which modifies instructions and data
> used by those instructions in a few pages, using mprotect() to make
> them writable, modify, and make them PROT_READ|PROT_EXEC again.
> 
> There is no execution of the modified code _during_ the modification,
> only afterwards.

We've had a syscall to handle the cache issues to do with self
modifying code - __ARM_NR_cacheflush.  See the comments associated
with 'cacheflush' in arch/arm/kernel/traps.c about how to use it.
This is the situation which the syscall was designed to address back
in the 1990s.



More information about the linux-arm-kernel mailing list