🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fa.netbsd.tech.kern
Article #122

Re: equivalent of MAP_32BIT

#122
From: David Laight
Date: Tue, 28 May 2013 07:08
19 lines
2455 bytes
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

-- 
David Laight: david@l8s.co.uk
Technical Details
Message-ID: <fa.R3E3x2CsYhlxFBCOWOFG10/DEy8@ifi.uio.no>
Path: arc1-ca.pugleaf.net!d5ni18030pbl.0!nntp.google.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mail
References: <fa.Sxbi1y2U7NfWhxooWVNWVMH9cDU@ifi.uio.no>

Show Full Headers
Complete Article Headers
X-Google-Thread: b7e13b6095,dcb504ca0aebd161,start
X-Google-Attributes: gidb7e13b6095,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.66.176.49 with SMTP id cf17mr3087913pac.27.1369724939091;
        Tue, 28 May 2013 00:08:59 -0700 (PDT)
Path: arc1-ca.pugleaf.net!d5ni18030pbl.0!nntp.google.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mail
From: David Laight <david@l8s.co.uk>
Newsgroups: fa.netbsd.tech.kern
Subject: Re: equivalent of MAP_32BIT
Date: Tue, 28 May 2013 07:08:58 UTC
Organization: Internet mailing list
Lines: 19
Sender: tech-kern-owner@NetBSD.org
Message-ID: <fa.R3E3x2CsYhlxFBCOWOFG10/DEy8@ifi.uio.no>
References: <fa.Sxbi1y2U7NfWhxooWVNWVMH9cDU@ifi.uio.no>
NNTP-Posting-Host: mail-jess.uio.no
Mime-Version: 1.0
X-Trace: readme.uio.no 1369724938 26857 129.240.7.9 (28 May 2013 07:08:58 GMT)
X-Complaints-To: abuse@uio.no
NNTP-Posting-Date: Tue, 28 May 2013 07:08:58 +0000 (UTC)
User-Agent: Mutt/1.4.2.1i
Cc: tech-kern@netbsd.org
To: Justin Cormack <justin@specialbusservice.com>
Delivered-To: tech-kern@netbsd.org
X-Virus-Scanned: amavisd-new at NetBSD.org
Mail-Followup-To: Justin Cormack <justin@specialbusservice.com>,
 tech-kern@netbsd.org
In-Reply-To: <CAK4o1Wx7PhTzpDBSCpidbLzbH_uGywPq6J8vX+fXpocS=kuX_A@mail.gmail.com>
List-Id: tech-kern.NetBSD.org
Original-Date: Tue, 28 May 2013 08:21:02 +0100
Original-Message-Id: <20130528072102.GY24004@snowdrop.l8s.co.uk>
Original-References: <CAK4o1Wx7PhTzpDBSCpidbLzbH_uGywPq6J8vX+fXpocS=kuX_A@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline