linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Albert Cahalan" <acahalan@gmail.com>
To: "Paul Mackerras" <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org,
	debian-powerpc <debian-powerpc@lists.debian.org>
Subject: Re: [PATCH] no-execute -- please test
Date: Mon, 14 Aug 2006 00:33:30 -0400	[thread overview]
Message-ID: <787b0d920608132133g6e052fah4df23fcf81a71e6d@mail.gmail.com> (raw)
In-Reply-To: <17631.62940.63888.908937@cargo.ozlabs.ibm.com>

On 8/14/06, Paul Mackerras <paulus@samba.org> wrote:
> Albert Cahalan writes:
>
> > If you want heap protection, change VM_DATA_DEFAULT_FLAGS32
> > in include/asm-powerpc/page.h to be like VM_STACK_DEFAULT_FLAGS.
> > I'd love to hear if anybody can get X to start with this change.
>
> In general I would expect dynamically-linked programs to fail unless
> you compile everything with gcc -msecure-plt.

I wouldn't, unless they are also buggy. The PLT should be
marked for full rwx permissions. Enforcing W^X is another
matter entirely of course.

For me, X is the only observed failure with that extra change.
I successfully got to a console, did a bit of exploring at the
command prompt, watched X go to the stiple background
before shutting down in an orderly fashion, and rebooted.
Perhaps do_brk could get a third argument to specify the
caller, so that VM_EXEC could be cleared for some callers.
Then again, pretending to be a Vista developer, I could just
have the kernel recognize the buggy X server.

Other notes:

For maximum benefit, shared objects should be built such
that the executable part can be mapped without any
relation to the other parts. The next best thing would be
to have the executable parts start 256 MiB above where
the other parts start. This allows randomization to be
added without causing loss of no-execute capability.

We need a new gcc default: -msecure-plt -pie -fPIE

  reply	other threads:[~2006-08-14  4:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-14  3:20 [PATCH] no-execute -- please test Albert Cahalan
2006-08-14  4:00 ` Paul Mackerras
2006-08-14  4:41   ` Albert Cahalan
2006-08-14 23:34     ` Paul Mackerras
2006-08-16 23:55       ` Benjamin Herrenschmidt
2006-08-20 17:48   ` Albert Cahalan
2006-08-14  4:02 ` Paul Mackerras
2006-08-14  4:33   ` Albert Cahalan [this message]
2006-08-14  8:46   ` Andreas Schwab
2006-08-14  9:19 ` Michel Dänzer
2006-08-14 16:02   ` Albert Cahalan
2006-08-14 16:08   ` Albert Cahalan
2006-08-14 16:20     ` Michel Dänzer
2006-08-19  3:47       ` Albert Cahalan

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=787b0d920608132133g6e052fah4df23fcf81a71e6d@mail.gmail.com \
    --to=acahalan@gmail.com \
    --cc=debian-powerpc@lists.debian.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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).