Re: [PATCH 1/2] No-exec support for ppc64

Paul Mackerras
2005-03-14T22:24:05Z

Jake Moilanen writes:

> > I don't think I can push that upstream. What happens if you leave
> > that out?
>
> The bss and the plt are in the same segment, and plt obviously needs to
> be executable.

Yes... what I was asking was "do things actually break if you leave
that out, or does the binfmt_elf loader honour the 'x' permission on
the PT_LOAD entry for the data/bss region, meaning that it all just
works anyway?"

I did an objdump -p on some random 32-bit binaries, and they all have
"rwx" flags on the data/bss segment (the second PT_LOAD entry). And
when I look in /proc/<pid>/maps, it seems that the heap is in fact
marked executable (this is without your patch). So why do we need the
hack in binfmt_elf.c?

Paul.