Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160310164515.GN9349@brightrain.aerifal.cx>
Date: Thu, 10 Mar 2016 11:45:15 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Memory management, how to protect some address space.

On Thu, Mar 10, 2016 at 10:22:52AM +0200, John Found wrote:
> I am using 32bit MUSL for some of my projects, together with SQLite library compiled with MUSL as well.
> 
> While running on 64 bit Linux, it sometimes allocates memory on addresses above 0xc0000000. 
> But in my application this area (up to the end of the 4GB addressing space) is reserved for special purposes and should never be allocated.
> 
> How to make MUSL to work this way?
> Should I recompile MUSL (other libraries) with such option or maybe there is some run-time way to make the same thing?

This is not musl-specific; Linux always does that for 32-bit x86
binaries running on a 64-bit kernel. You can either run on a 32-bit
kernel or set the ADDR_LIMIT_3GB personality() flag when running your
program. Assuming part of the address space is not used is not a
portable assumption to make, though.

Rich

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.