delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/03/11:32:28

X-Spam-Check-By: sourceware.org
Message-ID: <43E38584.5040708@equate.dyndns.org>
Date: Fri, 03 Feb 2006 16:32:04 +0000
From: Chris Taylor <chris AT equate DOT dyndns DOT org>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Debian Thunderbird 1.0.7 (X11/20051017)
MIME-Version: 1.0
To: Dave Bodenstab <dave AT bodenstab DOT org>
CC: cygwin AT cygwin DOT com
Subject: Re: Possible bug with mmap on XP?
References: <200602031623 DOT k13GN9mF029768 AT base686 DOT home DOT org>
In-Reply-To: <200602031623.k13GN9mF029768@base686.home.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave Bodenstab wrote:
> On Thu Feb  2 22:55:08 2006 Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote:
> 
> 
>>>Is this the way things are supposed to work on XP?
>>
>>This is a constraint of the underlying OS, yes.  The old implementation
>>of mmap used up to 1.5.18 didn't support PROT_EXEC at all, it was just
>>fake.  Since 1.5.19, PROT_EXEC mapping is now supported correctly, which
>>means, the underlying NT functions are called requesting PAGE_EXECUTE
>>protection.
>>
>>But here's the problem.  To create file mappings with PAGE_EXECUTE
>>protection, the file must be opened with GENERIC_EXECUTE access. 
>>This is done internally in mmap, but it fails if the file doesn't
>>have the execute permission set.
>>
>>Whether or not this behaviour is backed by SUSv3, I'm not sure.  SUSv3
>>states "if an implementation cannot support the combination of access
>>types specified by prot, the call to mmap() shall fail.", so here's one
>>situation in which the implementation can't support the combination of
>>access types specified by prot.
> 
> 
> OK.
> 
> I would like to modify my program to set the required permissions.
> Is the mapping between Cygwin's uname()'s sysname and XP, NT, 98SE,
> 98, etc. available somewhere?  Actually, if I could just tell if the
> underlying windows is XP, that would be sufficient I think.  
> 
> Thanks.
> 
> 

XP == NT_5.1
2k == NT_5.0
98 == 4.10
95 == 4.0 (I believe)

I don't know what WinME is, and I don't particularly wish to either.
I /suspect/ that NT4 is likely to be NT_4.0, but this may have changed 
with the later service packs (doubtful though, in my opinion). I don't 
have an nt4 box to verify this with however.


Chris

-- 

Spinning complacently in the darkness, covered and blinded by a blanket
of little lives, false security has lulled the madness of this world
into a slumber. Wake up! An eye is upon you, staring straight down and
keenly through, seeing all that you are and everything that you will
never be. Yes, an eye is upon you, an eye ready to blink. So face
forward, with arms wide open and mind reeling. Your future has
arrived... Are you ready to go?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019