Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-09 Thread Alexander Best
John Baldwin schrieb am 2009-11-09: > On Saturday 07 November 2009 9:19:05 pm Alexander Best wrote: > > no problem. i've sent the final patch as followup to kern/71258 and > > also > > attached it to this message. to make it short. what's being changed > > by the > > patch: > > 1) if MAP_ANON is d

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-09 Thread John Baldwin
On Saturday 07 November 2009 9:19:05 pm Alexander Best wrote: > no problem. i've sent the final patch as followup to kern/71258 and also > attached it to this message. to make it short. what's being changed by the > patch: > > 1) if MAP_ANON is defined and offset !=0 > return EINVAL > 2) if

mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-07 Thread Alexander Best
no problem. i've sent the final patch as followup to kern/71258 and also attached it to this message. to make it short. what's being changed by the patch: 1) if MAP_ANON is defined and offset !=0 > return EINVAL 2) if MAP_STACK is defined and offset !=0 > offset = 0 would be great if

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread Alexander Best
Alan Cox schrieb am 2009-11-04: > Ed Schouten wrote: > >* Alan Cox wrote: > For what it's worth, I believe that Solaris does the exact opposite. > >>They provide MAP_ANONYMOUS for compatibility. It seems like a good > >>idea for us to do the same. > >Something like this? > >Index: mman.h > >=

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread Alan Cox
Ed Schouten wrote: * Alan Cox wrote: For what it's worth, I believe that Solaris does the exact opposite. They provide MAP_ANONYMOUS for compatibility. It seems like a good idea for us to do the same. Something like this? Index: mman.h ===

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread Ed Schouten
* Alan Cox wrote: > For what it's worth, I believe that Solaris does the exact opposite. > They provide MAP_ANONYMOUS for compatibility. It seems like a good > idea for us to do the same. Something like this? Index: mman.h === ---

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread Alan Cox
Ed Schouten wrote: * John Baldwin wrote: Note that the spec doesn't cover MAP_ANON at all FWIW. Yes. I've noticed Linux also uses MAP_ANONYMOUS instead of MAP_ANON. They do provide MAP_ANON for compatibility, if I remember correctly. For what it's worth, I believe that Solaris d

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread Ed Schouten
* John Baldwin wrote: > Note that the spec doesn't cover MAP_ANON at all FWIW. Yes. I've noticed Linux also uses MAP_ANONYMOUS instead of MAP_ANON. They do provide MAP_ANON for compatibility, if I remember correctly. -- Ed Schouten WWW: http://80386.nl/ pgpxciIJov3Hf.pgp Description: PGP s

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-04 Thread John Baldwin
On Tuesday 03 November 2009 12:24:52 pm Ed Schouten wrote: > Hi Alan, > > * Alan Cox wrote: > > The standards for mmap(2) actually disallow values of "off" that are not a > > multiple of the page size. > > > > See http://www.opengroup.org/onlinepubs/95399/functions/mmap.html for > > the foll

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-03 Thread Alexander Best
Alexander Best schrieb am 2009-11-03: > Alexander Best schrieb am 2009-11-03: > > John Baldwin schrieb am 2009-11-03: > > > On Monday 02 November 2009 5:14:27 pm Alexander Best wrote: > > > > John Baldwin schrieb am 2009-11-02: > > > > > On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: >

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-03 Thread Ed Schouten
Hi Alan, * Alan Cox wrote: > The standards for mmap(2) actually disallow values of "off" that are not a > multiple of the page size. > > See http://www.opengroup.org/onlinepubs/95399/functions/mmap.html for > the following: > Just by accident I saw they changed that behaviour in a newer ve

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-03 Thread Alexander Best
Alexander Best schrieb am 2009-11-03: > John Baldwin schrieb am 2009-11-03: > > On Monday 02 November 2009 5:14:27 pm Alexander Best wrote: > > > John Baldwin schrieb am 2009-11-02: > > > > On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: > > > > > John Baldwin schrieb am 2009-11-02: > >

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-03 Thread Alexander Best
John Baldwin schrieb am 2009-11-03: > On Monday 02 November 2009 5:14:27 pm Alexander Best wrote: > > John Baldwin schrieb am 2009-11-02: > > > On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: > > > > John Baldwin schrieb am 2009-11-02: > > > > > On Friday 30 October 2009 10:38:24 pm Ale

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-03 Thread John Baldwin
On Monday 02 November 2009 5:14:27 pm Alexander Best wrote: > John Baldwin schrieb am 2009-11-02: > > On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: > > > John Baldwin schrieb am 2009-11-02: > > > > On Friday 30 October 2009 10:38:24 pm Alexander Best wrote: > > > > > John Baldwin schr

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-02 Thread Alexander Best
John Baldwin schrieb am 2009-11-02: > On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: > > John Baldwin schrieb am 2009-11-02: > > > On Friday 30 October 2009 10:38:24 pm Alexander Best wrote: > > > > John Baldwin schrieb am 2009-10-21: > > > > > On Wednesday 21 October 2009 11:51:04 am

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-02 Thread John Baldwin
On Monday 02 November 2009 4:05:56 pm Alexander Best wrote: > John Baldwin schrieb am 2009-11-02: > > On Friday 30 October 2009 10:38:24 pm Alexander Best wrote: > > > John Baldwin schrieb am 2009-10-21: > > > > On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > > > > > although the m

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-02 Thread Alexander Best
John Baldwin schrieb am 2009-11-02: > On Friday 30 October 2009 10:38:24 pm Alexander Best wrote: > > John Baldwin schrieb am 2009-10-21: > > > On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > > > > although the mmap(2) manual states in section MAP_ANON: > > > > "The offset argumen

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-11-02 Thread John Baldwin
On Friday 30 October 2009 10:38:24 pm Alexander Best wrote: > John Baldwin schrieb am 2009-10-21: > > On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > > > although the mmap(2) manual states in section MAP_ANON: > > > > "The offset argument is ignored." > > > > this doesn't seem to

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-10-30 Thread Alexander Best
John Baldwin schrieb am 2009-10-21: > On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > > although the mmap(2) manual states in section MAP_ANON: > > "The offset argument is ignored." > > this doesn't seem to be true. running > > printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NON

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-10-22 Thread Ben Crowhurst
Alan Cox wrote: On Wed, Oct 21, 2009 at 10:51 AM, Alexander Best < alexbes...@math.uni-muenster.de> wrote: although the mmap(2) manual states in section MAP_ANON: "The offset argument is ignored." this doesn't seem to be true. running printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE,

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-10-21 Thread John Baldwin
On Wednesday 21 October 2009 11:51:04 am Alexander Best wrote: > although the mmap(2) manual states in section MAP_ANON: > > "The offset argument is ignored." > > this doesn't seem to be true. running > > printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -1, > 0x12345678)); > > an

Re: mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-10-21 Thread Alan Cox
On Wed, Oct 21, 2009 at 10:51 AM, Alexander Best < alexbes...@math.uni-muenster.de> wrote: > although the mmap(2) manual states in section MAP_ANON: > > "The offset argument is ignored." > > this doesn't seem to be true. running > > printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -

mmap(2) with MAP_ANON honouring offset although it shouldn't

2009-10-21 Thread Alexander Best
although the mmap(2) manual states in section MAP_ANON: "The offset argument is ignored." this doesn't seem to be true. running printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -1, 0x12345678)); and printf("%p\n", mmap((void*)0x1000, 0x1000, PROT_NONE, MAP_ANON, -1, 0)); produc