Data Execution Prevention

Russell King - ARM Linux linux at
Tue Jun 28 05:46:50 EDT 2011

On Tue, Jun 28, 2011 at 11:06:37AM +0200, Daniel Himmelein wrote:
> I wrote a simple data execution prevention (DEP) test to check if my
> DEP patch for ARM Linux is working and to also check the PaX patch.
> This worked pretty fine, but my test program crashes with a SIGSEGV in
> 50% of the test runs. In the other cases the tests work perfectly.
> I don't know why my test does not always succeed. I already tried to
> clear the instruction cache. But this did not help either.

How did you try to do that?

> I tried the same on the x86. There it does always work perfectly. But
> it also has a common instruction and data cache. Maybe that has to do
> with the problem.

You are correct.

On ARM, you need to use the cacheflush kernel syscall to ensure that
data written is visible to the instruction stream due to the cache

More information about the linux-arm mailing list