From nobody@FreeBSD.org  Sat Jan 17 13:25:23 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7A9FC16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Jan 2004 13:25:23 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2762943D53
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Jan 2004 13:25:22 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0HLPLdL092438
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Jan 2004 13:25:21 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0HLPLnS092437;
	Sat, 17 Jan 2004 13:25:21 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401172125.i0HLPLnS092437@www.freebsd.org>
Date: Sat, 17 Jan 2004 13:25:21 -0800 (PST)
From: Stephan Uphoff <ups@stups.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: __elfN(map_insert) bug  [patch]
X-Send-Pr-Version: www-2.0

>Number:         61497
>Category:       kern
>Synopsis:       [kernel] [patch] __elfN(map_insert) bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ups
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 13:30:15 PST 2004
>Closed-Date:    Fri Nov 05 18:48:06 UTC 2010
>Last-Modified:  Fri Nov 05 18:48:06 UTC 2010
>Originator:     Stephan Uphoff
>Release:        current - Jan 17 2004
>Organization:
>Environment:
N/A
>Description:
When the mapping for complete pages is not aligned 
__elfN(map_insert) copies the data from temporary
mapped file backed pages to the userspace mapping.
The copying is done in a loop with at most one page
being copied at a time.
Unfortunately the file offset is not updated and the same
offset in the file is mapped and copied on each iteration.
>How-To-Repeat:
      
>Fix:
Index: imgact_elf.c
===================================================================
RCS file: /cvsroot/src/sys/kern/imgact_elf.c,v
retrieving revision 1.143
diff -c -r1.143 imgact_elf.c
*** imgact_elf.c	23 Dec 2003 02:45:24 -0000	1.143
--- imgact_elf.c	17 Jan 2004 20:59:55 -0000
***************
*** 333,338 ****
--- 333,339 ----
  					return (KERN_FAILURE);
  				}
  				start += sz;
+ 				offset += sz;
  			}
  			rv = KERN_SUCCESS;
  		} else {

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ups 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Apr 9 00:50:26 GMT 2005 
Responsible-Changed-Why:  
Submitter is now a committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61497 
State-Changed-From-To: open->feedback 
State-Changed-By: kmacy 
State-Changed-When: Fri Nov 16 08:20:52 UTC 2007 
State-Changed-Why:  

ups - is this still an issue? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61497 
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 20:23:36 UTC 2008 
State-Changed-Why:  
It does not sound like this is actively being worked on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61497 
State-Changed-From-To: suspended->closed 
State-Changed-By: alc 
State-Changed-When: Fri Nov 5 18:45:57 UTC 2010 
State-Changed-Why:  
It appears that I fixed this bug in 2005, specifically, in 
CVS revision 1.167 of kern/imgact_elf.c, so all active branches 
have the fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61497 
>Unformatted:
