Subject: Re: MAP_ANON
To: Bang Jun-Young <junyoung@netbsd.org>
From: Ignatios Souvatzis <ignatios@theory.cs.uni-bonn.de>
List: tech-kern
Date: 03/18/2003 10:40:02
--f2QGlHpHGjS2mn6Y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 18, 2003 at 05:18:15PM +0900, Bang Jun-Young wrote:
> On Tue, Mar 18, 2003 at 02:00:17PM +0900, Bang Jun-Young wrote:
> > FreeBSD vm_mmap.c (originated from the old VM) has no such code, and th=
ere's
> > no reason to not allow fd to be set to -1 for MAP_ANON case. IMO, it's a
> > bug in our uvm_mmap.c.
>=20
> Oops, that should be read:
>=20
> "There's no reason to require fd to be set to -1 for MAP_ANON case."
>=20
> 	} else {		/* MAP_ANON case */
> 		/*
> 		 * XXX What do we do about (MAP_SHARED|MAP_PRIVATE) =3D=3D 0?
> 		 */
> 		if (fd !=3D -1)
> 			return (EINVAL);
>=20
> Thanks to Martin Husemann for pointing out the wrong expression. :-)

Ahem ... what do other OSes do in this area? Does Posix / SUS say anything?

	-is

--f2QGlHpHGjS2mn6Y
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQEVAgUBPnbpbjCn4om+4LhpAQFn5gf/dXeWcfrxFYJotyzXVyvaftpYmd23zOdI
q+tURIYsK2EflgGv29yCjXAbVG8liM42yi04hYlH6bhYPdbtHD0FnXsb8dtf17Xz
9QfrajA5j8qJwBeHBG+wSnfDwfEo5G1BzElacuR0140I4x1MBd0YM/qvXIpDiTXD
XMZOZgGBW1FXp9cxm0UK1bCauSZv/ZYSPDkPJaHMgRS01iMFaC9ubeYwvh9g9wWf
j+Kp9H73k6JR41m3+CHLQXjwX9LY1NlLXJc/5FuR4Kdi4l/XBMozojbC9l2UwiI+
AXVwHUIbF1NMB3WLkVZdXAfXdZpVGKX8kqFKAsOqeDumB/+BJWRN+A==
=dyMd
-----END PGP SIGNATURE-----

--f2QGlHpHGjS2mn6Y--