tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: equivalent of MAP_32BIT

On Sun, May 26, 2013 at 03:41:55PM +0100, Justin Cormack wrote:
> I have been informed that there might be an undocumented ability to
> get mmap to return addresses in the lower 4G of address space on a 64
> bit machine by passing ~(unsigned)0 as the first parameter (or
> (1<<31)-1 for 2GB). Is this correct? Or is it possibley to use
> netbsd32_mmap()? Linux and some other OSs support a MAP_32BIT flag to
> achieve this, looking for a way to port some code to NetBSD that
> requires this.

Hmmm.... If adding a flag a MAP_BELOW would be more generally useful
than a MAP_32BIT.

With the current system call interface it isn't possible for a
64 bit userspace to make a 32 bit system call.


David Laight:

Home | Main Index | Thread Index | Old Index