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

Alexander Best alexbestms at wwu.de
Mon Nov 9 15:57:54 UTC 2009


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 defined and offset !=0  ====>  return EINVAL
> > 2) if MAP_STACK is defined and offset !=0   ====>  offset = 0

> > would be great if you could have a look at the patch if you've got
> > a spare
> > minute.

> I didn't think 2) changed?  I.e. both the old and new code do this,
> so only 1)
> is changing?

you're right sorry about that mistake. so the only aspect of mmap() the patch
changes is:

if MAP_ANON is defined and offset !=0  ====>  return EINVAL

cheers.
alex


More information about the freebsd-hackers mailing list