All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
	Greg Ungerer <gerg@uclinux.org>,
	uclinux-dist-devel@blackfin.uclinux.org,
	David McCullough <davidm@snapgear.com>,
	uClinux development list <uclinux-dev@uclinux.org>
Subject: Re: [uClinux-dev] Re: [PATCH] FDPIC: respect PT_GNU_STACK exec markings when creating NOMMU stack
Date: Thu, 03 Dec 2009 17:58:04 +0000	[thread overview]
Message-ID: <16680.1259863084@redhat.com> (raw)
In-Reply-To: <8bd0f97a0912021329y7be05434wc9c39d383bfb7ce4@mail.gmail.com>

Mike Frysinger <vapier.adi@gmail.com> wrote:

> i have seen a few apps use brk()/sbrk() to query the size of things (like
> e2fsprogs)

We do actually record the size of the brk segment, so maybe we could icache
flush brk as it is increased (if it is increased):

	diff --git a/mm/nommu.c b/mm/nommu.c
	index 3754b16..2ea823d 100644
	--- a/mm/nommu.c
	+++ b/mm/nommu.c
	@@ -432,6 +432,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
		/*
		 * Ok, looks good - let it rip.
		 */
	+	flush_icache_range(mm->brk, brk);
		return mm->brk = brk;
	 }

It might also be worth making the availability of brk() a config option under
NOMMU.

> > Probably VM_DATA_DEFAULT_FLAGS should not include VM_EXEC for either
> > Blackfin or FRV, but it may be required for SH.  The if-statement that
> > calls elf_read_implies_exec() will be optimised away unless the arch
> > specifically sets it (which none of FRV, Blackfin or SH do).
> 
> while true, wont the later personality test (in VM_DATA_DEFAULT_FLAGS)
> be left there ?  guess it's not that big of a deal.

I think we could justify altering FRV and Blackfin to get rid of that test,
since we don't make use of read-implies-exec in those arches, but I think that
should be a separate patch.

David

  reply	other threads:[~2009-12-03 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-28 15:24 [PATCH] FDPIC: respect PT_GNU_STACK exec markings when creating NOMMU stack Mike Frysinger
2009-11-28 18:47 ` [uClinux-dev] " Mike Frysinger
2009-12-02 13:44 ` David Howells
2009-12-02 21:29   ` [uClinux-dev] " Mike Frysinger
2009-12-03 17:58     ` David Howells [this message]
2009-12-04  7:07       ` Mike Frysinger
2009-12-04  9:40         ` David Howells
2009-12-04 10:26           ` Mike Frysinger

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=16680.1259863084@redhat.com \
    --to=dhowells@redhat.com \
    --cc=davidm@snapgear.com \
    --cc=gerg@uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dev@uclinux.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier.adi@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.