linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Alan Modra <amodra@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: ppc64 sbrk returns executable heap in 32-bit emulation mode
Date: Mon, 16 May 2016 18:27:24 +0200	[thread overview]
Message-ID: <92af6d3d-b55e-af9d-4a71-2014490eeabd@redhat.com> (raw)
In-Reply-To: <m2shxiwerp.fsf@linux-m68k.org>

On 05/16/2016 11:09 AM, Andreas Schwab wrote:
> Florian Weimer <fweimer@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

      reply	other threads:[~2016-05-16 16:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 13:41 ppc64 sbrk returns executable heap in 32-bit emulation mode Florian Weimer
2016-05-16  6:24 ` Alan Modra
2016-05-16  8:51   ` Florian Weimer
     [not found] ` <20160516062425.GA24091__32035.8907142237$1463379977$gmane$org@bubble.grove.modra.org>
2016-05-16  8:49   ` Andreas Schwab
2016-05-16  8:59     ` Florian Weimer
2016-05-16  9:09       ` Andreas Schwab
2016-05-16 16:27         ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92af6d3d-b55e-af9d-4a71-2014490eeabd@redhat.com \
    --to=fweimer@redhat.com \
    --cc=amodra@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).