From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 22 15:07:46 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 69F34106566B for ; Mon, 22 Mar 2010 15:07:46 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-relay1.uni-muenster.de (ZIVM-RELAY1.UNI-MUENSTER.DE [128.176.192.12]) by mx1.freebsd.org (Postfix) with ESMTP id CA18A8FC20 for ; Mon, 22 Mar 2010 15:07:45 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.51,287,1267398000"; d="scan'208";a="299821507" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 22 Mar 2010 16:07:43 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id AC3F61B0768; Mon, 22 Mar 2010 16:07:43 +0100 (CET) Date: Mon, 22 Mar 2010 16:07:43 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: [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 15:07:46 -0000 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. the attached patch has originally been written by Martin Kammerhofer. i've modified it a bit so it attaches cleanly to HEAD (r205390). -- Alexander Best