From owner-cvs-src@FreeBSD.ORG Thu Jun 22 03:16:41 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7763516A479; Thu, 22 Jun 2006 03:16:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB62043D46; Thu, 22 Jun 2006 03:16:40 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k5M3GU6k073117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jun 2006 06:16:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k5M3GU8F017588; Thu, 22 Jun 2006 06:16:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k5M3GTJe017587; Thu, 22 Jun 2006 06:16:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Jun 2006 06:16:29 +0300 From: Konstantin Belousov To: John-Mark Gurney Message-ID: <20060622031629.GB5115@deviant.kiev.zoral.com.ua> References: <200606211259.k5LCx5as082227@repoman.freebsd.org> <44998562.6080705@cs.rice.edu> <20060621175821.GB82074@funkthat.com> <200606211413.24602.jhb@freebsd.org> <20060621213657.GF82074@funkthat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline In-Reply-To: <20060621213657.GF82074@funkthat.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on fw.zoral.com.ua Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Alan Cox , cvs-all@freebsd.org, John Baldwin Subject: Re: cvs commit: src/lib/libc/sys mincore.2 src/sys/vm vm_mmap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 03:16:41 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2006 at 02:36:57PM -0700, John-Mark Gurney wrote: > John Baldwin wrote this message on Wed, Jun 21, 2006 at 14:13 -0400: > > On Wednesday 21 June 2006 13:58, John-Mark Gurney wrote: > > > Alan Cox wrote this message on Wed, Jun 21, 2006 at 12:44 -0500: > > > > John-Mark Gurney wrote: > > > >=20 > > > > >Konstantin Belousov wrote this message on Wed, Jun 21, 2006 at 12:= 59=20 > > +0000: > > > > > > > > > >> Modified files: > > > > >> lib/libc/sys mincore.2=20 > > > > >> sys/vm vm_mmap.c=20 > > > > >> Log: > > > > >> Make the mincore(2) return ENOMEM when requested range is not fu= lly=20 > > > > >> mapped. > > > > > > > > > >Is this change to be posix compliant or something? ENOMEM seems l= ike > > > > >the wrong error, or are we allocating memory? > > > > >#define ENOMEM 12 /* Cannot allocate memory = */ > > > > > > > > > >the original EINVAL seems to me the correct one, as is commonly us= ed > > > > >when the data passed in is incorrect... > > > > > > > > I looked at this when the patch was proposed. ENOMEM is the de fac= to=20 > > > > standard error for this case. To the best of my knowledge, there i= s no=20 > > > > officially-sanctioned specification for mincore(2). > > >=20 > > > Could you please provide a reference to this de facto standard error > > > as in other places where ENOMEM is used for such an error? > >=20 > > NetBSD and Linux were the examples given on the thread in hackers@. Ch= eck the=20 > > archives. >=20 > Thank you for a useful response... I'm still catching up on email, and > haven't even attempted to read -hackers yet after my two week trip... > (though I'm caught up on cvs-all and -current though).. >=20 > I guess since everyone else is using it, it's ok, but I still think it's > a stupid errno since it has nothing to do w/ memory allocation.. Probably. Alan Cox described everything from the technical point of view. I could only add that the change was requested by the user exactly to get behaviuor consistent with other systems, to not special-case FreeBSD (see GNU? libsigsegv). --5/uDoXvLw7AC5HRs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEmguMC3+MBN1Mb4gRAoUqAKCz9o97NmEKGV9V7d6TBQG1X8Q6gACfWXPp eugdNneS3Zhb3UhUSXsUtVo= =7ljC -----END PGP SIGNATURE----- --5/uDoXvLw7AC5HRs--