lkml.org 
[lkml]   [2009]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [uClinux-dev] Re: [PATCH] FDPIC: respect PT_GNU_STACK exec markings when creating NOMMU stack
Date
On Thursday 03 December 2009 12:58:04 David Howells wrote:
> 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;
> }

probably want mm->brk + brk for the second argument
-mike
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-12-04 08:05    [W:0.056 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site