Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 11 Mar 2016 00:20:45 +0200
From: John Found <johnfound@...32.info>
To: musl@...ts.openwall.com
Subject: Re: Memory management, how to protect some address space.

On Thu, 10 Mar 2016 15:20:50 -0500
Rich Felker <dalias@...c.org> wrote:

> On Thu, Mar 10, 2016 at 09:23:02PM +0200, John Found wrote:
> > On Thu, 10 Mar 2016 14:11:03 -0500
> > Rich Felker <dalias@...c.org> wrote:
> > 
> > > The proper way to use personality() is before exec'ing your program.
> > > The stack address and some spare memory that musl re-uses as heap get
> > > assigned at exec time before you can do anything within your program
> > > to prevent that from happening. In theory that could happen with glibc
> > > too; if it doesn't you're just getting lucky.
> > > 
> > > Rich
> > 
> > Hm, isn't it paragraph 22? sys_personality changes the personality
> > of the calling process.
> > How to call it *before* executing program???
> 
> exec does not make a new process; it replaces the program running in
> the current process with a new one. There's actually a command line
> too (I forget the name) to run a program with a particular personality
> that calls personality() before execve().
> 
> Rich

Yes, indeed, execve is what I needed. Thanks!

-- 
http://fresh.flatassembler.net
http://asm32.info
John Found <johnfound@...32.info>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.