ppc64 sbrk returns executable heap in 32-bit emulation mode
Florian Weimer
fweimer at redhat.com
Tue May 17 02:27:24 AEST 2016
On 05/16/2016 11:09 AM, Andreas Schwab wrote:
> Florian Weimer <fweimer at redhat.com> writes:
>
>> But my test says that at least part of .bss in the main executable is
>> *not* executable.
>
> Build with -mbss-plt -Wl,--bss-plt.
This gives me:
FAIL exec .bss data (unexpected result)
FAIL exec .data (unexpected result)
FAIL exec malloc (small) (unexpected result)
FAIL exec malloc (page size) (unexpected result)
And this is somewhat expected: There is an RWX LOAD segment which covers
.bss and .data, and it also overlaps with the heap.
So maybe we can change the kernel heap default in case there is no RWX
LOAD segment, so that most binaries get a non-executable heap? What do
you think?
Thanks,
Florian
More information about the Linuxppc-dev
mailing list