kern/61497: __elfN(map_insert) bug [patch]
Stephan Uphoff
ups at stups.com
Sat Jan 17 13:30:21 PST 2004
>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:
More information about the freebsd-bugs
mailing list