From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 9 15:57:54 2009 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 B826A1065692; Mon, 9 Nov 2009 15:57:54 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 09EE08FC0C; Mon, 9 Nov 2009 15:57:53 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,708,1249250400"; d="scan'208";a="18034605" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 09 Nov 2009 16:57:52 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6F1941B0751; Mon, 9 Nov 2009 16:57:52 +0100 (CET) Date: Mon, 09 Nov 2009 16:57:52 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: John Baldwin , Message-ID: In-Reply-To: <200911090931.12494.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Alan Cox Subject: Re: mmap(2) with MAP_ANON honouring offset although it shouldn't 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, 09 Nov 2009 15:57:54 -0000 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