From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 22 17:41:00 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53164106564A for ; Mon, 22 Mar 2010 17:41:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6878FC08 for ; Mon, 22 Mar 2010 17:41:00 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B4F1346B2D; Mon, 22 Mar 2010 13:40:59 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C5F6E8A021; Mon, 22 Mar 2010 13:40:58 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 22 Mar 2010 13:29:55 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003221329.55369.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 22 Mar 2010 13:40:58 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Alexander Best Subject: Re: [patch] somebody please fix this outstanding mmap(2) bug X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 17:41:00 -0000 On Monday 22 March 2010 11:07:43 am Alexander Best wrote: > could somebody please commit this patch? it's been around forever (2003 or > 2004) and fixes mmap so the offset argument is being ignored when MAP_ANON is > defined (just like the mmap(2) manual says). right now the offset argument is > being taken into account although MAP_ANON is set!!! > > the pr is kern/71258 (including a little c app to demonstrate the bug) > > i've also sent a followup patch to the pr which returns EINVAL if the offset > is non zero and MAP_ANON is set, but i guess that might break some code. I think we should go the EINVAL route, and I will commit the patch you did to add that. -- John Baldwin