Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2007 11:29:10 +0100
From:      Martin Kammerhofer <dada@sbox.tugraz.at>
To:        kmacy@FreeBSD.org
Cc:        alc@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: kern/71258: [vm] [patch] anonymous mmappings not always page aligned
Message-ID:  <20071117112910.156623xlukumke4k@webmail.tugraz.at>
In-Reply-To: <200711161700.lAGH0Fqg021324@freefall.freebsd.org>
References:  <200711161700.lAGH0Fqg021324@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting kmacy@FreeBSD.org:

>
> Please comment on whether or not it is worth updating the docs
> or this is just blatant pilot error.
>

Either the code should be changed to ignore the MAP_ANON offset as the manpage
currently says, or - simpler solution - the manpage should state, that for
anonymous mappings the offset must be aligned to the page size.
This would bring the manpage in line with the specs; modulo the fact that
illegal offsets cause "undefined behaviour" rather than failing with EINVAL.

Relying on the current manpage wording a programmer _might_ try to save a few
cycles by e.g. passing an uninitialized offset variable. (This is rather
unlikely, but nevertheless having precise manpages is always a good thing.)

  Martin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071117112910.156623xlukumke4k>