NetBSD-Bugs archive

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

Re: kern/53474: mmap get anon execuable memory return MAP_FAILED



The following reply was made to PR kern/53474; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/53474: mmap get anon execuable memory return MAP_FAILED
Date: Thu, 26 Jul 2018 22:53:23 +0200

 On Thu, Jul 26, 2018 at 02:25:00PM +0000, Martin Husemann wrote:
 > The following reply was made to PR kern/53474; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: kern/53474: mmap get anon execuable memory return MAP_FAILED
 > Date: Thu, 26 Jul 2018 16:22:53 +0200
 > 
 >  On Thu, Jul 26, 2018 at 02:15:00PM +0000, zh_jq%outlook.com@localhost wrote:
 >  >         void *retval = mmap(NULL, 4096, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
 >  
 >  You can not create writable + executable mappings when pax mprotect is
 >  active (which is the default on many architectures). See mremap(2).
 
 Also, this has nothing to do with MAP_ANON.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index