[PATCH] Allow exec on 32-bit from readable, non-exec pages, with a warning.
Paul Mackerras
paulus at samba.org
Wed Jul 11 11:02:57 EST 2007
Segher Boessenkool writes:
> >> Yeah. Giving the warning is a good thing though.
> >
> > No, it isn't; it's just noise, if we're not ever going to do anything
> > to prevent the behaviour - and we can't.
>
> The same userland code will not run correctly on PPC64 or BookE
> systems. Is that not a reason to warn?
It *will* run on ppc64 systems, because there we get the
READ_IMPLIES_EXEC personality flag set via the elf_read_implies_exec
thing in include/asm-powerpc/elf.h. The READ_IMPLIES_EXEC flag is
only set if we don't have the non-executable stack note in the ELF
header, i.e. only for old binaries or libraries.
As for Book E, that could be fixed using elf_read_implies_exec too, if
anyone cared. In fact maybe the correct solution is to have
#define elf_read_implies_exec(ex, exec_stk) \
(exec_stk != EXSTACK_DISABLE_X) : 0)
for all 32-bit powerpc.
Paul.
More information about the Linuxppc-dev
mailing list