Re: [PATCH] PPC64 Implement non-executable stacks

From: Andrew Morton
Date: Thu Mar 17 2005 - 06:36:54 EST


Paul Mackerras <paulus@xxxxxxxxx> wrote:
>
> This patch, by Jake Moilanen with some further hacking from me, adds a
> real execute permission bit to the linux PTEs on PPC64, and connects
> that into the kernel infrastructure for implementing non-executable
> stacks and heaps. This means that on any PPC64 cpu since the POWER4
> (i.e. POWER4, PPC970, PPC970FX, POWER4+, POWER5) you will get a
> segfault if you try to execute instructions from a region that doesn't
> have PROT_EXEC permission. The patch also marks the pages of the
> linear mapping that aren't part of the kernel text as non-executable.
>
> Andrew and Linus, could you try this on your G5s?

Seems to work OK under ydl 4.0. OpenOffice hung once starting up, but that
wasn't repeatable.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/