Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2004 13:25:21 -0800 (PST)
From:      Stephan Uphoff <ups@stups.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/61497: __elfN(map_insert) bug  [patch]
Message-ID:  <200401172125.i0HLPLnS092437@www.freebsd.org>
Resent-Message-ID: <200401172130.i0HLUGQp034703@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61497
>Category:       kern
>Synopsis:       __elfN(map_insert) bug  [patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 13:30:15 PST 2004
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401172125.i0HLPLnS092437>